element-plus.js 1.8 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504
  1. import { $ as createTextVNode, $n as toRefs, At as onBeforeMount, Bn as markRaw, Bt as onUpdated, C as vShow, Cn as withDirectives, Dt as mergeProps, Ft as onMounted, G as createBlock, Gn as readonly, I as Teleport, Jt as renderSlot, K as createCommentVNode, Kn as ref, L as Text, M as Fragment, Mn as effectScope, Mt as onBeforeUpdate, Nn as getCurrentScope, Nt as onDeactivated, O as Comment, Ot as nextTick, Qn as toRef, Rn as isRef, S as vModelText, T as withModifiers, U as computed, Ut as provide, V as cloneVNode, Vn as onScopeDispose, Vt as openBlock, W as createBaseVNode, Wn as reactive, Xt as resolveDirective, Yn as shallowRef, Yt as resolveComponent, Z as createSlots, Zn as toRaw, Zt as resolveDynamicComponent, _n as watchEffect, _r as normalizeStyle, a as createApp, an as toHandlers, ar as capitalize$1, b as vModelRadio, cr as isArray$1, dn as useSlots, dr as isObject$2, er as toValue$1, et as createVNode, fr as isPlainObject$1, ft as guardReactiveProps, gn as watch, gr as normalizeProps, hn as warn, hr as normalizeClass, ir as camelize$1, jt as onBeforeUnmount, kt as onActivated, lr as isDate, mr as isString, n as Transition, nr as unref, nt as defineComponent, or as hasOwn, p as render, pr as isPromise, pt as h$1, q as createElementBlock, qn as shallowReactive, qt as renderList, r as TransitionGroup, rr as NOOP, sn as useAttrs$1, sr as hyphenate$1, tr as triggerRef, ur as isFunction$1, ut as getCurrentInstance, v as vModelCheckbox, vr as toDisplayString, w as withKeys, wt as isVNode, xn as withCtx, xt as inject, yr as toHandlerKey, zt as onUnmounted } from "./vue.runtime.esm-bundler-BjtQpYUU.js";
  2. import { ArrowDown as arrow_down_default, ArrowLeft as arrow_left_default, ArrowRight as arrow_right_default, ArrowUp as arrow_up_default, Back as back_default, Calendar as calendar_default$1, CaretRight as caret_right_default, CaretTop as caret_top_default, Check as check_default, CircleCheck as circle_check_default, CircleCheckFilled as circle_check_filled_default, CircleClose as circle_close_default, CircleCloseFilled as circle_close_filled_default, Clock as clock_default, Close as close_default, DArrowLeft as d_arrow_left_default, DArrowRight as d_arrow_right_default, Delete as delete_default, Document as document_default, FullScreen as full_screen_default, Hide as hide_default, InfoFilled as info_filled_default, Loading as loading_default, Minus as minus_default, More as more_default, MoreFilled as more_filled_default, PictureFilled as picture_filled_default, Plus as plus_default, QuestionFilled as question_filled_default, RefreshLeft as refresh_left_default, RefreshRight as refresh_right_default, ScaleToOriginal as scale_to_original_default, Search as search_default, SortDown as sort_down_default, SortUp as sort_up_default, Star as star_default, StarFilled as star_filled_default, SuccessFilled as success_filled_default, View as view_default, WarningFilled as warning_filled_default, ZoomIn as zoom_in_default, ZoomOut as zoom_out_default } from "./@element-plus_icons-vue.js";
  3. //#region \0rolldown/runtime.js
  4. var __create = Object.create;
  5. var __defProp = Object.defineProperty;
  6. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  7. var __getOwnPropNames = Object.getOwnPropertyNames;
  8. var __getProtoOf = Object.getPrototypeOf;
  9. var __hasOwnProp = Object.prototype.hasOwnProperty;
  10. var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
  11. var __copyProps = (to, from, except, desc) => {
  12. if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
  13. key = keys[i];
  14. if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
  15. get: ((k) => from[k]).bind(null, key),
  16. enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
  17. });
  18. }
  19. return to;
  20. };
  21. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
  22. value: mod,
  23. enumerable: true
  24. }) : target, mod));
  25. //#endregion
  26. //#region node_modules/element-plus/es/constants/aria.mjs
  27. var EVENT_CODE = {
  28. tab: "Tab",
  29. enter: "Enter",
  30. space: "Space",
  31. left: "ArrowLeft",
  32. up: "ArrowUp",
  33. right: "ArrowRight",
  34. down: "ArrowDown",
  35. esc: "Escape",
  36. delete: "Delete",
  37. backspace: "Backspace",
  38. numpadEnter: "NumpadEnter",
  39. pageUp: "PageUp",
  40. pageDown: "PageDown",
  41. home: "Home",
  42. end: "End"
  43. };
  44. //#endregion
  45. //#region node_modules/element-plus/es/constants/date.mjs
  46. var datePickTypes = [
  47. "year",
  48. "years",
  49. "month",
  50. "months",
  51. "date",
  52. "dates",
  53. "week",
  54. "datetime",
  55. "datetimerange",
  56. "daterange",
  57. "monthrange",
  58. "yearrange"
  59. ];
  60. var WEEK_DAYS = [
  61. "sun",
  62. "mon",
  63. "tue",
  64. "wed",
  65. "thu",
  66. "fri",
  67. "sat"
  68. ];
  69. //#endregion
  70. //#region node_modules/element-plus/es/constants/event.mjs
  71. var UPDATE_MODEL_EVENT = "update:modelValue";
  72. var CHANGE_EVENT = "change";
  73. var INPUT_EVENT = "input";
  74. //#endregion
  75. //#region node_modules/element-plus/es/constants/key.mjs
  76. var INSTALLED_KEY = Symbol("INSTALLED_KEY");
  77. //#endregion
  78. //#region node_modules/element-plus/es/constants/size.mjs
  79. var componentSizes = [
  80. "",
  81. "default",
  82. "small",
  83. "large"
  84. ];
  85. var componentSizeMap = {
  86. large: 40,
  87. default: 32,
  88. small: 24
  89. };
  90. //#endregion
  91. //#region node_modules/element-plus/es/constants/column-alignment.mjs
  92. var columnAlignment = [
  93. "left",
  94. "center",
  95. "right"
  96. ];
  97. //#endregion
  98. //#region node_modules/element-plus/es/constants/form.mjs
  99. var MINIMUM_INPUT_WIDTH = 11;
  100. var BORDER_HORIZONTAL_WIDTH = 2;
  101. //#endregion
  102. //#region node_modules/lodash-es/_freeGlobal.js
  103. /** Detect free variable `global` from Node.js. */
  104. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  105. //#endregion
  106. //#region node_modules/lodash-es/_root.js
  107. /** Detect free variable `self`. */
  108. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  109. /** Used as a reference to the global object. */
  110. var root = freeGlobal || freeSelf || Function("return this")();
  111. //#endregion
  112. //#region node_modules/lodash-es/_Symbol.js
  113. /** Built-in value references. */
  114. var Symbol$1 = root.Symbol;
  115. //#endregion
  116. //#region node_modules/lodash-es/_getRawTag.js
  117. /** Used for built-in method references. */
  118. var objectProto$4 = Object.prototype;
  119. /** Used to check objects for own properties. */
  120. var hasOwnProperty$13 = objectProto$4.hasOwnProperty;
  121. /**
  122. * Used to resolve the
  123. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  124. * of values.
  125. */
  126. var nativeObjectToString$1 = objectProto$4.toString;
  127. /** Built-in value references. */
  128. var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
  129. /**
  130. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  131. *
  132. * @private
  133. * @param {*} value The value to query.
  134. * @returns {string} Returns the raw `toStringTag`.
  135. */
  136. function getRawTag(value) {
  137. var isOwn = hasOwnProperty$13.call(value, symToStringTag$1), tag = value[symToStringTag$1];
  138. try {
  139. value[symToStringTag$1] = void 0;
  140. var unmasked = true;
  141. } catch (e) {}
  142. var result = nativeObjectToString$1.call(value);
  143. if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
  144. else delete value[symToStringTag$1];
  145. return result;
  146. }
  147. //#endregion
  148. //#region node_modules/lodash-es/_objectToString.js
  149. /**
  150. * Used to resolve the
  151. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  152. * of values.
  153. */
  154. var nativeObjectToString = Object.prototype.toString;
  155. /**
  156. * Converts `value` to a string using `Object.prototype.toString`.
  157. *
  158. * @private
  159. * @param {*} value The value to convert.
  160. * @returns {string} Returns the converted string.
  161. */
  162. function objectToString(value) {
  163. return nativeObjectToString.call(value);
  164. }
  165. //#endregion
  166. //#region node_modules/lodash-es/_baseGetTag.js
  167. /** `Object#toString` result references. */
  168. var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
  169. /** Built-in value references. */
  170. var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
  171. /**
  172. * The base implementation of `getTag` without fallbacks for buggy environments.
  173. *
  174. * @private
  175. * @param {*} value The value to query.
  176. * @returns {string} Returns the `toStringTag`.
  177. */
  178. function baseGetTag(value) {
  179. if (value == null) return value === void 0 ? undefinedTag : nullTag;
  180. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  181. }
  182. //#endregion
  183. //#region node_modules/lodash-es/isObjectLike.js
  184. /**
  185. * Checks if `value` is object-like. A value is object-like if it's not `null`
  186. * and has a `typeof` result of "object".
  187. *
  188. * @static
  189. * @memberOf _
  190. * @since 4.0.0
  191. * @category Lang
  192. * @param {*} value The value to check.
  193. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  194. * @example
  195. *
  196. * _.isObjectLike({});
  197. * // => true
  198. *
  199. * _.isObjectLike([1, 2, 3]);
  200. * // => true
  201. *
  202. * _.isObjectLike(_.noop);
  203. * // => false
  204. *
  205. * _.isObjectLike(null);
  206. * // => false
  207. */
  208. function isObjectLike(value) {
  209. return value != null && typeof value == "object";
  210. }
  211. //#endregion
  212. //#region node_modules/lodash-es/isSymbol.js
  213. /** `Object#toString` result references. */
  214. var symbolTag$3 = "[object Symbol]";
  215. /**
  216. * Checks if `value` is classified as a `Symbol` primitive or object.
  217. *
  218. * @static
  219. * @memberOf _
  220. * @since 4.0.0
  221. * @category Lang
  222. * @param {*} value The value to check.
  223. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  224. * @example
  225. *
  226. * _.isSymbol(Symbol.iterator);
  227. * // => true
  228. *
  229. * _.isSymbol('abc');
  230. * // => false
  231. */
  232. function isSymbol(value) {
  233. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
  234. }
  235. //#endregion
  236. //#region node_modules/lodash-es/_arrayMap.js
  237. /**
  238. * A specialized version of `_.map` for arrays without support for iteratee
  239. * shorthands.
  240. *
  241. * @private
  242. * @param {Array} [array] The array to iterate over.
  243. * @param {Function} iteratee The function invoked per iteration.
  244. * @returns {Array} Returns the new mapped array.
  245. */
  246. function arrayMap(array, iteratee) {
  247. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  248. while (++index < length) result[index] = iteratee(array[index], index, array);
  249. return result;
  250. }
  251. //#endregion
  252. //#region node_modules/lodash-es/isArray.js
  253. /**
  254. * Checks if `value` is classified as an `Array` object.
  255. *
  256. * @static
  257. * @memberOf _
  258. * @since 0.1.0
  259. * @category Lang
  260. * @param {*} value The value to check.
  261. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  262. * @example
  263. *
  264. * _.isArray([1, 2, 3]);
  265. * // => true
  266. *
  267. * _.isArray(document.body.children);
  268. * // => false
  269. *
  270. * _.isArray('abc');
  271. * // => false
  272. *
  273. * _.isArray(_.noop);
  274. * // => false
  275. */
  276. var isArray = Array.isArray;
  277. //#endregion
  278. //#region node_modules/lodash-es/_baseToString.js
  279. /** Used as references for various `Number` constants. */
  280. var INFINITY$3 = Infinity;
  281. /** Used to convert symbols to primitives and strings. */
  282. var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
  283. /**
  284. * The base implementation of `_.toString` which doesn't convert nullish
  285. * values to empty strings.
  286. *
  287. * @private
  288. * @param {*} value The value to process.
  289. * @returns {string} Returns the string.
  290. */
  291. function baseToString(value) {
  292. if (typeof value == "string") return value;
  293. if (isArray(value)) return arrayMap(value, baseToString) + "";
  294. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  295. var result = value + "";
  296. return result == "0" && 1 / value == -INFINITY$3 ? "-0" : result;
  297. }
  298. //#endregion
  299. //#region node_modules/lodash-es/_trimmedEndIndex.js
  300. /** Used to match a single whitespace character. */
  301. var reWhitespace = /\s/;
  302. /**
  303. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  304. * character of `string`.
  305. *
  306. * @private
  307. * @param {string} string The string to inspect.
  308. * @returns {number} Returns the index of the last non-whitespace character.
  309. */
  310. function trimmedEndIndex(string) {
  311. var index = string.length;
  312. while (index-- && reWhitespace.test(string.charAt(index)));
  313. return index;
  314. }
  315. //#endregion
  316. //#region node_modules/lodash-es/_baseTrim.js
  317. /** Used to match leading whitespace. */
  318. var reTrimStart = /^\s+/;
  319. /**
  320. * The base implementation of `_.trim`.
  321. *
  322. * @private
  323. * @param {string} string The string to trim.
  324. * @returns {string} Returns the trimmed string.
  325. */
  326. function baseTrim(string) {
  327. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  328. }
  329. //#endregion
  330. //#region node_modules/lodash-es/isObject.js
  331. /**
  332. * Checks if `value` is the
  333. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  334. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  335. *
  336. * @static
  337. * @memberOf _
  338. * @since 0.1.0
  339. * @category Lang
  340. * @param {*} value The value to check.
  341. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  342. * @example
  343. *
  344. * _.isObject({});
  345. * // => true
  346. *
  347. * _.isObject([1, 2, 3]);
  348. * // => true
  349. *
  350. * _.isObject(_.noop);
  351. * // => true
  352. *
  353. * _.isObject(null);
  354. * // => false
  355. */
  356. function isObject$1(value) {
  357. var type = typeof value;
  358. return value != null && (type == "object" || type == "function");
  359. }
  360. //#endregion
  361. //#region node_modules/lodash-es/toNumber.js
  362. /** Used as references for various `Number` constants. */
  363. var NAN = NaN;
  364. /** Used to detect bad signed hexadecimal string values. */
  365. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  366. /** Used to detect binary string values. */
  367. var reIsBinary = /^0b[01]+$/i;
  368. /** Used to detect octal string values. */
  369. var reIsOctal = /^0o[0-7]+$/i;
  370. /** Built-in method references without a dependency on `root`. */
  371. var freeParseInt = parseInt;
  372. /**
  373. * Converts `value` to a number.
  374. *
  375. * @static
  376. * @memberOf _
  377. * @since 4.0.0
  378. * @category Lang
  379. * @param {*} value The value to process.
  380. * @returns {number} Returns the number.
  381. * @example
  382. *
  383. * _.toNumber(3.2);
  384. * // => 3.2
  385. *
  386. * _.toNumber(Number.MIN_VALUE);
  387. * // => 5e-324
  388. *
  389. * _.toNumber(Infinity);
  390. * // => Infinity
  391. *
  392. * _.toNumber('3.2');
  393. * // => 3.2
  394. */
  395. function toNumber(value) {
  396. if (typeof value == "number") return value;
  397. if (isSymbol(value)) return NAN;
  398. if (isObject$1(value)) {
  399. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  400. value = isObject$1(other) ? other + "" : other;
  401. }
  402. if (typeof value != "string") return value === 0 ? value : +value;
  403. value = baseTrim(value);
  404. var isBinary = reIsBinary.test(value);
  405. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  406. }
  407. //#endregion
  408. //#region node_modules/lodash-es/toFinite.js
  409. /** Used as references for various `Number` constants. */
  410. var INFINITY$2 = Infinity, MAX_INTEGER = 17976931348623157e292;
  411. /**
  412. * Converts `value` to a finite number.
  413. *
  414. * @static
  415. * @memberOf _
  416. * @since 4.12.0
  417. * @category Lang
  418. * @param {*} value The value to convert.
  419. * @returns {number} Returns the converted number.
  420. * @example
  421. *
  422. * _.toFinite(3.2);
  423. * // => 3.2
  424. *
  425. * _.toFinite(Number.MIN_VALUE);
  426. * // => 5e-324
  427. *
  428. * _.toFinite(Infinity);
  429. * // => 1.7976931348623157e+308
  430. *
  431. * _.toFinite('3.2');
  432. * // => 3.2
  433. */
  434. function toFinite(value) {
  435. if (!value) return value === 0 ? value : 0;
  436. value = toNumber(value);
  437. if (value === INFINITY$2 || value === -INFINITY$2) return (value < 0 ? -1 : 1) * MAX_INTEGER;
  438. return value === value ? value : 0;
  439. }
  440. //#endregion
  441. //#region node_modules/lodash-es/toInteger.js
  442. /**
  443. * Converts `value` to an integer.
  444. *
  445. * **Note:** This method is loosely based on
  446. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  447. *
  448. * @static
  449. * @memberOf _
  450. * @since 4.0.0
  451. * @category Lang
  452. * @param {*} value The value to convert.
  453. * @returns {number} Returns the converted integer.
  454. * @example
  455. *
  456. * _.toInteger(3.2);
  457. * // => 3
  458. *
  459. * _.toInteger(Number.MIN_VALUE);
  460. * // => 0
  461. *
  462. * _.toInteger(Infinity);
  463. * // => 1.7976931348623157e+308
  464. *
  465. * _.toInteger('3.2');
  466. * // => 3
  467. */
  468. function toInteger(value) {
  469. var result = toFinite(value), remainder = result % 1;
  470. return result === result ? remainder ? result - remainder : result : 0;
  471. }
  472. //#endregion
  473. //#region node_modules/lodash-es/identity.js
  474. /**
  475. * This method returns the first argument it receives.
  476. *
  477. * @static
  478. * @since 0.1.0
  479. * @memberOf _
  480. * @category Util
  481. * @param {*} value Any value.
  482. * @returns {*} Returns `value`.
  483. * @example
  484. *
  485. * var object = { 'a': 1 };
  486. *
  487. * console.log(_.identity(object) === object);
  488. * // => true
  489. */
  490. function identity(value) {
  491. return value;
  492. }
  493. //#endregion
  494. //#region node_modules/lodash-es/isFunction.js
  495. /** `Object#toString` result references. */
  496. var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
  497. /**
  498. * Checks if `value` is classified as a `Function` object.
  499. *
  500. * @static
  501. * @memberOf _
  502. * @since 0.1.0
  503. * @category Lang
  504. * @param {*} value The value to check.
  505. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  506. * @example
  507. *
  508. * _.isFunction(_);
  509. * // => true
  510. *
  511. * _.isFunction(/abc/);
  512. * // => false
  513. */
  514. function isFunction(value) {
  515. if (!isObject$1(value)) return false;
  516. var tag = baseGetTag(value);
  517. return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
  518. }
  519. //#endregion
  520. //#region node_modules/lodash-es/_coreJsData.js
  521. /** Used to detect overreaching core-js shims. */
  522. var coreJsData = root["__core-js_shared__"];
  523. //#endregion
  524. //#region node_modules/lodash-es/_isMasked.js
  525. /** Used to detect methods masquerading as native. */
  526. var maskSrcKey = function() {
  527. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  528. return uid ? "Symbol(src)_1." + uid : "";
  529. }();
  530. /**
  531. * Checks if `func` has its source masked.
  532. *
  533. * @private
  534. * @param {Function} func The function to check.
  535. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  536. */
  537. function isMasked(func) {
  538. return !!maskSrcKey && maskSrcKey in func;
  539. }
  540. //#endregion
  541. //#region node_modules/lodash-es/_toSource.js
  542. /** Used to resolve the decompiled source of functions. */
  543. var funcToString$2 = Function.prototype.toString;
  544. /**
  545. * Converts `func` to its source code.
  546. *
  547. * @private
  548. * @param {Function} func The function to convert.
  549. * @returns {string} Returns the source code.
  550. */
  551. function toSource(func) {
  552. if (func != null) {
  553. try {
  554. return funcToString$2.call(func);
  555. } catch (e) {}
  556. try {
  557. return func + "";
  558. } catch (e) {}
  559. }
  560. return "";
  561. }
  562. //#endregion
  563. //#region node_modules/lodash-es/_baseIsNative.js
  564. /**
  565. * Used to match `RegExp`
  566. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  567. */
  568. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  569. /** Used to detect host constructors (Safari). */
  570. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  571. /** Used for built-in method references. */
  572. var funcProto$1 = Function.prototype, objectProto$3 = Object.prototype;
  573. /** Used to resolve the decompiled source of functions. */
  574. var funcToString$1 = funcProto$1.toString;
  575. /** Used to check objects for own properties. */
  576. var hasOwnProperty$12 = objectProto$3.hasOwnProperty;
  577. /** Used to detect if a method is native. */
  578. var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$12).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  579. /**
  580. * The base implementation of `_.isNative` without bad shim checks.
  581. *
  582. * @private
  583. * @param {*} value The value to check.
  584. * @returns {boolean} Returns `true` if `value` is a native function,
  585. * else `false`.
  586. */
  587. function baseIsNative(value) {
  588. if (!isObject$1(value) || isMasked(value)) return false;
  589. return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
  590. }
  591. //#endregion
  592. //#region node_modules/lodash-es/_getValue.js
  593. /**
  594. * Gets the value at `key` of `object`.
  595. *
  596. * @private
  597. * @param {Object} [object] The object to query.
  598. * @param {string} key The key of the property to get.
  599. * @returns {*} Returns the property value.
  600. */
  601. function getValue$1(object, key) {
  602. return object == null ? void 0 : object[key];
  603. }
  604. //#endregion
  605. //#region node_modules/lodash-es/_getNative.js
  606. /**
  607. * Gets the native function at `key` of `object`.
  608. *
  609. * @private
  610. * @param {Object} object The object to query.
  611. * @param {string} key The key of the method to get.
  612. * @returns {*} Returns the function if it's native, else `undefined`.
  613. */
  614. function getNative(object, key) {
  615. var value = getValue$1(object, key);
  616. return baseIsNative(value) ? value : void 0;
  617. }
  618. //#endregion
  619. //#region node_modules/lodash-es/_WeakMap.js
  620. var WeakMap$1 = getNative(root, "WeakMap");
  621. //#endregion
  622. //#region node_modules/lodash-es/_baseCreate.js
  623. /** Built-in value references. */
  624. var objectCreate = Object.create;
  625. /**
  626. * The base implementation of `_.create` without support for assigning
  627. * properties to the created object.
  628. *
  629. * @private
  630. * @param {Object} proto The object to inherit from.
  631. * @returns {Object} Returns the new object.
  632. */
  633. var baseCreate = function() {
  634. function object() {}
  635. return function(proto) {
  636. if (!isObject$1(proto)) return {};
  637. if (objectCreate) return objectCreate(proto);
  638. object.prototype = proto;
  639. var result = new object();
  640. object.prototype = void 0;
  641. return result;
  642. };
  643. }();
  644. //#endregion
  645. //#region node_modules/lodash-es/_apply.js
  646. /**
  647. * A faster alternative to `Function#apply`, this function invokes `func`
  648. * with the `this` binding of `thisArg` and the arguments of `args`.
  649. *
  650. * @private
  651. * @param {Function} func The function to invoke.
  652. * @param {*} thisArg The `this` binding of `func`.
  653. * @param {Array} args The arguments to invoke `func` with.
  654. * @returns {*} Returns the result of `func`.
  655. */
  656. function apply(func, thisArg, args) {
  657. switch (args.length) {
  658. case 0: return func.call(thisArg);
  659. case 1: return func.call(thisArg, args[0]);
  660. case 2: return func.call(thisArg, args[0], args[1]);
  661. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  662. }
  663. return func.apply(thisArg, args);
  664. }
  665. //#endregion
  666. //#region node_modules/lodash-es/noop.js
  667. /**
  668. * This method returns `undefined`.
  669. *
  670. * @static
  671. * @memberOf _
  672. * @since 2.3.0
  673. * @category Util
  674. * @example
  675. *
  676. * _.times(2, _.noop);
  677. * // => [undefined, undefined]
  678. */
  679. function noop$1() {}
  680. //#endregion
  681. //#region node_modules/lodash-es/_copyArray.js
  682. /**
  683. * Copies the values of `source` to `array`.
  684. *
  685. * @private
  686. * @param {Array} source The array to copy values from.
  687. * @param {Array} [array=[]] The array to copy values to.
  688. * @returns {Array} Returns `array`.
  689. */
  690. function copyArray(source, array) {
  691. var index = -1, length = source.length;
  692. array || (array = Array(length));
  693. while (++index < length) array[index] = source[index];
  694. return array;
  695. }
  696. //#endregion
  697. //#region node_modules/lodash-es/_shortOut.js
  698. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  699. var HOT_COUNT = 800, HOT_SPAN = 16;
  700. var nativeNow = Date.now;
  701. /**
  702. * Creates a function that'll short out and invoke `identity` instead
  703. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  704. * milliseconds.
  705. *
  706. * @private
  707. * @param {Function} func The function to restrict.
  708. * @returns {Function} Returns the new shortable function.
  709. */
  710. function shortOut(func) {
  711. var count = 0, lastCalled = 0;
  712. return function() {
  713. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  714. lastCalled = stamp;
  715. if (remaining > 0) {
  716. if (++count >= HOT_COUNT) return arguments[0];
  717. } else count = 0;
  718. return func.apply(void 0, arguments);
  719. };
  720. }
  721. //#endregion
  722. //#region node_modules/lodash-es/constant.js
  723. /**
  724. * Creates a function that returns `value`.
  725. *
  726. * @static
  727. * @memberOf _
  728. * @since 2.4.0
  729. * @category Util
  730. * @param {*} value The value to return from the new function.
  731. * @returns {Function} Returns the new constant function.
  732. * @example
  733. *
  734. * var objects = _.times(2, _.constant({ 'a': 1 }));
  735. *
  736. * console.log(objects);
  737. * // => [{ 'a': 1 }, { 'a': 1 }]
  738. *
  739. * console.log(objects[0] === objects[1]);
  740. * // => true
  741. */
  742. function constant(value) {
  743. return function() {
  744. return value;
  745. };
  746. }
  747. //#endregion
  748. //#region node_modules/lodash-es/_defineProperty.js
  749. var defineProperty = function() {
  750. try {
  751. var func = getNative(Object, "defineProperty");
  752. func({}, "", {});
  753. return func;
  754. } catch (e) {}
  755. }();
  756. //#endregion
  757. //#region node_modules/lodash-es/_setToString.js
  758. /**
  759. * Sets the `toString` method of `func` to return `string`.
  760. *
  761. * @private
  762. * @param {Function} func The function to modify.
  763. * @param {Function} string The `toString` result.
  764. * @returns {Function} Returns `func`.
  765. */
  766. var setToString = shortOut(!defineProperty ? identity : function(func, string) {
  767. return defineProperty(func, "toString", {
  768. "configurable": true,
  769. "enumerable": false,
  770. "value": constant(string),
  771. "writable": true
  772. });
  773. });
  774. //#endregion
  775. //#region node_modules/lodash-es/_arrayEach.js
  776. /**
  777. * A specialized version of `_.forEach` for arrays without support for
  778. * iteratee shorthands.
  779. *
  780. * @private
  781. * @param {Array} [array] The array to iterate over.
  782. * @param {Function} iteratee The function invoked per iteration.
  783. * @returns {Array} Returns `array`.
  784. */
  785. function arrayEach(array, iteratee) {
  786. var index = -1, length = array == null ? 0 : array.length;
  787. while (++index < length) if (iteratee(array[index], index, array) === false) break;
  788. return array;
  789. }
  790. //#endregion
  791. //#region node_modules/lodash-es/_baseFindIndex.js
  792. /**
  793. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  794. * support for iteratee shorthands.
  795. *
  796. * @private
  797. * @param {Array} array The array to inspect.
  798. * @param {Function} predicate The function invoked per iteration.
  799. * @param {number} fromIndex The index to search from.
  800. * @param {boolean} [fromRight] Specify iterating from right to left.
  801. * @returns {number} Returns the index of the matched value, else `-1`.
  802. */
  803. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  804. var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
  805. while (fromRight ? index-- : ++index < length) if (predicate(array[index], index, array)) return index;
  806. return -1;
  807. }
  808. //#endregion
  809. //#region node_modules/lodash-es/_baseIsNaN.js
  810. /**
  811. * The base implementation of `_.isNaN` without support for number objects.
  812. *
  813. * @private
  814. * @param {*} value The value to check.
  815. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  816. */
  817. function baseIsNaN(value) {
  818. return value !== value;
  819. }
  820. //#endregion
  821. //#region node_modules/lodash-es/_strictIndexOf.js
  822. /**
  823. * A specialized version of `_.indexOf` which performs strict equality
  824. * comparisons of values, i.e. `===`.
  825. *
  826. * @private
  827. * @param {Array} array The array to inspect.
  828. * @param {*} value The value to search for.
  829. * @param {number} fromIndex The index to search from.
  830. * @returns {number} Returns the index of the matched value, else `-1`.
  831. */
  832. function strictIndexOf(array, value, fromIndex) {
  833. var index = fromIndex - 1, length = array.length;
  834. while (++index < length) if (array[index] === value) return index;
  835. return -1;
  836. }
  837. //#endregion
  838. //#region node_modules/lodash-es/_baseIndexOf.js
  839. /**
  840. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  841. *
  842. * @private
  843. * @param {Array} array The array to inspect.
  844. * @param {*} value The value to search for.
  845. * @param {number} fromIndex The index to search from.
  846. * @returns {number} Returns the index of the matched value, else `-1`.
  847. */
  848. function baseIndexOf(array, value, fromIndex) {
  849. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  850. }
  851. //#endregion
  852. //#region node_modules/lodash-es/_arrayIncludes.js
  853. /**
  854. * A specialized version of `_.includes` for arrays without support for
  855. * specifying an index to search from.
  856. *
  857. * @private
  858. * @param {Array} [array] The array to inspect.
  859. * @param {*} target The value to search for.
  860. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  861. */
  862. function arrayIncludes(array, value) {
  863. return !!(array == null ? 0 : array.length) && baseIndexOf(array, value, 0) > -1;
  864. }
  865. //#endregion
  866. //#region node_modules/lodash-es/_isIndex.js
  867. /** Used as references for various `Number` constants. */
  868. var MAX_SAFE_INTEGER$1 = 9007199254740991;
  869. /** Used to detect unsigned integer values. */
  870. var reIsUint = /^(?:0|[1-9]\d*)$/;
  871. /**
  872. * Checks if `value` is a valid array-like index.
  873. *
  874. * @private
  875. * @param {*} value The value to check.
  876. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  877. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  878. */
  879. function isIndex(value, length) {
  880. var type = typeof value;
  881. length = length == null ? MAX_SAFE_INTEGER$1 : length;
  882. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  883. }
  884. //#endregion
  885. //#region node_modules/lodash-es/_baseAssignValue.js
  886. /**
  887. * The base implementation of `assignValue` and `assignMergeValue` without
  888. * value checks.
  889. *
  890. * @private
  891. * @param {Object} object The object to modify.
  892. * @param {string} key The key of the property to assign.
  893. * @param {*} value The value to assign.
  894. */
  895. function baseAssignValue(object, key, value) {
  896. if (key == "__proto__" && defineProperty) defineProperty(object, key, {
  897. "configurable": true,
  898. "enumerable": true,
  899. "value": value,
  900. "writable": true
  901. });
  902. else object[key] = value;
  903. }
  904. //#endregion
  905. //#region node_modules/lodash-es/eq.js
  906. /**
  907. * Performs a
  908. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  909. * comparison between two values to determine if they are equivalent.
  910. *
  911. * @static
  912. * @memberOf _
  913. * @since 4.0.0
  914. * @category Lang
  915. * @param {*} value The value to compare.
  916. * @param {*} other The other value to compare.
  917. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  918. * @example
  919. *
  920. * var object = { 'a': 1 };
  921. * var other = { 'a': 1 };
  922. *
  923. * _.eq(object, object);
  924. * // => true
  925. *
  926. * _.eq(object, other);
  927. * // => false
  928. *
  929. * _.eq('a', 'a');
  930. * // => true
  931. *
  932. * _.eq('a', Object('a'));
  933. * // => false
  934. *
  935. * _.eq(NaN, NaN);
  936. * // => true
  937. */
  938. function eq(value, other) {
  939. return value === other || value !== value && other !== other;
  940. }
  941. //#endregion
  942. //#region node_modules/lodash-es/_assignValue.js
  943. /** Used to check objects for own properties. */
  944. var hasOwnProperty$11 = Object.prototype.hasOwnProperty;
  945. /**
  946. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  947. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  948. * for equality comparisons.
  949. *
  950. * @private
  951. * @param {Object} object The object to modify.
  952. * @param {string} key The key of the property to assign.
  953. * @param {*} value The value to assign.
  954. */
  955. function assignValue(object, key, value) {
  956. var objValue = object[key];
  957. if (!(hasOwnProperty$11.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
  958. }
  959. //#endregion
  960. //#region node_modules/lodash-es/_copyObject.js
  961. /**
  962. * Copies properties of `source` to `object`.
  963. *
  964. * @private
  965. * @param {Object} source The object to copy properties from.
  966. * @param {Array} props The property identifiers to copy.
  967. * @param {Object} [object={}] The object to copy properties to.
  968. * @param {Function} [customizer] The function to customize copied values.
  969. * @returns {Object} Returns `object`.
  970. */
  971. function copyObject(source, props, object, customizer) {
  972. var isNew = !object;
  973. object || (object = {});
  974. var index = -1, length = props.length;
  975. while (++index < length) {
  976. var key = props[index];
  977. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
  978. if (newValue === void 0) newValue = source[key];
  979. if (isNew) baseAssignValue(object, key, newValue);
  980. else assignValue(object, key, newValue);
  981. }
  982. return object;
  983. }
  984. //#endregion
  985. //#region node_modules/lodash-es/_overRest.js
  986. var nativeMax$2 = Math.max;
  987. /**
  988. * A specialized version of `baseRest` which transforms the rest array.
  989. *
  990. * @private
  991. * @param {Function} func The function to apply a rest parameter to.
  992. * @param {number} [start=func.length-1] The start position of the rest parameter.
  993. * @param {Function} transform The rest array transform.
  994. * @returns {Function} Returns the new function.
  995. */
  996. function overRest(func, start, transform) {
  997. start = nativeMax$2(start === void 0 ? func.length - 1 : start, 0);
  998. return function() {
  999. var args = arguments, index = -1, length = nativeMax$2(args.length - start, 0), array = Array(length);
  1000. while (++index < length) array[index] = args[start + index];
  1001. index = -1;
  1002. var otherArgs = Array(start + 1);
  1003. while (++index < start) otherArgs[index] = args[index];
  1004. otherArgs[start] = transform(array);
  1005. return apply(func, this, otherArgs);
  1006. };
  1007. }
  1008. //#endregion
  1009. //#region node_modules/lodash-es/_baseRest.js
  1010. /**
  1011. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  1012. *
  1013. * @private
  1014. * @param {Function} func The function to apply a rest parameter to.
  1015. * @param {number} [start=func.length-1] The start position of the rest parameter.
  1016. * @returns {Function} Returns the new function.
  1017. */
  1018. function baseRest(func, start) {
  1019. return setToString(overRest(func, start, identity), func + "");
  1020. }
  1021. //#endregion
  1022. //#region node_modules/lodash-es/isLength.js
  1023. /** Used as references for various `Number` constants. */
  1024. var MAX_SAFE_INTEGER = 9007199254740991;
  1025. /**
  1026. * Checks if `value` is a valid array-like length.
  1027. *
  1028. * **Note:** This method is loosely based on
  1029. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  1030. *
  1031. * @static
  1032. * @memberOf _
  1033. * @since 4.0.0
  1034. * @category Lang
  1035. * @param {*} value The value to check.
  1036. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1037. * @example
  1038. *
  1039. * _.isLength(3);
  1040. * // => true
  1041. *
  1042. * _.isLength(Number.MIN_VALUE);
  1043. * // => false
  1044. *
  1045. * _.isLength(Infinity);
  1046. * // => false
  1047. *
  1048. * _.isLength('3');
  1049. * // => false
  1050. */
  1051. function isLength(value) {
  1052. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1053. }
  1054. //#endregion
  1055. //#region node_modules/lodash-es/isArrayLike.js
  1056. /**
  1057. * Checks if `value` is array-like. A value is considered array-like if it's
  1058. * not a function and has a `value.length` that's an integer greater than or
  1059. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  1060. *
  1061. * @static
  1062. * @memberOf _
  1063. * @since 4.0.0
  1064. * @category Lang
  1065. * @param {*} value The value to check.
  1066. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1067. * @example
  1068. *
  1069. * _.isArrayLike([1, 2, 3]);
  1070. * // => true
  1071. *
  1072. * _.isArrayLike(document.body.children);
  1073. * // => true
  1074. *
  1075. * _.isArrayLike('abc');
  1076. * // => true
  1077. *
  1078. * _.isArrayLike(_.noop);
  1079. * // => false
  1080. */
  1081. function isArrayLike(value) {
  1082. return value != null && isLength(value.length) && !isFunction(value);
  1083. }
  1084. //#endregion
  1085. //#region node_modules/lodash-es/_isIterateeCall.js
  1086. /**
  1087. * Checks if the given arguments are from an iteratee call.
  1088. *
  1089. * @private
  1090. * @param {*} value The potential iteratee value argument.
  1091. * @param {*} index The potential iteratee index or key argument.
  1092. * @param {*} object The potential iteratee object argument.
  1093. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  1094. * else `false`.
  1095. */
  1096. function isIterateeCall(value, index, object) {
  1097. if (!isObject$1(object)) return false;
  1098. var type = typeof index;
  1099. if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
  1100. return false;
  1101. }
  1102. //#endregion
  1103. //#region node_modules/lodash-es/_createAssigner.js
  1104. /**
  1105. * Creates a function like `_.assign`.
  1106. *
  1107. * @private
  1108. * @param {Function} assigner The function to assign values.
  1109. * @returns {Function} Returns the new assigner function.
  1110. */
  1111. function createAssigner(assigner) {
  1112. return baseRest(function(object, sources) {
  1113. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
  1114. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
  1115. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  1116. customizer = length < 3 ? void 0 : customizer;
  1117. length = 1;
  1118. }
  1119. object = Object(object);
  1120. while (++index < length) {
  1121. var source = sources[index];
  1122. if (source) assigner(object, source, index, customizer);
  1123. }
  1124. return object;
  1125. });
  1126. }
  1127. //#endregion
  1128. //#region node_modules/lodash-es/_isPrototype.js
  1129. /** Used for built-in method references. */
  1130. var objectProto$2 = Object.prototype;
  1131. /**
  1132. * Checks if `value` is likely a prototype object.
  1133. *
  1134. * @private
  1135. * @param {*} value The value to check.
  1136. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  1137. */
  1138. function isPrototype(value) {
  1139. var Ctor = value && value.constructor;
  1140. return value === (typeof Ctor == "function" && Ctor.prototype || objectProto$2);
  1141. }
  1142. //#endregion
  1143. //#region node_modules/lodash-es/_baseTimes.js
  1144. /**
  1145. * The base implementation of `_.times` without support for iteratee shorthands
  1146. * or max array length checks.
  1147. *
  1148. * @private
  1149. * @param {number} n The number of times to invoke `iteratee`.
  1150. * @param {Function} iteratee The function invoked per iteration.
  1151. * @returns {Array} Returns the array of results.
  1152. */
  1153. function baseTimes(n, iteratee) {
  1154. var index = -1, result = Array(n);
  1155. while (++index < n) result[index] = iteratee(index);
  1156. return result;
  1157. }
  1158. //#endregion
  1159. //#region node_modules/lodash-es/_baseIsArguments.js
  1160. /** `Object#toString` result references. */
  1161. var argsTag$3 = "[object Arguments]";
  1162. /**
  1163. * The base implementation of `_.isArguments`.
  1164. *
  1165. * @private
  1166. * @param {*} value The value to check.
  1167. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1168. */
  1169. function baseIsArguments(value) {
  1170. return isObjectLike(value) && baseGetTag(value) == argsTag$3;
  1171. }
  1172. //#endregion
  1173. //#region node_modules/lodash-es/isArguments.js
  1174. /** Used for built-in method references. */
  1175. var objectProto$1 = Object.prototype;
  1176. /** Used to check objects for own properties. */
  1177. var hasOwnProperty$10 = objectProto$1.hasOwnProperty;
  1178. /** Built-in value references. */
  1179. var propertyIsEnumerable$1 = objectProto$1.propertyIsEnumerable;
  1180. /**
  1181. * Checks if `value` is likely an `arguments` object.
  1182. *
  1183. * @static
  1184. * @memberOf _
  1185. * @since 0.1.0
  1186. * @category Lang
  1187. * @param {*} value The value to check.
  1188. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1189. * else `false`.
  1190. * @example
  1191. *
  1192. * _.isArguments(function() { return arguments; }());
  1193. * // => true
  1194. *
  1195. * _.isArguments([1, 2, 3]);
  1196. * // => false
  1197. */
  1198. var isArguments = baseIsArguments(function() {
  1199. return arguments;
  1200. }()) ? baseIsArguments : function(value) {
  1201. return isObjectLike(value) && hasOwnProperty$10.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
  1202. };
  1203. //#endregion
  1204. //#region node_modules/lodash-es/stubFalse.js
  1205. /**
  1206. * This method returns `false`.
  1207. *
  1208. * @static
  1209. * @memberOf _
  1210. * @since 4.13.0
  1211. * @category Util
  1212. * @returns {boolean} Returns `false`.
  1213. * @example
  1214. *
  1215. * _.times(2, _.stubFalse);
  1216. * // => [false, false]
  1217. */
  1218. function stubFalse() {
  1219. return false;
  1220. }
  1221. //#endregion
  1222. //#region node_modules/lodash-es/isBuffer.js
  1223. /** Detect free variable `exports`. */
  1224. var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
  1225. /** Detect free variable `module`. */
  1226. var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
  1227. /** Built-in value references. */
  1228. var Buffer$2 = freeModule$2 && freeModule$2.exports === freeExports$2 ? root.Buffer : void 0;
  1229. /**
  1230. * Checks if `value` is a buffer.
  1231. *
  1232. * @static
  1233. * @memberOf _
  1234. * @since 4.3.0
  1235. * @category Lang
  1236. * @param {*} value The value to check.
  1237. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  1238. * @example
  1239. *
  1240. * _.isBuffer(new Buffer(2));
  1241. * // => true
  1242. *
  1243. * _.isBuffer(new Uint8Array(2));
  1244. * // => false
  1245. */
  1246. var isBuffer = (Buffer$2 ? Buffer$2.isBuffer : void 0) || stubFalse;
  1247. //#endregion
  1248. //#region node_modules/lodash-es/_baseIsTypedArray.js
  1249. /** `Object#toString` result references. */
  1250. var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
  1251. var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
  1252. /** Used to identify `toStringTag` values of typed arrays. */
  1253. var typedArrayTags = {};
  1254. typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
  1255. typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
  1256. /**
  1257. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  1258. *
  1259. * @private
  1260. * @param {*} value The value to check.
  1261. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1262. */
  1263. function baseIsTypedArray(value) {
  1264. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1265. }
  1266. //#endregion
  1267. //#region node_modules/lodash-es/_baseUnary.js
  1268. /**
  1269. * The base implementation of `_.unary` without support for storing metadata.
  1270. *
  1271. * @private
  1272. * @param {Function} func The function to cap arguments for.
  1273. * @returns {Function} Returns the new capped function.
  1274. */
  1275. function baseUnary(func) {
  1276. return function(value) {
  1277. return func(value);
  1278. };
  1279. }
  1280. //#endregion
  1281. //#region node_modules/lodash-es/_nodeUtil.js
  1282. /** Detect free variable `exports`. */
  1283. var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
  1284. /** Detect free variable `module`. */
  1285. var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
  1286. /** Detect free variable `process` from Node.js. */
  1287. var freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && freeGlobal.process;
  1288. /** Used to access faster Node.js helpers. */
  1289. var nodeUtil = function() {
  1290. try {
  1291. var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
  1292. if (types) return types;
  1293. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  1294. } catch (e) {}
  1295. }();
  1296. //#endregion
  1297. //#region node_modules/lodash-es/isTypedArray.js
  1298. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1299. /**
  1300. * Checks if `value` is classified as a typed array.
  1301. *
  1302. * @static
  1303. * @memberOf _
  1304. * @since 3.0.0
  1305. * @category Lang
  1306. * @param {*} value The value to check.
  1307. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1308. * @example
  1309. *
  1310. * _.isTypedArray(new Uint8Array);
  1311. * // => true
  1312. *
  1313. * _.isTypedArray([]);
  1314. * // => false
  1315. */
  1316. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  1317. //#endregion
  1318. //#region node_modules/lodash-es/_arrayLikeKeys.js
  1319. /** Used to check objects for own properties. */
  1320. var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
  1321. /**
  1322. * Creates an array of the enumerable property names of the array-like `value`.
  1323. *
  1324. * @private
  1325. * @param {*} value The value to query.
  1326. * @param {boolean} inherited Specify returning inherited property names.
  1327. * @returns {Array} Returns the array of property names.
  1328. */
  1329. function arrayLikeKeys(value, inherited) {
  1330. var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
  1331. for (var key in value) if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
  1332. return result;
  1333. }
  1334. //#endregion
  1335. //#region node_modules/lodash-es/_overArg.js
  1336. /**
  1337. * Creates a unary function that invokes `func` with its argument transformed.
  1338. *
  1339. * @private
  1340. * @param {Function} func The function to wrap.
  1341. * @param {Function} transform The argument transform.
  1342. * @returns {Function} Returns the new function.
  1343. */
  1344. function overArg(func, transform) {
  1345. return function(arg) {
  1346. return func(transform(arg));
  1347. };
  1348. }
  1349. //#endregion
  1350. //#region node_modules/lodash-es/_nativeKeys.js
  1351. var nativeKeys = overArg(Object.keys, Object);
  1352. //#endregion
  1353. //#region node_modules/lodash-es/_baseKeys.js
  1354. /** Used to check objects for own properties. */
  1355. var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
  1356. /**
  1357. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  1358. *
  1359. * @private
  1360. * @param {Object} object The object to query.
  1361. * @returns {Array} Returns the array of property names.
  1362. */
  1363. function baseKeys(object) {
  1364. if (!isPrototype(object)) return nativeKeys(object);
  1365. var result = [];
  1366. for (var key in Object(object)) if (hasOwnProperty$8.call(object, key) && key != "constructor") result.push(key);
  1367. return result;
  1368. }
  1369. //#endregion
  1370. //#region node_modules/lodash-es/keys.js
  1371. /**
  1372. * Creates an array of the own enumerable property names of `object`.
  1373. *
  1374. * **Note:** Non-object values are coerced to objects. See the
  1375. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1376. * for more details.
  1377. *
  1378. * @static
  1379. * @since 0.1.0
  1380. * @memberOf _
  1381. * @category Object
  1382. * @param {Object} object The object to query.
  1383. * @returns {Array} Returns the array of property names.
  1384. * @example
  1385. *
  1386. * function Foo() {
  1387. * this.a = 1;
  1388. * this.b = 2;
  1389. * }
  1390. *
  1391. * Foo.prototype.c = 3;
  1392. *
  1393. * _.keys(new Foo);
  1394. * // => ['a', 'b'] (iteration order is not guaranteed)
  1395. *
  1396. * _.keys('hi');
  1397. * // => ['0', '1']
  1398. */
  1399. function keys(object) {
  1400. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  1401. }
  1402. //#endregion
  1403. //#region node_modules/lodash-es/_nativeKeysIn.js
  1404. /**
  1405. * This function is like
  1406. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1407. * except that it includes inherited enumerable properties.
  1408. *
  1409. * @private
  1410. * @param {Object} object The object to query.
  1411. * @returns {Array} Returns the array of property names.
  1412. */
  1413. function nativeKeysIn(object) {
  1414. var result = [];
  1415. if (object != null) for (var key in Object(object)) result.push(key);
  1416. return result;
  1417. }
  1418. //#endregion
  1419. //#region node_modules/lodash-es/_baseKeysIn.js
  1420. /** Used to check objects for own properties. */
  1421. var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
  1422. /**
  1423. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  1424. *
  1425. * @private
  1426. * @param {Object} object The object to query.
  1427. * @returns {Array} Returns the array of property names.
  1428. */
  1429. function baseKeysIn(object) {
  1430. if (!isObject$1(object)) return nativeKeysIn(object);
  1431. var isProto = isPrototype(object), result = [];
  1432. for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$7.call(object, key)))) result.push(key);
  1433. return result;
  1434. }
  1435. //#endregion
  1436. //#region node_modules/lodash-es/keysIn.js
  1437. /**
  1438. * Creates an array of the own and inherited enumerable property names of `object`.
  1439. *
  1440. * **Note:** Non-object values are coerced to objects.
  1441. *
  1442. * @static
  1443. * @memberOf _
  1444. * @since 3.0.0
  1445. * @category Object
  1446. * @param {Object} object The object to query.
  1447. * @returns {Array} Returns the array of property names.
  1448. * @example
  1449. *
  1450. * function Foo() {
  1451. * this.a = 1;
  1452. * this.b = 2;
  1453. * }
  1454. *
  1455. * Foo.prototype.c = 3;
  1456. *
  1457. * _.keysIn(new Foo);
  1458. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  1459. */
  1460. function keysIn(object) {
  1461. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  1462. }
  1463. //#endregion
  1464. //#region node_modules/lodash-es/_isKey.js
  1465. /** Used to match property names within property paths. */
  1466. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
  1467. /**
  1468. * Checks if `value` is a property name and not a property path.
  1469. *
  1470. * @private
  1471. * @param {*} value The value to check.
  1472. * @param {Object} [object] The object to query keys on.
  1473. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  1474. */
  1475. function isKey(value, object) {
  1476. if (isArray(value)) return false;
  1477. var type = typeof value;
  1478. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
  1479. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  1480. }
  1481. //#endregion
  1482. //#region node_modules/lodash-es/_nativeCreate.js
  1483. var nativeCreate = getNative(Object, "create");
  1484. //#endregion
  1485. //#region node_modules/lodash-es/_hashClear.js
  1486. /**
  1487. * Removes all key-value entries from the hash.
  1488. *
  1489. * @private
  1490. * @name clear
  1491. * @memberOf Hash
  1492. */
  1493. function hashClear() {
  1494. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  1495. this.size = 0;
  1496. }
  1497. //#endregion
  1498. //#region node_modules/lodash-es/_hashDelete.js
  1499. /**
  1500. * Removes `key` and its value from the hash.
  1501. *
  1502. * @private
  1503. * @name delete
  1504. * @memberOf Hash
  1505. * @param {Object} hash The hash to modify.
  1506. * @param {string} key The key of the value to remove.
  1507. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1508. */
  1509. function hashDelete(key) {
  1510. var result = this.has(key) && delete this.__data__[key];
  1511. this.size -= result ? 1 : 0;
  1512. return result;
  1513. }
  1514. //#endregion
  1515. //#region node_modules/lodash-es/_hashGet.js
  1516. /** Used to stand-in for `undefined` hash values. */
  1517. var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
  1518. /** Used to check objects for own properties. */
  1519. var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
  1520. /**
  1521. * Gets the hash value for `key`.
  1522. *
  1523. * @private
  1524. * @name get
  1525. * @memberOf Hash
  1526. * @param {string} key The key of the value to get.
  1527. * @returns {*} Returns the entry value.
  1528. */
  1529. function hashGet(key) {
  1530. var data = this.__data__;
  1531. if (nativeCreate) {
  1532. var result = data[key];
  1533. return result === HASH_UNDEFINED$2 ? void 0 : result;
  1534. }
  1535. return hasOwnProperty$6.call(data, key) ? data[key] : void 0;
  1536. }
  1537. //#endregion
  1538. //#region node_modules/lodash-es/_hashHas.js
  1539. /** Used to check objects for own properties. */
  1540. var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
  1541. /**
  1542. * Checks if a hash value for `key` exists.
  1543. *
  1544. * @private
  1545. * @name has
  1546. * @memberOf Hash
  1547. * @param {string} key The key of the entry to check.
  1548. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1549. */
  1550. function hashHas(key) {
  1551. var data = this.__data__;
  1552. return nativeCreate ? data[key] !== void 0 : hasOwnProperty$5.call(data, key);
  1553. }
  1554. //#endregion
  1555. //#region node_modules/lodash-es/_hashSet.js
  1556. /** Used to stand-in for `undefined` hash values. */
  1557. var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
  1558. /**
  1559. * Sets the hash `key` to `value`.
  1560. *
  1561. * @private
  1562. * @name set
  1563. * @memberOf Hash
  1564. * @param {string} key The key of the value to set.
  1565. * @param {*} value The value to set.
  1566. * @returns {Object} Returns the hash instance.
  1567. */
  1568. function hashSet(key, value) {
  1569. var data = this.__data__;
  1570. this.size += this.has(key) ? 0 : 1;
  1571. data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
  1572. return this;
  1573. }
  1574. //#endregion
  1575. //#region node_modules/lodash-es/_Hash.js
  1576. /**
  1577. * Creates a hash object.
  1578. *
  1579. * @private
  1580. * @constructor
  1581. * @param {Array} [entries] The key-value pairs to cache.
  1582. */
  1583. function Hash(entries) {
  1584. var index = -1, length = entries == null ? 0 : entries.length;
  1585. this.clear();
  1586. while (++index < length) {
  1587. var entry = entries[index];
  1588. this.set(entry[0], entry[1]);
  1589. }
  1590. }
  1591. Hash.prototype.clear = hashClear;
  1592. Hash.prototype["delete"] = hashDelete;
  1593. Hash.prototype.get = hashGet;
  1594. Hash.prototype.has = hashHas;
  1595. Hash.prototype.set = hashSet;
  1596. //#endregion
  1597. //#region node_modules/lodash-es/_listCacheClear.js
  1598. /**
  1599. * Removes all key-value entries from the list cache.
  1600. *
  1601. * @private
  1602. * @name clear
  1603. * @memberOf ListCache
  1604. */
  1605. function listCacheClear() {
  1606. this.__data__ = [];
  1607. this.size = 0;
  1608. }
  1609. //#endregion
  1610. //#region node_modules/lodash-es/_assocIndexOf.js
  1611. /**
  1612. * Gets the index at which the `key` is found in `array` of key-value pairs.
  1613. *
  1614. * @private
  1615. * @param {Array} array The array to inspect.
  1616. * @param {*} key The key to search for.
  1617. * @returns {number} Returns the index of the matched value, else `-1`.
  1618. */
  1619. function assocIndexOf(array, key) {
  1620. var length = array.length;
  1621. while (length--) if (eq(array[length][0], key)) return length;
  1622. return -1;
  1623. }
  1624. //#endregion
  1625. //#region node_modules/lodash-es/_listCacheDelete.js
  1626. /** Built-in value references. */
  1627. var splice = Array.prototype.splice;
  1628. /**
  1629. * Removes `key` and its value from the list cache.
  1630. *
  1631. * @private
  1632. * @name delete
  1633. * @memberOf ListCache
  1634. * @param {string} key The key of the value to remove.
  1635. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1636. */
  1637. function listCacheDelete(key) {
  1638. var data = this.__data__, index = assocIndexOf(data, key);
  1639. if (index < 0) return false;
  1640. if (index == data.length - 1) data.pop();
  1641. else splice.call(data, index, 1);
  1642. --this.size;
  1643. return true;
  1644. }
  1645. //#endregion
  1646. //#region node_modules/lodash-es/_listCacheGet.js
  1647. /**
  1648. * Gets the list cache value for `key`.
  1649. *
  1650. * @private
  1651. * @name get
  1652. * @memberOf ListCache
  1653. * @param {string} key The key of the value to get.
  1654. * @returns {*} Returns the entry value.
  1655. */
  1656. function listCacheGet(key) {
  1657. var data = this.__data__, index = assocIndexOf(data, key);
  1658. return index < 0 ? void 0 : data[index][1];
  1659. }
  1660. //#endregion
  1661. //#region node_modules/lodash-es/_listCacheHas.js
  1662. /**
  1663. * Checks if a list cache value for `key` exists.
  1664. *
  1665. * @private
  1666. * @name has
  1667. * @memberOf ListCache
  1668. * @param {string} key The key of the entry to check.
  1669. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1670. */
  1671. function listCacheHas(key) {
  1672. return assocIndexOf(this.__data__, key) > -1;
  1673. }
  1674. //#endregion
  1675. //#region node_modules/lodash-es/_listCacheSet.js
  1676. /**
  1677. * Sets the list cache `key` to `value`.
  1678. *
  1679. * @private
  1680. * @name set
  1681. * @memberOf ListCache
  1682. * @param {string} key The key of the value to set.
  1683. * @param {*} value The value to set.
  1684. * @returns {Object} Returns the list cache instance.
  1685. */
  1686. function listCacheSet(key, value) {
  1687. var data = this.__data__, index = assocIndexOf(data, key);
  1688. if (index < 0) {
  1689. ++this.size;
  1690. data.push([key, value]);
  1691. } else data[index][1] = value;
  1692. return this;
  1693. }
  1694. //#endregion
  1695. //#region node_modules/lodash-es/_ListCache.js
  1696. /**
  1697. * Creates an list cache object.
  1698. *
  1699. * @private
  1700. * @constructor
  1701. * @param {Array} [entries] The key-value pairs to cache.
  1702. */
  1703. function ListCache(entries) {
  1704. var index = -1, length = entries == null ? 0 : entries.length;
  1705. this.clear();
  1706. while (++index < length) {
  1707. var entry = entries[index];
  1708. this.set(entry[0], entry[1]);
  1709. }
  1710. }
  1711. ListCache.prototype.clear = listCacheClear;
  1712. ListCache.prototype["delete"] = listCacheDelete;
  1713. ListCache.prototype.get = listCacheGet;
  1714. ListCache.prototype.has = listCacheHas;
  1715. ListCache.prototype.set = listCacheSet;
  1716. //#endregion
  1717. //#region node_modules/lodash-es/_Map.js
  1718. var Map$1 = getNative(root, "Map");
  1719. //#endregion
  1720. //#region node_modules/lodash-es/_mapCacheClear.js
  1721. /**
  1722. * Removes all key-value entries from the map.
  1723. *
  1724. * @private
  1725. * @name clear
  1726. * @memberOf MapCache
  1727. */
  1728. function mapCacheClear() {
  1729. this.size = 0;
  1730. this.__data__ = {
  1731. "hash": new Hash(),
  1732. "map": new (Map$1 || ListCache)(),
  1733. "string": new Hash()
  1734. };
  1735. }
  1736. //#endregion
  1737. //#region node_modules/lodash-es/_isKeyable.js
  1738. /**
  1739. * Checks if `value` is suitable for use as unique object key.
  1740. *
  1741. * @private
  1742. * @param {*} value The value to check.
  1743. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  1744. */
  1745. function isKeyable(value) {
  1746. var type = typeof value;
  1747. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  1748. }
  1749. //#endregion
  1750. //#region node_modules/lodash-es/_getMapData.js
  1751. /**
  1752. * Gets the data for `map`.
  1753. *
  1754. * @private
  1755. * @param {Object} map The map to query.
  1756. * @param {string} key The reference key.
  1757. * @returns {*} Returns the map data.
  1758. */
  1759. function getMapData(map, key) {
  1760. var data = map.__data__;
  1761. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  1762. }
  1763. //#endregion
  1764. //#region node_modules/lodash-es/_mapCacheDelete.js
  1765. /**
  1766. * Removes `key` and its value from the map.
  1767. *
  1768. * @private
  1769. * @name delete
  1770. * @memberOf MapCache
  1771. * @param {string} key The key of the value to remove.
  1772. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1773. */
  1774. function mapCacheDelete(key) {
  1775. var result = getMapData(this, key)["delete"](key);
  1776. this.size -= result ? 1 : 0;
  1777. return result;
  1778. }
  1779. //#endregion
  1780. //#region node_modules/lodash-es/_mapCacheGet.js
  1781. /**
  1782. * Gets the map value for `key`.
  1783. *
  1784. * @private
  1785. * @name get
  1786. * @memberOf MapCache
  1787. * @param {string} key The key of the value to get.
  1788. * @returns {*} Returns the entry value.
  1789. */
  1790. function mapCacheGet(key) {
  1791. return getMapData(this, key).get(key);
  1792. }
  1793. //#endregion
  1794. //#region node_modules/lodash-es/_mapCacheHas.js
  1795. /**
  1796. * Checks if a map value for `key` exists.
  1797. *
  1798. * @private
  1799. * @name has
  1800. * @memberOf MapCache
  1801. * @param {string} key The key of the entry to check.
  1802. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1803. */
  1804. function mapCacheHas(key) {
  1805. return getMapData(this, key).has(key);
  1806. }
  1807. //#endregion
  1808. //#region node_modules/lodash-es/_mapCacheSet.js
  1809. /**
  1810. * Sets the map `key` to `value`.
  1811. *
  1812. * @private
  1813. * @name set
  1814. * @memberOf MapCache
  1815. * @param {string} key The key of the value to set.
  1816. * @param {*} value The value to set.
  1817. * @returns {Object} Returns the map cache instance.
  1818. */
  1819. function mapCacheSet(key, value) {
  1820. var data = getMapData(this, key), size = data.size;
  1821. data.set(key, value);
  1822. this.size += data.size == size ? 0 : 1;
  1823. return this;
  1824. }
  1825. //#endregion
  1826. //#region node_modules/lodash-es/_MapCache.js
  1827. /**
  1828. * Creates a map cache object to store key-value pairs.
  1829. *
  1830. * @private
  1831. * @constructor
  1832. * @param {Array} [entries] The key-value pairs to cache.
  1833. */
  1834. function MapCache(entries) {
  1835. var index = -1, length = entries == null ? 0 : entries.length;
  1836. this.clear();
  1837. while (++index < length) {
  1838. var entry = entries[index];
  1839. this.set(entry[0], entry[1]);
  1840. }
  1841. }
  1842. MapCache.prototype.clear = mapCacheClear;
  1843. MapCache.prototype["delete"] = mapCacheDelete;
  1844. MapCache.prototype.get = mapCacheGet;
  1845. MapCache.prototype.has = mapCacheHas;
  1846. MapCache.prototype.set = mapCacheSet;
  1847. //#endregion
  1848. //#region node_modules/lodash-es/memoize.js
  1849. /** Error message constants. */
  1850. var FUNC_ERROR_TEXT$2 = "Expected a function";
  1851. /**
  1852. * Creates a function that memoizes the result of `func`. If `resolver` is
  1853. * provided, it determines the cache key for storing the result based on the
  1854. * arguments provided to the memoized function. By default, the first argument
  1855. * provided to the memoized function is used as the map cache key. The `func`
  1856. * is invoked with the `this` binding of the memoized function.
  1857. *
  1858. * **Note:** The cache is exposed as the `cache` property on the memoized
  1859. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  1860. * constructor with one whose instances implement the
  1861. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  1862. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  1863. *
  1864. * @static
  1865. * @memberOf _
  1866. * @since 0.1.0
  1867. * @category Function
  1868. * @param {Function} func The function to have its output memoized.
  1869. * @param {Function} [resolver] The function to resolve the cache key.
  1870. * @returns {Function} Returns the new memoized function.
  1871. * @example
  1872. *
  1873. * var object = { 'a': 1, 'b': 2 };
  1874. * var other = { 'c': 3, 'd': 4 };
  1875. *
  1876. * var values = _.memoize(_.values);
  1877. * values(object);
  1878. * // => [1, 2]
  1879. *
  1880. * values(other);
  1881. * // => [3, 4]
  1882. *
  1883. * object.a = 2;
  1884. * values(object);
  1885. * // => [1, 2]
  1886. *
  1887. * // Modify the result cache.
  1888. * values.cache.set(object, ['a', 'b']);
  1889. * values(object);
  1890. * // => ['a', 'b']
  1891. *
  1892. * // Replace `_.memoize.Cache`.
  1893. * _.memoize.Cache = WeakMap;
  1894. */
  1895. function memoize(func, resolver) {
  1896. if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT$2);
  1897. var memoized = function() {
  1898. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  1899. if (cache.has(key)) return cache.get(key);
  1900. var result = func.apply(this, args);
  1901. memoized.cache = cache.set(key, result) || cache;
  1902. return result;
  1903. };
  1904. memoized.cache = new (memoize.Cache || MapCache)();
  1905. return memoized;
  1906. }
  1907. memoize.Cache = MapCache;
  1908. //#endregion
  1909. //#region node_modules/lodash-es/_memoizeCapped.js
  1910. /** Used as the maximum memoize cache size. */
  1911. var MAX_MEMOIZE_SIZE = 500;
  1912. /**
  1913. * A specialized version of `_.memoize` which clears the memoized function's
  1914. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  1915. *
  1916. * @private
  1917. * @param {Function} func The function to have its output memoized.
  1918. * @returns {Function} Returns the new memoized function.
  1919. */
  1920. function memoizeCapped(func) {
  1921. var result = memoize(func, function(key) {
  1922. if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
  1923. return key;
  1924. });
  1925. var cache = result.cache;
  1926. return result;
  1927. }
  1928. //#endregion
  1929. //#region node_modules/lodash-es/_stringToPath.js
  1930. /** Used to match property names within property paths. */
  1931. var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1932. /** Used to match backslashes in property paths. */
  1933. var reEscapeChar = /\\(\\)?/g;
  1934. /**
  1935. * Converts `string` to a property path array.
  1936. *
  1937. * @private
  1938. * @param {string} string The string to convert.
  1939. * @returns {Array} Returns the property path array.
  1940. */
  1941. var stringToPath = memoizeCapped(function(string) {
  1942. var result = [];
  1943. if (string.charCodeAt(0) === 46) result.push("");
  1944. string.replace(rePropName, function(match, number, quote, subString) {
  1945. result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  1946. });
  1947. return result;
  1948. });
  1949. //#endregion
  1950. //#region node_modules/lodash-es/toString.js
  1951. /**
  1952. * Converts `value` to a string. An empty string is returned for `null`
  1953. * and `undefined` values. The sign of `-0` is preserved.
  1954. *
  1955. * @static
  1956. * @memberOf _
  1957. * @since 4.0.0
  1958. * @category Lang
  1959. * @param {*} value The value to convert.
  1960. * @returns {string} Returns the converted string.
  1961. * @example
  1962. *
  1963. * _.toString(null);
  1964. * // => ''
  1965. *
  1966. * _.toString(-0);
  1967. * // => '-0'
  1968. *
  1969. * _.toString([1, 2, 3]);
  1970. * // => '1,2,3'
  1971. */
  1972. function toString$1(value) {
  1973. return value == null ? "" : baseToString(value);
  1974. }
  1975. //#endregion
  1976. //#region node_modules/lodash-es/_castPath.js
  1977. /**
  1978. * Casts `value` to a path array if it's not one.
  1979. *
  1980. * @private
  1981. * @param {*} value The value to inspect.
  1982. * @param {Object} [object] The object to query keys on.
  1983. * @returns {Array} Returns the cast property path array.
  1984. */
  1985. function castPath(value, object) {
  1986. if (isArray(value)) return value;
  1987. return isKey(value, object) ? [value] : stringToPath(toString$1(value));
  1988. }
  1989. //#endregion
  1990. //#region node_modules/lodash-es/_toKey.js
  1991. /** Used as references for various `Number` constants. */
  1992. var INFINITY$1 = Infinity;
  1993. /**
  1994. * Converts `value` to a string key if it's not a string or symbol.
  1995. *
  1996. * @private
  1997. * @param {*} value The value to inspect.
  1998. * @returns {string|symbol} Returns the key.
  1999. */
  2000. function toKey(value) {
  2001. if (typeof value == "string" || isSymbol(value)) return value;
  2002. var result = value + "";
  2003. return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
  2004. }
  2005. //#endregion
  2006. //#region node_modules/lodash-es/_baseGet.js
  2007. /**
  2008. * The base implementation of `_.get` without support for default values.
  2009. *
  2010. * @private
  2011. * @param {Object} object The object to query.
  2012. * @param {Array|string} path The path of the property to get.
  2013. * @returns {*} Returns the resolved value.
  2014. */
  2015. function baseGet(object, path) {
  2016. path = castPath(path, object);
  2017. var index = 0, length = path.length;
  2018. while (object != null && index < length) object = object[toKey(path[index++])];
  2019. return index && index == length ? object : void 0;
  2020. }
  2021. //#endregion
  2022. //#region node_modules/lodash-es/get.js
  2023. /**
  2024. * Gets the value at `path` of `object`. If the resolved value is
  2025. * `undefined`, the `defaultValue` is returned in its place.
  2026. *
  2027. * @static
  2028. * @memberOf _
  2029. * @since 3.7.0
  2030. * @category Object
  2031. * @param {Object} object The object to query.
  2032. * @param {Array|string} path The path of the property to get.
  2033. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  2034. * @returns {*} Returns the resolved value.
  2035. * @example
  2036. *
  2037. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  2038. *
  2039. * _.get(object, 'a[0].b.c');
  2040. * // => 3
  2041. *
  2042. * _.get(object, ['a', '0', 'b', 'c']);
  2043. * // => 3
  2044. *
  2045. * _.get(object, 'a.b.c', 'default');
  2046. * // => 'default'
  2047. */
  2048. function get(object, path, defaultValue) {
  2049. var result = object == null ? void 0 : baseGet(object, path);
  2050. return result === void 0 ? defaultValue : result;
  2051. }
  2052. //#endregion
  2053. //#region node_modules/lodash-es/_arrayPush.js
  2054. /**
  2055. * Appends the elements of `values` to `array`.
  2056. *
  2057. * @private
  2058. * @param {Array} array The array to modify.
  2059. * @param {Array} values The values to append.
  2060. * @returns {Array} Returns `array`.
  2061. */
  2062. function arrayPush(array, values) {
  2063. var index = -1, length = values.length, offset = array.length;
  2064. while (++index < length) array[offset + index] = values[index];
  2065. return array;
  2066. }
  2067. //#endregion
  2068. //#region node_modules/lodash-es/_isFlattenable.js
  2069. /** Built-in value references. */
  2070. var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
  2071. /**
  2072. * Checks if `value` is a flattenable `arguments` object or array.
  2073. *
  2074. * @private
  2075. * @param {*} value The value to check.
  2076. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  2077. */
  2078. function isFlattenable(value) {
  2079. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  2080. }
  2081. //#endregion
  2082. //#region node_modules/lodash-es/_baseFlatten.js
  2083. /**
  2084. * The base implementation of `_.flatten` with support for restricting flattening.
  2085. *
  2086. * @private
  2087. * @param {Array} array The array to flatten.
  2088. * @param {number} depth The maximum recursion depth.
  2089. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  2090. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  2091. * @param {Array} [result=[]] The initial result value.
  2092. * @returns {Array} Returns the new flattened array.
  2093. */
  2094. function baseFlatten(array, depth, predicate, isStrict, result) {
  2095. var index = -1, length = array.length;
  2096. predicate || (predicate = isFlattenable);
  2097. result || (result = []);
  2098. while (++index < length) {
  2099. var value = array[index];
  2100. if (depth > 0 && predicate(value)) if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
  2101. else arrayPush(result, value);
  2102. else if (!isStrict) result[result.length] = value;
  2103. }
  2104. return result;
  2105. }
  2106. //#endregion
  2107. //#region node_modules/lodash-es/flatten.js
  2108. /**
  2109. * Flattens `array` a single level deep.
  2110. *
  2111. * @static
  2112. * @memberOf _
  2113. * @since 0.1.0
  2114. * @category Array
  2115. * @param {Array} array The array to flatten.
  2116. * @returns {Array} Returns the new flattened array.
  2117. * @example
  2118. *
  2119. * _.flatten([1, [2, [3, [4]], 5]]);
  2120. * // => [1, 2, [3, [4]], 5]
  2121. */
  2122. function flatten(array) {
  2123. return (array == null ? 0 : array.length) ? baseFlatten(array, 1) : [];
  2124. }
  2125. //#endregion
  2126. //#region node_modules/lodash-es/_flatRest.js
  2127. /**
  2128. * A specialized version of `baseRest` which flattens the rest array.
  2129. *
  2130. * @private
  2131. * @param {Function} func The function to apply a rest parameter to.
  2132. * @returns {Function} Returns the new function.
  2133. */
  2134. function flatRest(func) {
  2135. return setToString(overRest(func, void 0, flatten), func + "");
  2136. }
  2137. //#endregion
  2138. //#region node_modules/lodash-es/_getPrototype.js
  2139. /** Built-in value references. */
  2140. var getPrototype = overArg(Object.getPrototypeOf, Object);
  2141. //#endregion
  2142. //#region node_modules/lodash-es/isPlainObject.js
  2143. /** `Object#toString` result references. */
  2144. var objectTag$3 = "[object Object]";
  2145. /** Used for built-in method references. */
  2146. var funcProto = Function.prototype, objectProto = Object.prototype;
  2147. /** Used to resolve the decompiled source of functions. */
  2148. var funcToString = funcProto.toString;
  2149. /** Used to check objects for own properties. */
  2150. var hasOwnProperty$4 = objectProto.hasOwnProperty;
  2151. /** Used to infer the `Object` constructor. */
  2152. var objectCtorString = funcToString.call(Object);
  2153. /**
  2154. * Checks if `value` is a plain object, that is, an object created by the
  2155. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  2156. *
  2157. * @static
  2158. * @memberOf _
  2159. * @since 0.8.0
  2160. * @category Lang
  2161. * @param {*} value The value to check.
  2162. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  2163. * @example
  2164. *
  2165. * function Foo() {
  2166. * this.a = 1;
  2167. * }
  2168. *
  2169. * _.isPlainObject(new Foo);
  2170. * // => false
  2171. *
  2172. * _.isPlainObject([1, 2, 3]);
  2173. * // => false
  2174. *
  2175. * _.isPlainObject({ 'x': 0, 'y': 0 });
  2176. * // => true
  2177. *
  2178. * _.isPlainObject(Object.create(null));
  2179. * // => true
  2180. */
  2181. function isPlainObject(value) {
  2182. if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) return false;
  2183. var proto = getPrototype(value);
  2184. if (proto === null) return true;
  2185. var Ctor = hasOwnProperty$4.call(proto, "constructor") && proto.constructor;
  2186. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  2187. }
  2188. //#endregion
  2189. //#region node_modules/lodash-es/_baseSlice.js
  2190. /**
  2191. * The base implementation of `_.slice` without an iteratee call guard.
  2192. *
  2193. * @private
  2194. * @param {Array} array The array to slice.
  2195. * @param {number} [start=0] The start position.
  2196. * @param {number} [end=array.length] The end position.
  2197. * @returns {Array} Returns the slice of `array`.
  2198. */
  2199. function baseSlice(array, start, end) {
  2200. var index = -1, length = array.length;
  2201. if (start < 0) start = -start > length ? 0 : length + start;
  2202. end = end > length ? length : end;
  2203. if (end < 0) end += length;
  2204. length = start > end ? 0 : end - start >>> 0;
  2205. start >>>= 0;
  2206. var result = Array(length);
  2207. while (++index < length) result[index] = array[index + start];
  2208. return result;
  2209. }
  2210. //#endregion
  2211. //#region node_modules/lodash-es/castArray.js
  2212. /**
  2213. * Casts `value` as an array if it's not one.
  2214. *
  2215. * @static
  2216. * @memberOf _
  2217. * @since 4.4.0
  2218. * @category Lang
  2219. * @param {*} value The value to inspect.
  2220. * @returns {Array} Returns the cast array.
  2221. * @example
  2222. *
  2223. * _.castArray(1);
  2224. * // => [1]
  2225. *
  2226. * _.castArray({ 'a': 1 });
  2227. * // => [{ 'a': 1 }]
  2228. *
  2229. * _.castArray('abc');
  2230. * // => ['abc']
  2231. *
  2232. * _.castArray(null);
  2233. * // => [null]
  2234. *
  2235. * _.castArray(undefined);
  2236. * // => [undefined]
  2237. *
  2238. * _.castArray();
  2239. * // => []
  2240. *
  2241. * var array = [1, 2, 3];
  2242. * console.log(_.castArray(array) === array);
  2243. * // => true
  2244. */
  2245. function castArray$1() {
  2246. if (!arguments.length) return [];
  2247. var value = arguments[0];
  2248. return isArray(value) ? value : [value];
  2249. }
  2250. //#endregion
  2251. //#region node_modules/lodash-es/_baseClamp.js
  2252. /**
  2253. * The base implementation of `_.clamp` which doesn't coerce arguments.
  2254. *
  2255. * @private
  2256. * @param {number} number The number to clamp.
  2257. * @param {number} [lower] The lower bound.
  2258. * @param {number} upper The upper bound.
  2259. * @returns {number} Returns the clamped number.
  2260. */
  2261. function baseClamp(number, lower, upper) {
  2262. if (number === number) {
  2263. if (upper !== void 0) number = number <= upper ? number : upper;
  2264. if (lower !== void 0) number = number >= lower ? number : lower;
  2265. }
  2266. return number;
  2267. }
  2268. //#endregion
  2269. //#region node_modules/lodash-es/clamp.js
  2270. /**
  2271. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  2272. *
  2273. * @static
  2274. * @memberOf _
  2275. * @since 4.0.0
  2276. * @category Number
  2277. * @param {number} number The number to clamp.
  2278. * @param {number} [lower] The lower bound.
  2279. * @param {number} upper The upper bound.
  2280. * @returns {number} Returns the clamped number.
  2281. * @example
  2282. *
  2283. * _.clamp(-10, -5, 5);
  2284. * // => -5
  2285. *
  2286. * _.clamp(10, -5, 5);
  2287. * // => 5
  2288. */
  2289. function clamp$2(number, lower, upper) {
  2290. if (upper === void 0) {
  2291. upper = lower;
  2292. lower = void 0;
  2293. }
  2294. if (upper !== void 0) {
  2295. upper = toNumber(upper);
  2296. upper = upper === upper ? upper : 0;
  2297. }
  2298. if (lower !== void 0) {
  2299. lower = toNumber(lower);
  2300. lower = lower === lower ? lower : 0;
  2301. }
  2302. return baseClamp(toNumber(number), lower, upper);
  2303. }
  2304. //#endregion
  2305. //#region node_modules/lodash-es/_stackClear.js
  2306. /**
  2307. * Removes all key-value entries from the stack.
  2308. *
  2309. * @private
  2310. * @name clear
  2311. * @memberOf Stack
  2312. */
  2313. function stackClear() {
  2314. this.__data__ = new ListCache();
  2315. this.size = 0;
  2316. }
  2317. //#endregion
  2318. //#region node_modules/lodash-es/_stackDelete.js
  2319. /**
  2320. * Removes `key` and its value from the stack.
  2321. *
  2322. * @private
  2323. * @name delete
  2324. * @memberOf Stack
  2325. * @param {string} key The key of the value to remove.
  2326. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2327. */
  2328. function stackDelete(key) {
  2329. var data = this.__data__, result = data["delete"](key);
  2330. this.size = data.size;
  2331. return result;
  2332. }
  2333. //#endregion
  2334. //#region node_modules/lodash-es/_stackGet.js
  2335. /**
  2336. * Gets the stack value for `key`.
  2337. *
  2338. * @private
  2339. * @name get
  2340. * @memberOf Stack
  2341. * @param {string} key The key of the value to get.
  2342. * @returns {*} Returns the entry value.
  2343. */
  2344. function stackGet(key) {
  2345. return this.__data__.get(key);
  2346. }
  2347. //#endregion
  2348. //#region node_modules/lodash-es/_stackHas.js
  2349. /**
  2350. * Checks if a stack value for `key` exists.
  2351. *
  2352. * @private
  2353. * @name has
  2354. * @memberOf Stack
  2355. * @param {string} key The key of the entry to check.
  2356. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2357. */
  2358. function stackHas(key) {
  2359. return this.__data__.has(key);
  2360. }
  2361. //#endregion
  2362. //#region node_modules/lodash-es/_stackSet.js
  2363. /** Used as the size to enable large array optimizations. */
  2364. var LARGE_ARRAY_SIZE$1 = 200;
  2365. /**
  2366. * Sets the stack `key` to `value`.
  2367. *
  2368. * @private
  2369. * @name set
  2370. * @memberOf Stack
  2371. * @param {string} key The key of the value to set.
  2372. * @param {*} value The value to set.
  2373. * @returns {Object} Returns the stack cache instance.
  2374. */
  2375. function stackSet(key, value) {
  2376. var data = this.__data__;
  2377. if (data instanceof ListCache) {
  2378. var pairs = data.__data__;
  2379. if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
  2380. pairs.push([key, value]);
  2381. this.size = ++data.size;
  2382. return this;
  2383. }
  2384. data = this.__data__ = new MapCache(pairs);
  2385. }
  2386. data.set(key, value);
  2387. this.size = data.size;
  2388. return this;
  2389. }
  2390. //#endregion
  2391. //#region node_modules/lodash-es/_Stack.js
  2392. /**
  2393. * Creates a stack cache object to store key-value pairs.
  2394. *
  2395. * @private
  2396. * @constructor
  2397. * @param {Array} [entries] The key-value pairs to cache.
  2398. */
  2399. function Stack(entries) {
  2400. this.size = (this.__data__ = new ListCache(entries)).size;
  2401. }
  2402. Stack.prototype.clear = stackClear;
  2403. Stack.prototype["delete"] = stackDelete;
  2404. Stack.prototype.get = stackGet;
  2405. Stack.prototype.has = stackHas;
  2406. Stack.prototype.set = stackSet;
  2407. //#endregion
  2408. //#region node_modules/lodash-es/_baseAssign.js
  2409. /**
  2410. * The base implementation of `_.assign` without support for multiple sources
  2411. * or `customizer` functions.
  2412. *
  2413. * @private
  2414. * @param {Object} object The destination object.
  2415. * @param {Object} source The source object.
  2416. * @returns {Object} Returns `object`.
  2417. */
  2418. function baseAssign(object, source) {
  2419. return object && copyObject(source, keys(source), object);
  2420. }
  2421. //#endregion
  2422. //#region node_modules/lodash-es/_baseAssignIn.js
  2423. /**
  2424. * The base implementation of `_.assignIn` without support for multiple sources
  2425. * or `customizer` functions.
  2426. *
  2427. * @private
  2428. * @param {Object} object The destination object.
  2429. * @param {Object} source The source object.
  2430. * @returns {Object} Returns `object`.
  2431. */
  2432. function baseAssignIn(object, source) {
  2433. return object && copyObject(source, keysIn(source), object);
  2434. }
  2435. //#endregion
  2436. //#region node_modules/lodash-es/_cloneBuffer.js
  2437. /** Detect free variable `exports`. */
  2438. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  2439. /** Detect free variable `module`. */
  2440. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  2441. /** Built-in value references. */
  2442. var Buffer$1 = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0;
  2443. /**
  2444. * Creates a clone of `buffer`.
  2445. *
  2446. * @private
  2447. * @param {Buffer} buffer The buffer to clone.
  2448. * @param {boolean} [isDeep] Specify a deep clone.
  2449. * @returns {Buffer} Returns the cloned buffer.
  2450. */
  2451. function cloneBuffer(buffer, isDeep) {
  2452. if (isDeep) return buffer.slice();
  2453. var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  2454. buffer.copy(result);
  2455. return result;
  2456. }
  2457. //#endregion
  2458. //#region node_modules/lodash-es/_arrayFilter.js
  2459. /**
  2460. * A specialized version of `_.filter` for arrays without support for
  2461. * iteratee shorthands.
  2462. *
  2463. * @private
  2464. * @param {Array} [array] The array to iterate over.
  2465. * @param {Function} predicate The function invoked per iteration.
  2466. * @returns {Array} Returns the new filtered array.
  2467. */
  2468. function arrayFilter(array, predicate) {
  2469. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  2470. while (++index < length) {
  2471. var value = array[index];
  2472. if (predicate(value, index, array)) result[resIndex++] = value;
  2473. }
  2474. return result;
  2475. }
  2476. //#endregion
  2477. //#region node_modules/lodash-es/stubArray.js
  2478. /**
  2479. * This method returns a new empty array.
  2480. *
  2481. * @static
  2482. * @memberOf _
  2483. * @since 4.13.0
  2484. * @category Util
  2485. * @returns {Array} Returns the new empty array.
  2486. * @example
  2487. *
  2488. * var arrays = _.times(2, _.stubArray);
  2489. *
  2490. * console.log(arrays);
  2491. * // => [[], []]
  2492. *
  2493. * console.log(arrays[0] === arrays[1]);
  2494. * // => false
  2495. */
  2496. function stubArray() {
  2497. return [];
  2498. }
  2499. //#endregion
  2500. //#region node_modules/lodash-es/_getSymbols.js
  2501. /** Built-in value references. */
  2502. var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
  2503. var nativeGetSymbols = Object.getOwnPropertySymbols;
  2504. /**
  2505. * Creates an array of the own enumerable symbols of `object`.
  2506. *
  2507. * @private
  2508. * @param {Object} object The object to query.
  2509. * @returns {Array} Returns the array of symbols.
  2510. */
  2511. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  2512. if (object == null) return [];
  2513. object = Object(object);
  2514. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  2515. return propertyIsEnumerable.call(object, symbol);
  2516. });
  2517. };
  2518. //#endregion
  2519. //#region node_modules/lodash-es/_copySymbols.js
  2520. /**
  2521. * Copies own symbols of `source` to `object`.
  2522. *
  2523. * @private
  2524. * @param {Object} source The object to copy symbols from.
  2525. * @param {Object} [object={}] The object to copy symbols to.
  2526. * @returns {Object} Returns `object`.
  2527. */
  2528. function copySymbols(source, object) {
  2529. return copyObject(source, getSymbols(source), object);
  2530. }
  2531. //#endregion
  2532. //#region node_modules/lodash-es/_getSymbolsIn.js
  2533. /**
  2534. * Creates an array of the own and inherited enumerable symbols of `object`.
  2535. *
  2536. * @private
  2537. * @param {Object} object The object to query.
  2538. * @returns {Array} Returns the array of symbols.
  2539. */
  2540. var getSymbolsIn = !Object.getOwnPropertySymbols ? stubArray : function(object) {
  2541. var result = [];
  2542. while (object) {
  2543. arrayPush(result, getSymbols(object));
  2544. object = getPrototype(object);
  2545. }
  2546. return result;
  2547. };
  2548. //#endregion
  2549. //#region node_modules/lodash-es/_copySymbolsIn.js
  2550. /**
  2551. * Copies own and inherited symbols of `source` to `object`.
  2552. *
  2553. * @private
  2554. * @param {Object} source The object to copy symbols from.
  2555. * @param {Object} [object={}] The object to copy symbols to.
  2556. * @returns {Object} Returns `object`.
  2557. */
  2558. function copySymbolsIn(source, object) {
  2559. return copyObject(source, getSymbolsIn(source), object);
  2560. }
  2561. //#endregion
  2562. //#region node_modules/lodash-es/_baseGetAllKeys.js
  2563. /**
  2564. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  2565. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  2566. * symbols of `object`.
  2567. *
  2568. * @private
  2569. * @param {Object} object The object to query.
  2570. * @param {Function} keysFunc The function to get the keys of `object`.
  2571. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  2572. * @returns {Array} Returns the array of property names and symbols.
  2573. */
  2574. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  2575. var result = keysFunc(object);
  2576. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  2577. }
  2578. //#endregion
  2579. //#region node_modules/lodash-es/_getAllKeys.js
  2580. /**
  2581. * Creates an array of own enumerable property names and symbols of `object`.
  2582. *
  2583. * @private
  2584. * @param {Object} object The object to query.
  2585. * @returns {Array} Returns the array of property names and symbols.
  2586. */
  2587. function getAllKeys(object) {
  2588. return baseGetAllKeys(object, keys, getSymbols);
  2589. }
  2590. //#endregion
  2591. //#region node_modules/lodash-es/_getAllKeysIn.js
  2592. /**
  2593. * Creates an array of own and inherited enumerable property names and
  2594. * symbols of `object`.
  2595. *
  2596. * @private
  2597. * @param {Object} object The object to query.
  2598. * @returns {Array} Returns the array of property names and symbols.
  2599. */
  2600. function getAllKeysIn(object) {
  2601. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  2602. }
  2603. //#endregion
  2604. //#region node_modules/lodash-es/_DataView.js
  2605. var DataView = getNative(root, "DataView");
  2606. //#endregion
  2607. //#region node_modules/lodash-es/_Promise.js
  2608. var Promise$1 = getNative(root, "Promise");
  2609. //#endregion
  2610. //#region node_modules/lodash-es/_Set.js
  2611. var Set$1 = getNative(root, "Set");
  2612. //#endregion
  2613. //#region node_modules/lodash-es/_getTag.js
  2614. /** `Object#toString` result references. */
  2615. var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
  2616. var dataViewTag$3 = "[object DataView]";
  2617. /** Used to detect maps, sets, and weakmaps. */
  2618. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
  2619. /**
  2620. * Gets the `toStringTag` of `value`.
  2621. *
  2622. * @private
  2623. * @param {*} value The value to query.
  2624. * @returns {string} Returns the `toStringTag`.
  2625. */
  2626. var getTag = baseGetTag;
  2627. if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) getTag = function(value) {
  2628. var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  2629. if (ctorString) switch (ctorString) {
  2630. case dataViewCtorString: return dataViewTag$3;
  2631. case mapCtorString: return mapTag$4;
  2632. case promiseCtorString: return promiseTag;
  2633. case setCtorString: return setTag$4;
  2634. case weakMapCtorString: return weakMapTag$1;
  2635. }
  2636. return result;
  2637. };
  2638. var _getTag_default = getTag;
  2639. //#endregion
  2640. //#region node_modules/lodash-es/_initCloneArray.js
  2641. /** Used to check objects for own properties. */
  2642. var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  2643. /**
  2644. * Initializes an array clone.
  2645. *
  2646. * @private
  2647. * @param {Array} array The array to clone.
  2648. * @returns {Array} Returns the initialized clone.
  2649. */
  2650. function initCloneArray(array) {
  2651. var length = array.length, result = new array.constructor(length);
  2652. if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
  2653. result.index = array.index;
  2654. result.input = array.input;
  2655. }
  2656. return result;
  2657. }
  2658. //#endregion
  2659. //#region node_modules/lodash-es/_Uint8Array.js
  2660. /** Built-in value references. */
  2661. var Uint8Array$1 = root.Uint8Array;
  2662. //#endregion
  2663. //#region node_modules/lodash-es/_cloneArrayBuffer.js
  2664. /**
  2665. * Creates a clone of `arrayBuffer`.
  2666. *
  2667. * @private
  2668. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  2669. * @returns {ArrayBuffer} Returns the cloned array buffer.
  2670. */
  2671. function cloneArrayBuffer(arrayBuffer) {
  2672. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  2673. new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
  2674. return result;
  2675. }
  2676. //#endregion
  2677. //#region node_modules/lodash-es/_cloneDataView.js
  2678. /**
  2679. * Creates a clone of `dataView`.
  2680. *
  2681. * @private
  2682. * @param {Object} dataView The data view to clone.
  2683. * @param {boolean} [isDeep] Specify a deep clone.
  2684. * @returns {Object} Returns the cloned data view.
  2685. */
  2686. function cloneDataView(dataView, isDeep) {
  2687. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  2688. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  2689. }
  2690. //#endregion
  2691. //#region node_modules/lodash-es/_cloneRegExp.js
  2692. /** Used to match `RegExp` flags from their coerced string values. */
  2693. var reFlags = /\w*$/;
  2694. /**
  2695. * Creates a clone of `regexp`.
  2696. *
  2697. * @private
  2698. * @param {Object} regexp The regexp to clone.
  2699. * @returns {Object} Returns the cloned regexp.
  2700. */
  2701. function cloneRegExp(regexp) {
  2702. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  2703. result.lastIndex = regexp.lastIndex;
  2704. return result;
  2705. }
  2706. //#endregion
  2707. //#region node_modules/lodash-es/_cloneSymbol.js
  2708. /** Used to convert symbols to primitives and strings. */
  2709. var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
  2710. /**
  2711. * Creates a clone of the `symbol` object.
  2712. *
  2713. * @private
  2714. * @param {Object} symbol The symbol object to clone.
  2715. * @returns {Object} Returns the cloned symbol object.
  2716. */
  2717. function cloneSymbol(symbol) {
  2718. return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
  2719. }
  2720. //#endregion
  2721. //#region node_modules/lodash-es/_cloneTypedArray.js
  2722. /**
  2723. * Creates a clone of `typedArray`.
  2724. *
  2725. * @private
  2726. * @param {Object} typedArray The typed array to clone.
  2727. * @param {boolean} [isDeep] Specify a deep clone.
  2728. * @returns {Object} Returns the cloned typed array.
  2729. */
  2730. function cloneTypedArray(typedArray, isDeep) {
  2731. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  2732. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  2733. }
  2734. //#endregion
  2735. //#region node_modules/lodash-es/_initCloneByTag.js
  2736. /** `Object#toString` result references. */
  2737. var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
  2738. var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
  2739. /**
  2740. * Initializes an object clone based on its `toStringTag`.
  2741. *
  2742. * **Note:** This function only supports cloning values with tags of
  2743. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  2744. *
  2745. * @private
  2746. * @param {Object} object The object to clone.
  2747. * @param {string} tag The `toStringTag` of the object to clone.
  2748. * @param {boolean} [isDeep] Specify a deep clone.
  2749. * @returns {Object} Returns the initialized clone.
  2750. */
  2751. function initCloneByTag(object, tag, isDeep) {
  2752. var Ctor = object.constructor;
  2753. switch (tag) {
  2754. case arrayBufferTag$2: return cloneArrayBuffer(object);
  2755. case boolTag$2:
  2756. case dateTag$2: return new Ctor(+object);
  2757. case dataViewTag$2: return cloneDataView(object, isDeep);
  2758. case float32Tag$1:
  2759. case float64Tag$1:
  2760. case int8Tag$1:
  2761. case int16Tag$1:
  2762. case int32Tag$1:
  2763. case uint8Tag$1:
  2764. case uint8ClampedTag$1:
  2765. case uint16Tag$1:
  2766. case uint32Tag$1: return cloneTypedArray(object, isDeep);
  2767. case mapTag$3: return new Ctor();
  2768. case numberTag$2:
  2769. case stringTag$2: return new Ctor(object);
  2770. case regexpTag$2: return cloneRegExp(object);
  2771. case setTag$3: return new Ctor();
  2772. case symbolTag$2: return cloneSymbol(object);
  2773. }
  2774. }
  2775. //#endregion
  2776. //#region node_modules/lodash-es/_initCloneObject.js
  2777. /**
  2778. * Initializes an object clone.
  2779. *
  2780. * @private
  2781. * @param {Object} object The object to clone.
  2782. * @returns {Object} Returns the initialized clone.
  2783. */
  2784. function initCloneObject(object) {
  2785. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  2786. }
  2787. //#endregion
  2788. //#region node_modules/lodash-es/_baseIsMap.js
  2789. /** `Object#toString` result references. */
  2790. var mapTag$2 = "[object Map]";
  2791. /**
  2792. * The base implementation of `_.isMap` without Node.js optimizations.
  2793. *
  2794. * @private
  2795. * @param {*} value The value to check.
  2796. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  2797. */
  2798. function baseIsMap(value) {
  2799. return isObjectLike(value) && _getTag_default(value) == mapTag$2;
  2800. }
  2801. //#endregion
  2802. //#region node_modules/lodash-es/isMap.js
  2803. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  2804. /**
  2805. * Checks if `value` is classified as a `Map` object.
  2806. *
  2807. * @static
  2808. * @memberOf _
  2809. * @since 4.3.0
  2810. * @category Lang
  2811. * @param {*} value The value to check.
  2812. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  2813. * @example
  2814. *
  2815. * _.isMap(new Map);
  2816. * // => true
  2817. *
  2818. * _.isMap(new WeakMap);
  2819. * // => false
  2820. */
  2821. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  2822. //#endregion
  2823. //#region node_modules/lodash-es/_baseIsSet.js
  2824. /** `Object#toString` result references. */
  2825. var setTag$2 = "[object Set]";
  2826. /**
  2827. * The base implementation of `_.isSet` without Node.js optimizations.
  2828. *
  2829. * @private
  2830. * @param {*} value The value to check.
  2831. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  2832. */
  2833. function baseIsSet(value) {
  2834. return isObjectLike(value) && _getTag_default(value) == setTag$2;
  2835. }
  2836. //#endregion
  2837. //#region node_modules/lodash-es/isSet.js
  2838. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  2839. /**
  2840. * Checks if `value` is classified as a `Set` object.
  2841. *
  2842. * @static
  2843. * @memberOf _
  2844. * @since 4.3.0
  2845. * @category Lang
  2846. * @param {*} value The value to check.
  2847. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  2848. * @example
  2849. *
  2850. * _.isSet(new Set);
  2851. * // => true
  2852. *
  2853. * _.isSet(new WeakSet);
  2854. * // => false
  2855. */
  2856. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  2857. //#endregion
  2858. //#region node_modules/lodash-es/_baseClone.js
  2859. /** Used to compose bitmasks for cloning. */
  2860. var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
  2861. /** `Object#toString` result references. */
  2862. var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
  2863. var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
  2864. /** Used to identify `toStringTag` values supported by `_.clone`. */
  2865. var cloneableTags = {};
  2866. cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  2867. cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  2868. /**
  2869. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  2870. * traversed objects.
  2871. *
  2872. * @private
  2873. * @param {*} value The value to clone.
  2874. * @param {boolean} bitmask The bitmask flags.
  2875. * 1 - Deep clone
  2876. * 2 - Flatten inherited properties
  2877. * 4 - Clone symbols
  2878. * @param {Function} [customizer] The function to customize cloning.
  2879. * @param {string} [key] The key of `value`.
  2880. * @param {Object} [object] The parent object of `value`.
  2881. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  2882. * @returns {*} Returns the cloned value.
  2883. */
  2884. function baseClone(value, bitmask, customizer, key, object, stack) {
  2885. var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
  2886. if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
  2887. if (result !== void 0) return result;
  2888. if (!isObject$1(value)) return value;
  2889. var isArr = isArray(value);
  2890. if (isArr) {
  2891. result = initCloneArray(value);
  2892. if (!isDeep) return copyArray(value, result);
  2893. } else {
  2894. var tag = _getTag_default(value), isFunc = tag == funcTag || tag == genTag;
  2895. if (isBuffer(value)) return cloneBuffer(value, isDeep);
  2896. if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
  2897. result = isFlat || isFunc ? {} : initCloneObject(value);
  2898. if (!isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
  2899. } else {
  2900. if (!cloneableTags[tag]) return object ? value : {};
  2901. result = initCloneByTag(value, tag, isDeep);
  2902. }
  2903. }
  2904. stack || (stack = new Stack());
  2905. var stacked = stack.get(value);
  2906. if (stacked) return stacked;
  2907. stack.set(value, result);
  2908. if (isSet(value)) value.forEach(function(subValue) {
  2909. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  2910. });
  2911. else if (isMap(value)) value.forEach(function(subValue, key) {
  2912. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  2913. });
  2914. var props = isArr ? void 0 : (isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys)(value);
  2915. arrayEach(props || value, function(subValue, key) {
  2916. if (props) {
  2917. key = subValue;
  2918. subValue = value[key];
  2919. }
  2920. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  2921. });
  2922. return result;
  2923. }
  2924. //#endregion
  2925. //#region node_modules/lodash-es/cloneDeep.js
  2926. /** Used to compose bitmasks for cloning. */
  2927. var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
  2928. /**
  2929. * This method is like `_.clone` except that it recursively clones `value`.
  2930. *
  2931. * @static
  2932. * @memberOf _
  2933. * @since 1.0.0
  2934. * @category Lang
  2935. * @param {*} value The value to recursively clone.
  2936. * @returns {*} Returns the deep cloned value.
  2937. * @see _.clone
  2938. * @example
  2939. *
  2940. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  2941. *
  2942. * var deep = _.cloneDeep(objects);
  2943. * console.log(deep[0] === objects[0]);
  2944. * // => false
  2945. */
  2946. function cloneDeep(value) {
  2947. return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
  2948. }
  2949. //#endregion
  2950. //#region node_modules/lodash-es/_setCacheAdd.js
  2951. /** Used to stand-in for `undefined` hash values. */
  2952. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  2953. /**
  2954. * Adds `value` to the array cache.
  2955. *
  2956. * @private
  2957. * @name add
  2958. * @memberOf SetCache
  2959. * @alias push
  2960. * @param {*} value The value to cache.
  2961. * @returns {Object} Returns the cache instance.
  2962. */
  2963. function setCacheAdd(value) {
  2964. this.__data__.set(value, HASH_UNDEFINED);
  2965. return this;
  2966. }
  2967. //#endregion
  2968. //#region node_modules/lodash-es/_setCacheHas.js
  2969. /**
  2970. * Checks if `value` is in the array cache.
  2971. *
  2972. * @private
  2973. * @name has
  2974. * @memberOf SetCache
  2975. * @param {*} value The value to search for.
  2976. * @returns {number} Returns `true` if `value` is found, else `false`.
  2977. */
  2978. function setCacheHas(value) {
  2979. return this.__data__.has(value);
  2980. }
  2981. //#endregion
  2982. //#region node_modules/lodash-es/_SetCache.js
  2983. /**
  2984. *
  2985. * Creates an array cache object to store unique values.
  2986. *
  2987. * @private
  2988. * @constructor
  2989. * @param {Array} [values] The values to cache.
  2990. */
  2991. function SetCache(values) {
  2992. var index = -1, length = values == null ? 0 : values.length;
  2993. this.__data__ = new MapCache();
  2994. while (++index < length) this.add(values[index]);
  2995. }
  2996. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  2997. SetCache.prototype.has = setCacheHas;
  2998. //#endregion
  2999. //#region node_modules/lodash-es/_arraySome.js
  3000. /**
  3001. * A specialized version of `_.some` for arrays without support for iteratee
  3002. * shorthands.
  3003. *
  3004. * @private
  3005. * @param {Array} [array] The array to iterate over.
  3006. * @param {Function} predicate The function invoked per iteration.
  3007. * @returns {boolean} Returns `true` if any element passes the predicate check,
  3008. * else `false`.
  3009. */
  3010. function arraySome(array, predicate) {
  3011. var index = -1, length = array == null ? 0 : array.length;
  3012. while (++index < length) if (predicate(array[index], index, array)) return true;
  3013. return false;
  3014. }
  3015. //#endregion
  3016. //#region node_modules/lodash-es/_cacheHas.js
  3017. /**
  3018. * Checks if a `cache` value for `key` exists.
  3019. *
  3020. * @private
  3021. * @param {Object} cache The cache to query.
  3022. * @param {string} key The key of the entry to check.
  3023. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3024. */
  3025. function cacheHas(cache, key) {
  3026. return cache.has(key);
  3027. }
  3028. //#endregion
  3029. //#region node_modules/lodash-es/_equalArrays.js
  3030. /** Used to compose bitmasks for value comparisons. */
  3031. var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
  3032. /**
  3033. * A specialized version of `baseIsEqualDeep` for arrays with support for
  3034. * partial deep comparisons.
  3035. *
  3036. * @private
  3037. * @param {Array} array The array to compare.
  3038. * @param {Array} other The other array to compare.
  3039. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3040. * @param {Function} customizer The function to customize comparisons.
  3041. * @param {Function} equalFunc The function to determine equivalents of values.
  3042. * @param {Object} stack Tracks traversed `array` and `other` objects.
  3043. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  3044. */
  3045. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  3046. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
  3047. if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
  3048. var arrStacked = stack.get(array);
  3049. var othStacked = stack.get(other);
  3050. if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
  3051. var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
  3052. stack.set(array, other);
  3053. stack.set(other, array);
  3054. while (++index < arrLength) {
  3055. var arrValue = array[index], othValue = other[index];
  3056. if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  3057. if (compared !== void 0) {
  3058. if (compared) continue;
  3059. result = false;
  3060. break;
  3061. }
  3062. if (seen) {
  3063. if (!arraySome(other, function(othValue, othIndex) {
  3064. if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
  3065. })) {
  3066. result = false;
  3067. break;
  3068. }
  3069. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  3070. result = false;
  3071. break;
  3072. }
  3073. }
  3074. stack["delete"](array);
  3075. stack["delete"](other);
  3076. return result;
  3077. }
  3078. //#endregion
  3079. //#region node_modules/lodash-es/_mapToArray.js
  3080. /**
  3081. * Converts `map` to its key-value pairs.
  3082. *
  3083. * @private
  3084. * @param {Object} map The map to convert.
  3085. * @returns {Array} Returns the key-value pairs.
  3086. */
  3087. function mapToArray(map) {
  3088. var index = -1, result = Array(map.size);
  3089. map.forEach(function(value, key) {
  3090. result[++index] = [key, value];
  3091. });
  3092. return result;
  3093. }
  3094. //#endregion
  3095. //#region node_modules/lodash-es/_setToArray.js
  3096. /**
  3097. * Converts `set` to an array of its values.
  3098. *
  3099. * @private
  3100. * @param {Object} set The set to convert.
  3101. * @returns {Array} Returns the values.
  3102. */
  3103. function setToArray(set) {
  3104. var index = -1, result = Array(set.size);
  3105. set.forEach(function(value) {
  3106. result[++index] = value;
  3107. });
  3108. return result;
  3109. }
  3110. //#endregion
  3111. //#region node_modules/lodash-es/_equalByTag.js
  3112. /** Used to compose bitmasks for value comparisons. */
  3113. var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
  3114. /** `Object#toString` result references. */
  3115. var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
  3116. var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
  3117. /** Used to convert symbols to primitives and strings. */
  3118. var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  3119. /**
  3120. * A specialized version of `baseIsEqualDeep` for comparing objects of
  3121. * the same `toStringTag`.
  3122. *
  3123. * **Note:** This function only supports comparing values with tags of
  3124. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  3125. *
  3126. * @private
  3127. * @param {Object} object The object to compare.
  3128. * @param {Object} other The other object to compare.
  3129. * @param {string} tag The `toStringTag` of the objects to compare.
  3130. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3131. * @param {Function} customizer The function to customize comparisons.
  3132. * @param {Function} equalFunc The function to determine equivalents of values.
  3133. * @param {Object} stack Tracks traversed `object` and `other` objects.
  3134. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3135. */
  3136. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  3137. switch (tag) {
  3138. case dataViewTag:
  3139. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
  3140. object = object.buffer;
  3141. other = other.buffer;
  3142. case arrayBufferTag:
  3143. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) return false;
  3144. return true;
  3145. case boolTag:
  3146. case dateTag:
  3147. case numberTag: return eq(+object, +other);
  3148. case errorTag: return object.name == other.name && object.message == other.message;
  3149. case regexpTag:
  3150. case stringTag: return object == other + "";
  3151. case mapTag: var convert = mapToArray;
  3152. case setTag:
  3153. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
  3154. convert || (convert = setToArray);
  3155. if (object.size != other.size && !isPartial) return false;
  3156. var stacked = stack.get(object);
  3157. if (stacked) return stacked == other;
  3158. bitmask |= COMPARE_UNORDERED_FLAG$2;
  3159. stack.set(object, other);
  3160. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  3161. stack["delete"](object);
  3162. return result;
  3163. case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
  3164. }
  3165. return false;
  3166. }
  3167. //#endregion
  3168. //#region node_modules/lodash-es/_equalObjects.js
  3169. /** Used to compose bitmasks for value comparisons. */
  3170. var COMPARE_PARTIAL_FLAG$3 = 1;
  3171. /** Used to check objects for own properties. */
  3172. var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  3173. /**
  3174. * A specialized version of `baseIsEqualDeep` for objects with support for
  3175. * partial deep comparisons.
  3176. *
  3177. * @private
  3178. * @param {Object} object The object to compare.
  3179. * @param {Object} other The other object to compare.
  3180. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3181. * @param {Function} customizer The function to customize comparisons.
  3182. * @param {Function} equalFunc The function to determine equivalents of values.
  3183. * @param {Object} stack Tracks traversed `object` and `other` objects.
  3184. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3185. */
  3186. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  3187. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length;
  3188. if (objLength != getAllKeys(other).length && !isPartial) return false;
  3189. var index = objLength;
  3190. while (index--) {
  3191. var key = objProps[index];
  3192. if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) return false;
  3193. }
  3194. var objStacked = stack.get(object);
  3195. var othStacked = stack.get(other);
  3196. if (objStacked && othStacked) return objStacked == other && othStacked == object;
  3197. var result = true;
  3198. stack.set(object, other);
  3199. stack.set(other, object);
  3200. var skipCtor = isPartial;
  3201. while (++index < objLength) {
  3202. key = objProps[index];
  3203. var objValue = object[key], othValue = other[key];
  3204. if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  3205. if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  3206. result = false;
  3207. break;
  3208. }
  3209. skipCtor || (skipCtor = key == "constructor");
  3210. }
  3211. if (result && !skipCtor) {
  3212. var objCtor = object.constructor, othCtor = other.constructor;
  3213. if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
  3214. }
  3215. stack["delete"](object);
  3216. stack["delete"](other);
  3217. return result;
  3218. }
  3219. //#endregion
  3220. //#region node_modules/lodash-es/_baseIsEqualDeep.js
  3221. /** Used to compose bitmasks for value comparisons. */
  3222. var COMPARE_PARTIAL_FLAG$2 = 1;
  3223. /** `Object#toString` result references. */
  3224. var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
  3225. /** Used to check objects for own properties. */
  3226. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  3227. /**
  3228. * A specialized version of `baseIsEqual` for arrays and objects which performs
  3229. * deep comparisons and tracks traversed objects enabling objects with circular
  3230. * references to be compared.
  3231. *
  3232. * @private
  3233. * @param {Object} object The object to compare.
  3234. * @param {Object} other The other object to compare.
  3235. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3236. * @param {Function} customizer The function to customize comparisons.
  3237. * @param {Function} equalFunc The function to determine equivalents of values.
  3238. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  3239. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3240. */
  3241. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  3242. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : _getTag_default(object), othTag = othIsArr ? arrayTag : _getTag_default(other);
  3243. objTag = objTag == argsTag ? objectTag : objTag;
  3244. othTag = othTag == argsTag ? objectTag : othTag;
  3245. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  3246. if (isSameTag && isBuffer(object)) {
  3247. if (!isBuffer(other)) return false;
  3248. objIsArr = true;
  3249. objIsObj = false;
  3250. }
  3251. if (isSameTag && !objIsObj) {
  3252. stack || (stack = new Stack());
  3253. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  3254. }
  3255. if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
  3256. var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
  3257. if (objIsWrapped || othIsWrapped) {
  3258. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  3259. stack || (stack = new Stack());
  3260. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  3261. }
  3262. }
  3263. if (!isSameTag) return false;
  3264. stack || (stack = new Stack());
  3265. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  3266. }
  3267. //#endregion
  3268. //#region node_modules/lodash-es/_baseIsEqual.js
  3269. /**
  3270. * The base implementation of `_.isEqual` which supports partial comparisons
  3271. * and tracks traversed objects.
  3272. *
  3273. * @private
  3274. * @param {*} value The value to compare.
  3275. * @param {*} other The other value to compare.
  3276. * @param {boolean} bitmask The bitmask flags.
  3277. * 1 - Unordered comparison
  3278. * 2 - Partial comparison
  3279. * @param {Function} [customizer] The function to customize comparisons.
  3280. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  3281. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  3282. */
  3283. function baseIsEqual(value, other, bitmask, customizer, stack) {
  3284. if (value === other) return true;
  3285. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
  3286. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  3287. }
  3288. //#endregion
  3289. //#region node_modules/lodash-es/_baseIsMatch.js
  3290. /** Used to compose bitmasks for value comparisons. */
  3291. var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
  3292. /**
  3293. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  3294. *
  3295. * @private
  3296. * @param {Object} object The object to inspect.
  3297. * @param {Object} source The object of property values to match.
  3298. * @param {Array} matchData The property names, values, and compare flags to match.
  3299. * @param {Function} [customizer] The function to customize comparisons.
  3300. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  3301. */
  3302. function baseIsMatch(object, source, matchData, customizer) {
  3303. var index = matchData.length, length = index, noCustomizer = !customizer;
  3304. if (object == null) return !length;
  3305. object = Object(object);
  3306. while (index--) {
  3307. var data = matchData[index];
  3308. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return false;
  3309. }
  3310. while (++index < length) {
  3311. data = matchData[index];
  3312. var key = data[0], objValue = object[key], srcValue = data[1];
  3313. if (noCustomizer && data[2]) {
  3314. if (objValue === void 0 && !(key in object)) return false;
  3315. } else {
  3316. var stack = new Stack();
  3317. if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
  3318. if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) return false;
  3319. }
  3320. }
  3321. return true;
  3322. }
  3323. //#endregion
  3324. //#region node_modules/lodash-es/_isStrictComparable.js
  3325. /**
  3326. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  3327. *
  3328. * @private
  3329. * @param {*} value The value to check.
  3330. * @returns {boolean} Returns `true` if `value` if suitable for strict
  3331. * equality comparisons, else `false`.
  3332. */
  3333. function isStrictComparable(value) {
  3334. return value === value && !isObject$1(value);
  3335. }
  3336. //#endregion
  3337. //#region node_modules/lodash-es/_getMatchData.js
  3338. /**
  3339. * Gets the property names, values, and compare flags of `object`.
  3340. *
  3341. * @private
  3342. * @param {Object} object The object to query.
  3343. * @returns {Array} Returns the match data of `object`.
  3344. */
  3345. function getMatchData(object) {
  3346. var result = keys(object), length = result.length;
  3347. while (length--) {
  3348. var key = result[length], value = object[key];
  3349. result[length] = [
  3350. key,
  3351. value,
  3352. isStrictComparable(value)
  3353. ];
  3354. }
  3355. return result;
  3356. }
  3357. //#endregion
  3358. //#region node_modules/lodash-es/_matchesStrictComparable.js
  3359. /**
  3360. * A specialized version of `matchesProperty` for source values suitable
  3361. * for strict equality comparisons, i.e. `===`.
  3362. *
  3363. * @private
  3364. * @param {string} key The key of the property to get.
  3365. * @param {*} srcValue The value to match.
  3366. * @returns {Function} Returns the new spec function.
  3367. */
  3368. function matchesStrictComparable(key, srcValue) {
  3369. return function(object) {
  3370. if (object == null) return false;
  3371. return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
  3372. };
  3373. }
  3374. //#endregion
  3375. //#region node_modules/lodash-es/_baseMatches.js
  3376. /**
  3377. * The base implementation of `_.matches` which doesn't clone `source`.
  3378. *
  3379. * @private
  3380. * @param {Object} source The object of property values to match.
  3381. * @returns {Function} Returns the new spec function.
  3382. */
  3383. function baseMatches(source) {
  3384. var matchData = getMatchData(source);
  3385. if (matchData.length == 1 && matchData[0][2]) return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  3386. return function(object) {
  3387. return object === source || baseIsMatch(object, source, matchData);
  3388. };
  3389. }
  3390. //#endregion
  3391. //#region node_modules/lodash-es/_baseHasIn.js
  3392. /**
  3393. * The base implementation of `_.hasIn` without support for deep paths.
  3394. *
  3395. * @private
  3396. * @param {Object} [object] The object to query.
  3397. * @param {Array|string} key The key to check.
  3398. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  3399. */
  3400. function baseHasIn(object, key) {
  3401. return object != null && key in Object(object);
  3402. }
  3403. //#endregion
  3404. //#region node_modules/lodash-es/_hasPath.js
  3405. /**
  3406. * Checks if `path` exists on `object`.
  3407. *
  3408. * @private
  3409. * @param {Object} object The object to query.
  3410. * @param {Array|string} path The path to check.
  3411. * @param {Function} hasFunc The function to check properties.
  3412. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3413. */
  3414. function hasPath(object, path, hasFunc) {
  3415. path = castPath(path, object);
  3416. var index = -1, length = path.length, result = false;
  3417. while (++index < length) {
  3418. var key = toKey(path[index]);
  3419. if (!(result = object != null && hasFunc(object, key))) break;
  3420. object = object[key];
  3421. }
  3422. if (result || ++index != length) return result;
  3423. length = object == null ? 0 : object.length;
  3424. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  3425. }
  3426. //#endregion
  3427. //#region node_modules/lodash-es/hasIn.js
  3428. /**
  3429. * Checks if `path` is a direct or inherited property of `object`.
  3430. *
  3431. * @static
  3432. * @memberOf _
  3433. * @since 4.0.0
  3434. * @category Object
  3435. * @param {Object} object The object to query.
  3436. * @param {Array|string} path The path to check.
  3437. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3438. * @example
  3439. *
  3440. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  3441. *
  3442. * _.hasIn(object, 'a');
  3443. * // => true
  3444. *
  3445. * _.hasIn(object, 'a.b');
  3446. * // => true
  3447. *
  3448. * _.hasIn(object, ['a', 'b']);
  3449. * // => true
  3450. *
  3451. * _.hasIn(object, 'b');
  3452. * // => false
  3453. */
  3454. function hasIn(object, path) {
  3455. return object != null && hasPath(object, path, baseHasIn);
  3456. }
  3457. //#endregion
  3458. //#region node_modules/lodash-es/_baseMatchesProperty.js
  3459. /** Used to compose bitmasks for value comparisons. */
  3460. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  3461. /**
  3462. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  3463. *
  3464. * @private
  3465. * @param {string} path The path of the property to get.
  3466. * @param {*} srcValue The value to match.
  3467. * @returns {Function} Returns the new spec function.
  3468. */
  3469. function baseMatchesProperty(path, srcValue) {
  3470. if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
  3471. return function(object) {
  3472. var objValue = get(object, path);
  3473. return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  3474. };
  3475. }
  3476. //#endregion
  3477. //#region node_modules/lodash-es/_baseProperty.js
  3478. /**
  3479. * The base implementation of `_.property` without support for deep paths.
  3480. *
  3481. * @private
  3482. * @param {string} key The key of the property to get.
  3483. * @returns {Function} Returns the new accessor function.
  3484. */
  3485. function baseProperty(key) {
  3486. return function(object) {
  3487. return object == null ? void 0 : object[key];
  3488. };
  3489. }
  3490. //#endregion
  3491. //#region node_modules/lodash-es/_basePropertyDeep.js
  3492. /**
  3493. * A specialized version of `baseProperty` which supports deep paths.
  3494. *
  3495. * @private
  3496. * @param {Array|string} path The path of the property to get.
  3497. * @returns {Function} Returns the new accessor function.
  3498. */
  3499. function basePropertyDeep(path) {
  3500. return function(object) {
  3501. return baseGet(object, path);
  3502. };
  3503. }
  3504. //#endregion
  3505. //#region node_modules/lodash-es/property.js
  3506. /**
  3507. * Creates a function that returns the value at `path` of a given object.
  3508. *
  3509. * @static
  3510. * @memberOf _
  3511. * @since 2.4.0
  3512. * @category Util
  3513. * @param {Array|string} path The path of the property to get.
  3514. * @returns {Function} Returns the new accessor function.
  3515. * @example
  3516. *
  3517. * var objects = [
  3518. * { 'a': { 'b': 2 } },
  3519. * { 'a': { 'b': 1 } }
  3520. * ];
  3521. *
  3522. * _.map(objects, _.property('a.b'));
  3523. * // => [2, 1]
  3524. *
  3525. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  3526. * // => [1, 2]
  3527. */
  3528. function property(path) {
  3529. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  3530. }
  3531. //#endregion
  3532. //#region node_modules/lodash-es/_baseIteratee.js
  3533. /**
  3534. * The base implementation of `_.iteratee`.
  3535. *
  3536. * @private
  3537. * @param {*} [value=_.identity] The value to convert to an iteratee.
  3538. * @returns {Function} Returns the iteratee.
  3539. */
  3540. function baseIteratee(value) {
  3541. if (typeof value == "function") return value;
  3542. if (value == null) return identity;
  3543. if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  3544. return property(value);
  3545. }
  3546. //#endregion
  3547. //#region node_modules/lodash-es/_createBaseFor.js
  3548. /**
  3549. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  3550. *
  3551. * @private
  3552. * @param {boolean} [fromRight] Specify iterating from right to left.
  3553. * @returns {Function} Returns the new base function.
  3554. */
  3555. function createBaseFor(fromRight) {
  3556. return function(object, iteratee, keysFunc) {
  3557. var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
  3558. while (length--) {
  3559. var key = props[fromRight ? length : ++index];
  3560. if (iteratee(iterable[key], key, iterable) === false) break;
  3561. }
  3562. return object;
  3563. };
  3564. }
  3565. //#endregion
  3566. //#region node_modules/lodash-es/_baseFor.js
  3567. /**
  3568. * The base implementation of `baseForOwn` which iterates over `object`
  3569. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  3570. * Iteratee functions may exit iteration early by explicitly returning `false`.
  3571. *
  3572. * @private
  3573. * @param {Object} object The object to iterate over.
  3574. * @param {Function} iteratee The function invoked per iteration.
  3575. * @param {Function} keysFunc The function to get the keys of `object`.
  3576. * @returns {Object} Returns `object`.
  3577. */
  3578. var baseFor = createBaseFor();
  3579. //#endregion
  3580. //#region node_modules/lodash-es/_baseForOwn.js
  3581. /**
  3582. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  3583. *
  3584. * @private
  3585. * @param {Object} object The object to iterate over.
  3586. * @param {Function} iteratee The function invoked per iteration.
  3587. * @returns {Object} Returns `object`.
  3588. */
  3589. function baseForOwn(object, iteratee) {
  3590. return object && baseFor(object, iteratee, keys);
  3591. }
  3592. //#endregion
  3593. //#region node_modules/lodash-es/_createBaseEach.js
  3594. /**
  3595. * Creates a `baseEach` or `baseEachRight` function.
  3596. *
  3597. * @private
  3598. * @param {Function} eachFunc The function to iterate over a collection.
  3599. * @param {boolean} [fromRight] Specify iterating from right to left.
  3600. * @returns {Function} Returns the new base function.
  3601. */
  3602. function createBaseEach(eachFunc, fromRight) {
  3603. return function(collection, iteratee) {
  3604. if (collection == null) return collection;
  3605. if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
  3606. var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
  3607. while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
  3608. return collection;
  3609. };
  3610. }
  3611. //#endregion
  3612. //#region node_modules/lodash-es/_baseEach.js
  3613. /**
  3614. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3615. *
  3616. * @private
  3617. * @param {Array|Object} collection The collection to iterate over.
  3618. * @param {Function} iteratee The function invoked per iteration.
  3619. * @returns {Array|Object} Returns `collection`.
  3620. */
  3621. var baseEach = createBaseEach(baseForOwn);
  3622. //#endregion
  3623. //#region node_modules/lodash-es/now.js
  3624. /**
  3625. * Gets the timestamp of the number of milliseconds that have elapsed since
  3626. * the Unix epoch (1 January 1970 00:00:00 UTC).
  3627. *
  3628. * @static
  3629. * @memberOf _
  3630. * @since 2.4.0
  3631. * @category Date
  3632. * @returns {number} Returns the timestamp.
  3633. * @example
  3634. *
  3635. * _.defer(function(stamp) {
  3636. * console.log(_.now() - stamp);
  3637. * }, _.now());
  3638. * // => Logs the number of milliseconds it took for the deferred invocation.
  3639. */
  3640. var now = function() {
  3641. return root.Date.now();
  3642. };
  3643. //#endregion
  3644. //#region node_modules/lodash-es/debounce.js
  3645. /** Error message constants. */
  3646. var FUNC_ERROR_TEXT$1 = "Expected a function";
  3647. var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
  3648. /**
  3649. * Creates a debounced function that delays invoking `func` until after `wait`
  3650. * milliseconds have elapsed since the last time the debounced function was
  3651. * invoked. The debounced function comes with a `cancel` method to cancel
  3652. * delayed `func` invocations and a `flush` method to immediately invoke them.
  3653. * Provide `options` to indicate whether `func` should be invoked on the
  3654. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  3655. * with the last arguments provided to the debounced function. Subsequent
  3656. * calls to the debounced function return the result of the last `func`
  3657. * invocation.
  3658. *
  3659. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  3660. * invoked on the trailing edge of the timeout only if the debounced function
  3661. * is invoked more than once during the `wait` timeout.
  3662. *
  3663. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  3664. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  3665. *
  3666. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  3667. * for details over the differences between `_.debounce` and `_.throttle`.
  3668. *
  3669. * @static
  3670. * @memberOf _
  3671. * @since 0.1.0
  3672. * @category Function
  3673. * @param {Function} func The function to debounce.
  3674. * @param {number} [wait=0] The number of milliseconds to delay.
  3675. * @param {Object} [options={}] The options object.
  3676. * @param {boolean} [options.leading=false]
  3677. * Specify invoking on the leading edge of the timeout.
  3678. * @param {number} [options.maxWait]
  3679. * The maximum time `func` is allowed to be delayed before it's invoked.
  3680. * @param {boolean} [options.trailing=true]
  3681. * Specify invoking on the trailing edge of the timeout.
  3682. * @returns {Function} Returns the new debounced function.
  3683. * @example
  3684. *
  3685. * // Avoid costly calculations while the window size is in flux.
  3686. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  3687. *
  3688. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  3689. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  3690. * 'leading': true,
  3691. * 'trailing': false
  3692. * }));
  3693. *
  3694. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  3695. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  3696. * var source = new EventSource('/stream');
  3697. * jQuery(source).on('message', debounced);
  3698. *
  3699. * // Cancel the trailing debounced invocation.
  3700. * jQuery(window).on('popstate', debounced.cancel);
  3701. */
  3702. function debounce(func, wait, options) {
  3703. var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  3704. if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
  3705. wait = toNumber(wait) || 0;
  3706. if (isObject$1(options)) {
  3707. leading = !!options.leading;
  3708. maxing = "maxWait" in options;
  3709. maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait;
  3710. trailing = "trailing" in options ? !!options.trailing : trailing;
  3711. }
  3712. function invokeFunc(time) {
  3713. var args = lastArgs, thisArg = lastThis;
  3714. lastArgs = lastThis = void 0;
  3715. lastInvokeTime = time;
  3716. result = func.apply(thisArg, args);
  3717. return result;
  3718. }
  3719. function leadingEdge(time) {
  3720. lastInvokeTime = time;
  3721. timerId = setTimeout(timerExpired, wait);
  3722. return leading ? invokeFunc(time) : result;
  3723. }
  3724. function remainingWait(time) {
  3725. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  3726. return maxing ? nativeMin$1(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  3727. }
  3728. function shouldInvoke(time) {
  3729. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  3730. return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  3731. }
  3732. function timerExpired() {
  3733. var time = now();
  3734. if (shouldInvoke(time)) return trailingEdge(time);
  3735. timerId = setTimeout(timerExpired, remainingWait(time));
  3736. }
  3737. function trailingEdge(time) {
  3738. timerId = void 0;
  3739. if (trailing && lastArgs) return invokeFunc(time);
  3740. lastArgs = lastThis = void 0;
  3741. return result;
  3742. }
  3743. function cancel() {
  3744. if (timerId !== void 0) clearTimeout(timerId);
  3745. lastInvokeTime = 0;
  3746. lastArgs = lastCallTime = lastThis = timerId = void 0;
  3747. }
  3748. function flush() {
  3749. return timerId === void 0 ? result : trailingEdge(now());
  3750. }
  3751. function debounced() {
  3752. var time = now(), isInvoking = shouldInvoke(time);
  3753. lastArgs = arguments;
  3754. lastThis = this;
  3755. lastCallTime = time;
  3756. if (isInvoking) {
  3757. if (timerId === void 0) return leadingEdge(lastCallTime);
  3758. if (maxing) {
  3759. clearTimeout(timerId);
  3760. timerId = setTimeout(timerExpired, wait);
  3761. return invokeFunc(lastCallTime);
  3762. }
  3763. }
  3764. if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
  3765. return result;
  3766. }
  3767. debounced.cancel = cancel;
  3768. debounced.flush = flush;
  3769. return debounced;
  3770. }
  3771. //#endregion
  3772. //#region node_modules/lodash-es/_assignMergeValue.js
  3773. /**
  3774. * This function is like `assignValue` except that it doesn't assign
  3775. * `undefined` values.
  3776. *
  3777. * @private
  3778. * @param {Object} object The object to modify.
  3779. * @param {string} key The key of the property to assign.
  3780. * @param {*} value The value to assign.
  3781. */
  3782. function assignMergeValue(object, key, value) {
  3783. if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
  3784. }
  3785. //#endregion
  3786. //#region node_modules/lodash-es/isArrayLikeObject.js
  3787. /**
  3788. * This method is like `_.isArrayLike` except that it also checks if `value`
  3789. * is an object.
  3790. *
  3791. * @static
  3792. * @memberOf _
  3793. * @since 4.0.0
  3794. * @category Lang
  3795. * @param {*} value The value to check.
  3796. * @returns {boolean} Returns `true` if `value` is an array-like object,
  3797. * else `false`.
  3798. * @example
  3799. *
  3800. * _.isArrayLikeObject([1, 2, 3]);
  3801. * // => true
  3802. *
  3803. * _.isArrayLikeObject(document.body.children);
  3804. * // => true
  3805. *
  3806. * _.isArrayLikeObject('abc');
  3807. * // => false
  3808. *
  3809. * _.isArrayLikeObject(_.noop);
  3810. * // => false
  3811. */
  3812. function isArrayLikeObject(value) {
  3813. return isObjectLike(value) && isArrayLike(value);
  3814. }
  3815. //#endregion
  3816. //#region node_modules/lodash-es/_safeGet.js
  3817. /**
  3818. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  3819. *
  3820. * @private
  3821. * @param {Object} object The object to query.
  3822. * @param {string} key The key of the property to get.
  3823. * @returns {*} Returns the property value.
  3824. */
  3825. function safeGet(object, key) {
  3826. if (key === "constructor" && typeof object[key] === "function") return;
  3827. if (key == "__proto__") return;
  3828. return object[key];
  3829. }
  3830. //#endregion
  3831. //#region node_modules/lodash-es/toPlainObject.js
  3832. /**
  3833. * Converts `value` to a plain object flattening inherited enumerable string
  3834. * keyed properties of `value` to own properties of the plain object.
  3835. *
  3836. * @static
  3837. * @memberOf _
  3838. * @since 3.0.0
  3839. * @category Lang
  3840. * @param {*} value The value to convert.
  3841. * @returns {Object} Returns the converted plain object.
  3842. * @example
  3843. *
  3844. * function Foo() {
  3845. * this.b = 2;
  3846. * }
  3847. *
  3848. * Foo.prototype.c = 3;
  3849. *
  3850. * _.assign({ 'a': 1 }, new Foo);
  3851. * // => { 'a': 1, 'b': 2 }
  3852. *
  3853. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  3854. * // => { 'a': 1, 'b': 2, 'c': 3 }
  3855. */
  3856. function toPlainObject(value) {
  3857. return copyObject(value, keysIn(value));
  3858. }
  3859. //#endregion
  3860. //#region node_modules/lodash-es/_baseMergeDeep.js
  3861. /**
  3862. * A specialized version of `baseMerge` for arrays and objects which performs
  3863. * deep merges and tracks traversed objects enabling objects with circular
  3864. * references to be merged.
  3865. *
  3866. * @private
  3867. * @param {Object} object The destination object.
  3868. * @param {Object} source The source object.
  3869. * @param {string} key The key of the value to merge.
  3870. * @param {number} srcIndex The index of `source`.
  3871. * @param {Function} mergeFunc The function to merge values.
  3872. * @param {Function} [customizer] The function to customize assigned values.
  3873. * @param {Object} [stack] Tracks traversed source values and their merged
  3874. * counterparts.
  3875. */
  3876. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  3877. var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  3878. if (stacked) {
  3879. assignMergeValue(object, key, stacked);
  3880. return;
  3881. }
  3882. var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
  3883. var isCommon = newValue === void 0;
  3884. if (isCommon) {
  3885. var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  3886. newValue = srcValue;
  3887. if (isArr || isBuff || isTyped) if (isArray(objValue)) newValue = objValue;
  3888. else if (isArrayLikeObject(objValue)) newValue = copyArray(objValue);
  3889. else if (isBuff) {
  3890. isCommon = false;
  3891. newValue = cloneBuffer(srcValue, true);
  3892. } else if (isTyped) {
  3893. isCommon = false;
  3894. newValue = cloneTypedArray(srcValue, true);
  3895. } else newValue = [];
  3896. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  3897. newValue = objValue;
  3898. if (isArguments(objValue)) newValue = toPlainObject(objValue);
  3899. else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
  3900. } else isCommon = false;
  3901. }
  3902. if (isCommon) {
  3903. stack.set(srcValue, newValue);
  3904. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  3905. stack["delete"](srcValue);
  3906. }
  3907. assignMergeValue(object, key, newValue);
  3908. }
  3909. //#endregion
  3910. //#region node_modules/lodash-es/_baseMerge.js
  3911. /**
  3912. * The base implementation of `_.merge` without support for multiple sources.
  3913. *
  3914. * @private
  3915. * @param {Object} object The destination object.
  3916. * @param {Object} source The source object.
  3917. * @param {number} srcIndex The index of `source`.
  3918. * @param {Function} [customizer] The function to customize merged values.
  3919. * @param {Object} [stack] Tracks traversed source values and their merged
  3920. * counterparts.
  3921. */
  3922. function baseMerge(object, source, srcIndex, customizer, stack) {
  3923. if (object === source) return;
  3924. baseFor(source, function(srcValue, key) {
  3925. stack || (stack = new Stack());
  3926. if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  3927. else {
  3928. var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
  3929. if (newValue === void 0) newValue = srcValue;
  3930. assignMergeValue(object, key, newValue);
  3931. }
  3932. }, keysIn);
  3933. }
  3934. //#endregion
  3935. //#region node_modules/lodash-es/_arrayIncludesWith.js
  3936. /**
  3937. * This function is like `arrayIncludes` except that it accepts a comparator.
  3938. *
  3939. * @private
  3940. * @param {Array} [array] The array to inspect.
  3941. * @param {*} target The value to search for.
  3942. * @param {Function} comparator The comparator invoked per element.
  3943. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  3944. */
  3945. function arrayIncludesWith(array, value, comparator) {
  3946. var index = -1, length = array == null ? 0 : array.length;
  3947. while (++index < length) if (comparator(value, array[index])) return true;
  3948. return false;
  3949. }
  3950. //#endregion
  3951. //#region node_modules/lodash-es/last.js
  3952. /**
  3953. * Gets the last element of `array`.
  3954. *
  3955. * @static
  3956. * @memberOf _
  3957. * @since 0.1.0
  3958. * @category Array
  3959. * @param {Array} array The array to query.
  3960. * @returns {*} Returns the last element of `array`.
  3961. * @example
  3962. *
  3963. * _.last([1, 2, 3]);
  3964. * // => 3
  3965. */
  3966. function last(array) {
  3967. var length = array == null ? 0 : array.length;
  3968. return length ? array[length - 1] : void 0;
  3969. }
  3970. //#endregion
  3971. //#region node_modules/lodash-es/findLastIndex.js
  3972. var nativeMax = Math.max, nativeMin = Math.min;
  3973. /**
  3974. * This method is like `_.findIndex` except that it iterates over elements
  3975. * of `collection` from right to left.
  3976. *
  3977. * @static
  3978. * @memberOf _
  3979. * @since 2.0.0
  3980. * @category Array
  3981. * @param {Array} array The array to inspect.
  3982. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3983. * @param {number} [fromIndex=array.length-1] The index to search from.
  3984. * @returns {number} Returns the index of the found element, else `-1`.
  3985. * @example
  3986. *
  3987. * var users = [
  3988. * { 'user': 'barney', 'active': true },
  3989. * { 'user': 'fred', 'active': false },
  3990. * { 'user': 'pebbles', 'active': false }
  3991. * ];
  3992. *
  3993. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  3994. * // => 2
  3995. *
  3996. * // The `_.matches` iteratee shorthand.
  3997. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  3998. * // => 0
  3999. *
  4000. * // The `_.matchesProperty` iteratee shorthand.
  4001. * _.findLastIndex(users, ['active', false]);
  4002. * // => 2
  4003. *
  4004. * // The `_.property` iteratee shorthand.
  4005. * _.findLastIndex(users, 'active');
  4006. * // => 0
  4007. */
  4008. function findLastIndex(array, predicate, fromIndex) {
  4009. var length = array == null ? 0 : array.length;
  4010. if (!length) return -1;
  4011. var index = length - 1;
  4012. if (fromIndex !== void 0) {
  4013. index = toInteger(fromIndex);
  4014. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  4015. }
  4016. return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
  4017. }
  4018. //#endregion
  4019. //#region node_modules/lodash-es/_baseMap.js
  4020. /**
  4021. * The base implementation of `_.map` without support for iteratee shorthands.
  4022. *
  4023. * @private
  4024. * @param {Array|Object} collection The collection to iterate over.
  4025. * @param {Function} iteratee The function invoked per iteration.
  4026. * @returns {Array} Returns the new mapped array.
  4027. */
  4028. function baseMap(collection, iteratee) {
  4029. var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
  4030. baseEach(collection, function(value, key, collection) {
  4031. result[++index] = iteratee(value, key, collection);
  4032. });
  4033. return result;
  4034. }
  4035. //#endregion
  4036. //#region node_modules/lodash-es/map.js
  4037. /**
  4038. * Creates an array of values by running each element in `collection` thru
  4039. * `iteratee`. The iteratee is invoked with three arguments:
  4040. * (value, index|key, collection).
  4041. *
  4042. * Many lodash methods are guarded to work as iteratees for methods like
  4043. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  4044. *
  4045. * The guarded methods are:
  4046. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  4047. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  4048. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  4049. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  4050. *
  4051. * @static
  4052. * @memberOf _
  4053. * @since 0.1.0
  4054. * @category Collection
  4055. * @param {Array|Object} collection The collection to iterate over.
  4056. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  4057. * @returns {Array} Returns the new mapped array.
  4058. * @example
  4059. *
  4060. * function square(n) {
  4061. * return n * n;
  4062. * }
  4063. *
  4064. * _.map([4, 8], square);
  4065. * // => [16, 64]
  4066. *
  4067. * _.map({ 'a': 4, 'b': 8 }, square);
  4068. * // => [16, 64] (iteration order is not guaranteed)
  4069. *
  4070. * var users = [
  4071. * { 'user': 'barney' },
  4072. * { 'user': 'fred' }
  4073. * ];
  4074. *
  4075. * // The `_.property` iteratee shorthand.
  4076. * _.map(users, 'user');
  4077. * // => ['barney', 'fred']
  4078. */
  4079. function map(collection, iteratee) {
  4080. return (isArray(collection) ? arrayMap : baseMap)(collection, baseIteratee(iteratee, 3));
  4081. }
  4082. //#endregion
  4083. //#region node_modules/lodash-es/flatMap.js
  4084. /**
  4085. * Creates a flattened array of values by running each element in `collection`
  4086. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  4087. * with three arguments: (value, index|key, collection).
  4088. *
  4089. * @static
  4090. * @memberOf _
  4091. * @since 4.0.0
  4092. * @category Collection
  4093. * @param {Array|Object} collection The collection to iterate over.
  4094. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  4095. * @returns {Array} Returns the new flattened array.
  4096. * @example
  4097. *
  4098. * function duplicate(n) {
  4099. * return [n, n];
  4100. * }
  4101. *
  4102. * _.flatMap([1, 2], duplicate);
  4103. * // => [1, 1, 2, 2]
  4104. */
  4105. function flatMap(collection, iteratee) {
  4106. return baseFlatten(map(collection, iteratee), 1);
  4107. }
  4108. //#endregion
  4109. //#region node_modules/lodash-es/flattenDeep.js
  4110. /** Used as references for various `Number` constants. */
  4111. var INFINITY = Infinity;
  4112. /**
  4113. * Recursively flattens `array`.
  4114. *
  4115. * @static
  4116. * @memberOf _
  4117. * @since 3.0.0
  4118. * @category Array
  4119. * @param {Array} array The array to flatten.
  4120. * @returns {Array} Returns the new flattened array.
  4121. * @example
  4122. *
  4123. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  4124. * // => [1, 2, 3, 4, 5]
  4125. */
  4126. function flattenDeep(array) {
  4127. return (array == null ? 0 : array.length) ? baseFlatten(array, INFINITY) : [];
  4128. }
  4129. //#endregion
  4130. //#region node_modules/lodash-es/fromPairs.js
  4131. /**
  4132. * The inverse of `_.toPairs`; this method returns an object composed
  4133. * from key-value `pairs`.
  4134. *
  4135. * @static
  4136. * @memberOf _
  4137. * @since 4.0.0
  4138. * @category Array
  4139. * @param {Array} pairs The key-value pairs.
  4140. * @returns {Object} Returns the new object.
  4141. * @example
  4142. *
  4143. * _.fromPairs([['a', 1], ['b', 2]]);
  4144. * // => { 'a': 1, 'b': 2 }
  4145. */
  4146. function fromPairs(pairs) {
  4147. var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
  4148. while (++index < length) {
  4149. var pair = pairs[index];
  4150. result[pair[0]] = pair[1];
  4151. }
  4152. return result;
  4153. }
  4154. //#endregion
  4155. //#region node_modules/lodash-es/_parent.js
  4156. /**
  4157. * Gets the parent value at `path` of `object`.
  4158. *
  4159. * @private
  4160. * @param {Object} object The object to query.
  4161. * @param {Array} path The path to get the parent value of.
  4162. * @returns {*} Returns the parent value.
  4163. */
  4164. function parent(object, path) {
  4165. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  4166. }
  4167. //#endregion
  4168. //#region node_modules/lodash-es/isEqual.js
  4169. /**
  4170. * Performs a deep comparison between two values to determine if they are
  4171. * equivalent.
  4172. *
  4173. * **Note:** This method supports comparing arrays, array buffers, booleans,
  4174. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  4175. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  4176. * by their own, not inherited, enumerable properties. Functions and DOM
  4177. * nodes are compared by strict equality, i.e. `===`.
  4178. *
  4179. * @static
  4180. * @memberOf _
  4181. * @since 0.1.0
  4182. * @category Lang
  4183. * @param {*} value The value to compare.
  4184. * @param {*} other The other value to compare.
  4185. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4186. * @example
  4187. *
  4188. * var object = { 'a': 1 };
  4189. * var other = { 'a': 1 };
  4190. *
  4191. * _.isEqual(object, other);
  4192. * // => true
  4193. *
  4194. * object === other;
  4195. * // => false
  4196. */
  4197. function isEqual$1(value, other) {
  4198. return baseIsEqual(value, other);
  4199. }
  4200. //#endregion
  4201. //#region node_modules/lodash-es/isNil.js
  4202. /**
  4203. * Checks if `value` is `null` or `undefined`.
  4204. *
  4205. * @static
  4206. * @memberOf _
  4207. * @since 4.0.0
  4208. * @category Lang
  4209. * @param {*} value The value to check.
  4210. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  4211. * @example
  4212. *
  4213. * _.isNil(null);
  4214. * // => true
  4215. *
  4216. * _.isNil(void 0);
  4217. * // => true
  4218. *
  4219. * _.isNil(NaN);
  4220. * // => false
  4221. */
  4222. function isNil(value) {
  4223. return value == null;
  4224. }
  4225. //#endregion
  4226. //#region node_modules/lodash-es/isNull.js
  4227. /**
  4228. * Checks if `value` is `null`.
  4229. *
  4230. * @static
  4231. * @memberOf _
  4232. * @since 0.1.0
  4233. * @category Lang
  4234. * @param {*} value The value to check.
  4235. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  4236. * @example
  4237. *
  4238. * _.isNull(null);
  4239. * // => true
  4240. *
  4241. * _.isNull(void 0);
  4242. * // => false
  4243. */
  4244. function isNull(value) {
  4245. return value === null;
  4246. }
  4247. //#endregion
  4248. //#region node_modules/lodash-es/isUndefined.js
  4249. /**
  4250. * Checks if `value` is `undefined`.
  4251. *
  4252. * @static
  4253. * @since 0.1.0
  4254. * @memberOf _
  4255. * @category Lang
  4256. * @param {*} value The value to check.
  4257. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  4258. * @example
  4259. *
  4260. * _.isUndefined(void 0);
  4261. * // => true
  4262. *
  4263. * _.isUndefined(null);
  4264. * // => false
  4265. */
  4266. function isUndefined$1(value) {
  4267. return value === void 0;
  4268. }
  4269. //#endregion
  4270. //#region node_modules/lodash-es/merge.js
  4271. /**
  4272. * This method is like `_.assign` except that it recursively merges own and
  4273. * inherited enumerable string keyed properties of source objects into the
  4274. * destination object. Source properties that resolve to `undefined` are
  4275. * skipped if a destination value exists. Array and plain object properties
  4276. * are merged recursively. Other objects and value types are overridden by
  4277. * assignment. Source objects are applied from left to right. Subsequent
  4278. * sources overwrite property assignments of previous sources.
  4279. *
  4280. * **Note:** This method mutates `object`.
  4281. *
  4282. * @static
  4283. * @memberOf _
  4284. * @since 0.5.0
  4285. * @category Object
  4286. * @param {Object} object The destination object.
  4287. * @param {...Object} [sources] The source objects.
  4288. * @returns {Object} Returns `object`.
  4289. * @example
  4290. *
  4291. * var object = {
  4292. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  4293. * };
  4294. *
  4295. * var other = {
  4296. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  4297. * };
  4298. *
  4299. * _.merge(object, other);
  4300. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  4301. */
  4302. var merge = createAssigner(function(object, source, srcIndex) {
  4303. baseMerge(object, source, srcIndex);
  4304. });
  4305. //#endregion
  4306. //#region node_modules/lodash-es/_baseUnset.js
  4307. /** Used to check objects for own properties. */
  4308. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4309. /**
  4310. * The base implementation of `_.unset`.
  4311. *
  4312. * @private
  4313. * @param {Object} object The object to modify.
  4314. * @param {Array|string} path The property path to unset.
  4315. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  4316. */
  4317. function baseUnset(object, path) {
  4318. path = castPath(path, object);
  4319. var index = -1, length = path.length;
  4320. if (!length) return true;
  4321. var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
  4322. while (++index < length) {
  4323. var key = path[index];
  4324. if (typeof key !== "string") continue;
  4325. if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) return false;
  4326. if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
  4327. if (isRootPrimitive && index === 0) continue;
  4328. return false;
  4329. }
  4330. }
  4331. var obj = parent(object, path);
  4332. return obj == null || delete obj[toKey(last(path))];
  4333. }
  4334. //#endregion
  4335. //#region node_modules/lodash-es/_customOmitClone.js
  4336. /**
  4337. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  4338. * objects.
  4339. *
  4340. * @private
  4341. * @param {*} value The value to inspect.
  4342. * @param {string} key The key of the property to inspect.
  4343. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  4344. */
  4345. function customOmitClone(value) {
  4346. return isPlainObject(value) ? void 0 : value;
  4347. }
  4348. //#endregion
  4349. //#region node_modules/lodash-es/omit.js
  4350. /** Used to compose bitmasks for cloning. */
  4351. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  4352. /**
  4353. * The opposite of `_.pick`; this method creates an object composed of the
  4354. * own and inherited enumerable property paths of `object` that are not omitted.
  4355. *
  4356. * **Note:** This method is considerably slower than `_.pick`.
  4357. *
  4358. * @static
  4359. * @since 0.1.0
  4360. * @memberOf _
  4361. * @category Object
  4362. * @param {Object} object The source object.
  4363. * @param {...(string|string[])} [paths] The property paths to omit.
  4364. * @returns {Object} Returns the new object.
  4365. * @example
  4366. *
  4367. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  4368. *
  4369. * _.omit(object, ['a', 'c']);
  4370. * // => { 'b': '2' }
  4371. */
  4372. var omit = flatRest(function(object, paths) {
  4373. var result = {};
  4374. if (object == null) return result;
  4375. var isDeep = false;
  4376. paths = arrayMap(paths, function(path) {
  4377. path = castPath(path, object);
  4378. isDeep || (isDeep = path.length > 1);
  4379. return path;
  4380. });
  4381. copyObject(object, getAllKeysIn(object), result);
  4382. if (isDeep) result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  4383. var length = paths.length;
  4384. while (length--) baseUnset(result, paths[length]);
  4385. return result;
  4386. });
  4387. //#endregion
  4388. //#region node_modules/lodash-es/_baseSet.js
  4389. /**
  4390. * The base implementation of `_.set`.
  4391. *
  4392. * @private
  4393. * @param {Object} object The object to modify.
  4394. * @param {Array|string} path The path of the property to set.
  4395. * @param {*} value The value to set.
  4396. * @param {Function} [customizer] The function to customize path creation.
  4397. * @returns {Object} Returns `object`.
  4398. */
  4399. function baseSet(object, path, value, customizer) {
  4400. if (!isObject$1(object)) return object;
  4401. path = castPath(path, object);
  4402. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  4403. while (nested != null && ++index < length) {
  4404. var key = toKey(path[index]), newValue = value;
  4405. if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
  4406. if (index != lastIndex) {
  4407. var objValue = nested[key];
  4408. newValue = customizer ? customizer(objValue, key, nested) : void 0;
  4409. if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  4410. }
  4411. assignValue(nested, key, newValue);
  4412. nested = nested[key];
  4413. }
  4414. return object;
  4415. }
  4416. //#endregion
  4417. //#region node_modules/lodash-es/_basePickBy.js
  4418. /**
  4419. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4420. *
  4421. * @private
  4422. * @param {Object} object The source object.
  4423. * @param {string[]} paths The property paths to pick.
  4424. * @param {Function} predicate The function invoked per property.
  4425. * @returns {Object} Returns the new object.
  4426. */
  4427. function basePickBy(object, paths, predicate) {
  4428. var index = -1, length = paths.length, result = {};
  4429. while (++index < length) {
  4430. var path = paths[index], value = baseGet(object, path);
  4431. if (predicate(value, path)) baseSet(result, castPath(path, object), value);
  4432. }
  4433. return result;
  4434. }
  4435. //#endregion
  4436. //#region node_modules/lodash-es/_basePick.js
  4437. /**
  4438. * The base implementation of `_.pick` without support for individual
  4439. * property identifiers.
  4440. *
  4441. * @private
  4442. * @param {Object} object The source object.
  4443. * @param {string[]} paths The property paths to pick.
  4444. * @returns {Object} Returns the new object.
  4445. */
  4446. function basePick(object, paths) {
  4447. return basePickBy(object, paths, function(value, path) {
  4448. return hasIn(object, path);
  4449. });
  4450. }
  4451. //#endregion
  4452. //#region node_modules/lodash-es/pick.js
  4453. /**
  4454. * Creates an object composed of the picked `object` properties.
  4455. *
  4456. * @static
  4457. * @since 0.1.0
  4458. * @memberOf _
  4459. * @category Object
  4460. * @param {Object} object The source object.
  4461. * @param {...(string|string[])} [paths] The property paths to pick.
  4462. * @returns {Object} Returns the new object.
  4463. * @example
  4464. *
  4465. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  4466. *
  4467. * _.pick(object, ['a', 'c']);
  4468. * // => { 'a': 1, 'c': 3 }
  4469. */
  4470. var pick = flatRest(function(object, paths) {
  4471. return object == null ? {} : basePick(object, paths);
  4472. });
  4473. //#endregion
  4474. //#region node_modules/lodash-es/set.js
  4475. /**
  4476. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  4477. * it's created. Arrays are created for missing index properties while objects
  4478. * are created for all other missing properties. Use `_.setWith` to customize
  4479. * `path` creation.
  4480. *
  4481. * **Note:** This method mutates `object`.
  4482. *
  4483. * @static
  4484. * @memberOf _
  4485. * @since 3.7.0
  4486. * @category Object
  4487. * @param {Object} object The object to modify.
  4488. * @param {Array|string} path The path of the property to set.
  4489. * @param {*} value The value to set.
  4490. * @returns {Object} Returns `object`.
  4491. * @example
  4492. *
  4493. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  4494. *
  4495. * _.set(object, 'a[0].b.c', 4);
  4496. * console.log(object.a[0].b.c);
  4497. * // => 4
  4498. *
  4499. * _.set(object, ['x', '0', 'y', 'z'], 5);
  4500. * console.log(object.x[0].y.z);
  4501. * // => 5
  4502. */
  4503. function set(object, path, value) {
  4504. return object == null ? object : baseSet(object, path, value);
  4505. }
  4506. //#endregion
  4507. //#region node_modules/lodash-es/throttle.js
  4508. /** Error message constants. */
  4509. var FUNC_ERROR_TEXT = "Expected a function";
  4510. /**
  4511. * Creates a throttled function that only invokes `func` at most once per
  4512. * every `wait` milliseconds. The throttled function comes with a `cancel`
  4513. * method to cancel delayed `func` invocations and a `flush` method to
  4514. * immediately invoke them. Provide `options` to indicate whether `func`
  4515. * should be invoked on the leading and/or trailing edge of the `wait`
  4516. * timeout. The `func` is invoked with the last arguments provided to the
  4517. * throttled function. Subsequent calls to the throttled function return the
  4518. * result of the last `func` invocation.
  4519. *
  4520. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  4521. * invoked on the trailing edge of the timeout only if the throttled function
  4522. * is invoked more than once during the `wait` timeout.
  4523. *
  4524. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  4525. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  4526. *
  4527. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  4528. * for details over the differences between `_.throttle` and `_.debounce`.
  4529. *
  4530. * @static
  4531. * @memberOf _
  4532. * @since 0.1.0
  4533. * @category Function
  4534. * @param {Function} func The function to throttle.
  4535. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  4536. * @param {Object} [options={}] The options object.
  4537. * @param {boolean} [options.leading=true]
  4538. * Specify invoking on the leading edge of the timeout.
  4539. * @param {boolean} [options.trailing=true]
  4540. * Specify invoking on the trailing edge of the timeout.
  4541. * @returns {Function} Returns the new throttled function.
  4542. * @example
  4543. *
  4544. * // Avoid excessively updating the position while scrolling.
  4545. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  4546. *
  4547. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  4548. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  4549. * jQuery(element).on('click', throttled);
  4550. *
  4551. * // Cancel the trailing throttled invocation.
  4552. * jQuery(window).on('popstate', throttled.cancel);
  4553. */
  4554. function throttle(func, wait, options) {
  4555. var leading = true, trailing = true;
  4556. if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
  4557. if (isObject$1(options)) {
  4558. leading = "leading" in options ? !!options.leading : leading;
  4559. trailing = "trailing" in options ? !!options.trailing : trailing;
  4560. }
  4561. return debounce(func, wait, {
  4562. "leading": leading,
  4563. "maxWait": wait,
  4564. "trailing": trailing
  4565. });
  4566. }
  4567. //#endregion
  4568. //#region node_modules/lodash-es/_createSet.js
  4569. /**
  4570. * Creates a set object of `values`.
  4571. *
  4572. * @private
  4573. * @param {Array} values The values to add to the set.
  4574. * @returns {Object} Returns the new set.
  4575. */
  4576. var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == Infinity) ? noop$1 : function(values) {
  4577. return new Set$1(values);
  4578. };
  4579. //#endregion
  4580. //#region node_modules/lodash-es/_baseUniq.js
  4581. /** Used as the size to enable large array optimizations. */
  4582. var LARGE_ARRAY_SIZE = 200;
  4583. /**
  4584. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  4585. *
  4586. * @private
  4587. * @param {Array} array The array to inspect.
  4588. * @param {Function} [iteratee] The iteratee invoked per element.
  4589. * @param {Function} [comparator] The comparator invoked per element.
  4590. * @returns {Array} Returns the new duplicate free array.
  4591. */
  4592. function baseUniq(array, iteratee, comparator) {
  4593. var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
  4594. if (comparator) {
  4595. isCommon = false;
  4596. includes = arrayIncludesWith;
  4597. } else if (length >= LARGE_ARRAY_SIZE) {
  4598. var set = iteratee ? null : createSet(array);
  4599. if (set) return setToArray(set);
  4600. isCommon = false;
  4601. includes = cacheHas;
  4602. seen = new SetCache();
  4603. } else seen = iteratee ? [] : result;
  4604. outer: while (++index < length) {
  4605. var value = array[index], computed = iteratee ? iteratee(value) : value;
  4606. value = comparator || value !== 0 ? value : 0;
  4607. if (isCommon && computed === computed) {
  4608. var seenIndex = seen.length;
  4609. while (seenIndex--) if (seen[seenIndex] === computed) continue outer;
  4610. if (iteratee) seen.push(computed);
  4611. result.push(value);
  4612. } else if (!includes(seen, computed, comparator)) {
  4613. if (seen !== result) seen.push(computed);
  4614. result.push(value);
  4615. }
  4616. }
  4617. return result;
  4618. }
  4619. //#endregion
  4620. //#region node_modules/lodash-es/union.js
  4621. /**
  4622. * Creates an array of unique values, in order, from all given arrays using
  4623. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4624. * for equality comparisons.
  4625. *
  4626. * @static
  4627. * @memberOf _
  4628. * @since 0.1.0
  4629. * @category Array
  4630. * @param {...Array} [arrays] The arrays to inspect.
  4631. * @returns {Array} Returns the new array of combined values.
  4632. * @example
  4633. *
  4634. * _.union([2], [1, 2]);
  4635. * // => [2, 1]
  4636. */
  4637. var union = baseRest(function(arrays) {
  4638. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  4639. });
  4640. //#endregion
  4641. //#region node_modules/element-plus/es/utils/types.mjs
  4642. var isUndefined = (val) => val === void 0;
  4643. var isBoolean = (val) => typeof val === "boolean";
  4644. var isNumber = (val) => typeof val === "number";
  4645. var isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$2(val) && !Object.keys(val).length;
  4646. var isElement$1 = (e) => {
  4647. if (typeof Element === "undefined") return false;
  4648. return e instanceof Element;
  4649. };
  4650. var isPropAbsent = (prop) => isNil(prop);
  4651. var isStringNumber = (val) => {
  4652. if (!isString(val)) return false;
  4653. return !Number.isNaN(Number(val));
  4654. };
  4655. var isWindow = (val) => val === window;
  4656. //#endregion
  4657. //#region node_modules/element-plus/es/utils/objects.mjs
  4658. var keysOf = (arr) => Object.keys(arr);
  4659. var entriesOf = (arr) => Object.entries(arr);
  4660. var getProp = (obj, path, defaultValue) => {
  4661. return {
  4662. get value() {
  4663. return get(obj, path, defaultValue);
  4664. },
  4665. set value(val) {
  4666. set(obj, path, val);
  4667. }
  4668. };
  4669. };
  4670. //#endregion
  4671. //#region node_modules/element-plus/es/utils/vue/props/runtime.mjs
  4672. var epPropKey = "__epPropKey";
  4673. var definePropType = (val) => val;
  4674. var isEpProp = (val) => isObject$2(val) && !!val["__epPropKey"];
  4675. /**
  4676. * @description Build prop. It can better optimize prop types
  4677. * @description 生成 prop,能更好地优化类型
  4678. * @example
  4679. // limited options
  4680. // the type will be PropType<'light' | 'dark'>
  4681. buildProp({
  4682. type: String,
  4683. values: ['light', 'dark'],
  4684. } as const)
  4685. * @example
  4686. // limited options and other types
  4687. // the type will be PropType<'small' | 'large' | number>
  4688. buildProp({
  4689. type: [String, Number],
  4690. values: ['small', 'large'],
  4691. validator: (val: unknown): val is number => typeof val === 'number',
  4692. } as const)
  4693. @link see more: https://github.com/element-plus/element-plus/pull/3341
  4694. */
  4695. var buildProp = (prop, key) => {
  4696. if (!isObject$2(prop) || isEpProp(prop)) return prop;
  4697. const { values, required, default: defaultValue, type, validator } = prop;
  4698. const epProp = {
  4699. type,
  4700. required: !!required,
  4701. validator: values || validator ? (val) => {
  4702. let valid = false;
  4703. let allowedValues = [];
  4704. if (values) {
  4705. allowedValues = Array.from(values);
  4706. if (hasOwn(prop, "default")) allowedValues.push(defaultValue);
  4707. valid ||= allowedValues.includes(val);
  4708. }
  4709. if (validator) valid ||= validator(val);
  4710. if (!valid && allowedValues.length > 0) {
  4711. const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
  4712. warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
  4713. }
  4714. return valid;
  4715. } : void 0,
  4716. [epPropKey]: true
  4717. };
  4718. if (hasOwn(prop, "default")) epProp.default = defaultValue;
  4719. return epProp;
  4720. };
  4721. var buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
  4722. //#endregion
  4723. //#region node_modules/element-plus/es/components/teleport/src/teleport.mjs
  4724. var teleportProps = buildProps({
  4725. to: {
  4726. type: definePropType([String, Object]),
  4727. required: true
  4728. },
  4729. disabled: Boolean
  4730. });
  4731. //#endregion
  4732. //#region node_modules/element-plus/es/components/affix/src/affix.mjs
  4733. /**
  4734. * @deprecated Removed after 3.0.0, Use `AffixProps` instead.
  4735. */
  4736. var affixProps = buildProps({
  4737. zIndex: {
  4738. type: definePropType([Number, String]),
  4739. default: 100
  4740. },
  4741. target: {
  4742. type: String,
  4743. default: ""
  4744. },
  4745. offset: {
  4746. type: Number,
  4747. default: 0
  4748. },
  4749. position: {
  4750. type: String,
  4751. values: ["top", "bottom"],
  4752. default: "top"
  4753. },
  4754. teleported: Boolean,
  4755. appendTo: {
  4756. type: teleportProps.to.type,
  4757. default: "body"
  4758. }
  4759. });
  4760. var affixEmits = {
  4761. scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
  4762. [CHANGE_EVENT]: (fixed) => isBoolean(fixed)
  4763. };
  4764. //#endregion
  4765. //#region node_modules/element-plus/es/utils/error.mjs
  4766. var ElementPlusError = class extends Error {
  4767. constructor(m) {
  4768. super(m);
  4769. this.name = "ElementPlusError";
  4770. }
  4771. };
  4772. function throwError(scope, m) {
  4773. throw new ElementPlusError(`[${scope}] ${m}`);
  4774. }
  4775. function debugWarn(scope, message) {
  4776. {
  4777. const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
  4778. console.warn(error);
  4779. }
  4780. }
  4781. //#endregion
  4782. //#region node_modules/element-plus/es/hooks/use-attrs/index.mjs
  4783. var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
  4784. var LISTENER_PREFIX = /^on[A-Z]/;
  4785. var useAttrs = (params = {}) => {
  4786. const { excludeListeners = false, excludeKeys } = params;
  4787. const allExcludeKeys = computed(() => {
  4788. return (excludeKeys?.value || []).concat(DEFAULT_EXCLUDE_KEYS);
  4789. });
  4790. const instance = getCurrentInstance();
  4791. if (!instance) {
  4792. debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
  4793. return computed(() => ({}));
  4794. }
  4795. return computed(() => fromPairs(Object.entries(instance.proxy?.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key)))));
  4796. };
  4797. //#endregion
  4798. //#region node_modules/@vueuse/shared/index.mjs
  4799. function computedEager(fn, options) {
  4800. var _a;
  4801. const result = shallowRef();
  4802. watchEffect(() => {
  4803. result.value = fn();
  4804. }, {
  4805. ...options,
  4806. flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
  4807. });
  4808. return readonly(result);
  4809. }
  4810. function tryOnScopeDispose(fn) {
  4811. if (getCurrentScope()) {
  4812. onScopeDispose(fn);
  4813. return true;
  4814. }
  4815. return false;
  4816. }
  4817. function toValue(r) {
  4818. return typeof r === "function" ? r() : unref(r);
  4819. }
  4820. function toReactive(objectRef) {
  4821. if (!isRef(objectRef)) return reactive(objectRef);
  4822. return reactive(new Proxy({}, {
  4823. get(_, p, receiver) {
  4824. return unref(Reflect.get(objectRef.value, p, receiver));
  4825. },
  4826. set(_, p, value) {
  4827. if (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;
  4828. else objectRef.value[p] = value;
  4829. return true;
  4830. },
  4831. deleteProperty(_, p) {
  4832. return Reflect.deleteProperty(objectRef.value, p);
  4833. },
  4834. has(_, p) {
  4835. return Reflect.has(objectRef.value, p);
  4836. },
  4837. ownKeys() {
  4838. return Object.keys(objectRef.value);
  4839. },
  4840. getOwnPropertyDescriptor() {
  4841. return {
  4842. enumerable: true,
  4843. configurable: true
  4844. };
  4845. }
  4846. }));
  4847. }
  4848. function reactiveComputed(fn) {
  4849. return toReactive(computed(fn));
  4850. }
  4851. var isClient = typeof window !== "undefined" && typeof document !== "undefined";
  4852. typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
  4853. var isDef = (val) => typeof val !== "undefined";
  4854. var notNullish = (val) => val != null;
  4855. var toString = Object.prototype.toString;
  4856. var isObject = (val) => toString.call(val) === "[object Object]";
  4857. var clamp$1 = (n, min, max) => Math.min(max, Math.max(min, n));
  4858. var noop = () => {};
  4859. var isIOS = /* @__PURE__ */ getIsIOS();
  4860. function getIsIOS() {
  4861. var _a, _b;
  4862. return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
  4863. }
  4864. function createFilterWrapper(filter, fn) {
  4865. function wrapper(...args) {
  4866. return new Promise((resolve, reject) => {
  4867. Promise.resolve(filter(() => fn.apply(this, args), {
  4868. fn,
  4869. thisArg: this,
  4870. args
  4871. })).then(resolve).catch(reject);
  4872. });
  4873. }
  4874. return wrapper;
  4875. }
  4876. function debounceFilter(ms, options = {}) {
  4877. let timer;
  4878. let maxTimer;
  4879. let lastRejector = noop;
  4880. const _clearTimeout = (timer2) => {
  4881. clearTimeout(timer2);
  4882. lastRejector();
  4883. lastRejector = noop;
  4884. };
  4885. const filter = (invoke) => {
  4886. const duration = toValue(ms);
  4887. const maxDuration = toValue(options.maxWait);
  4888. if (timer) _clearTimeout(timer);
  4889. if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
  4890. if (maxTimer) {
  4891. _clearTimeout(maxTimer);
  4892. maxTimer = null;
  4893. }
  4894. return Promise.resolve(invoke());
  4895. }
  4896. return new Promise((resolve, reject) => {
  4897. lastRejector = options.rejectOnCancel ? reject : resolve;
  4898. if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
  4899. if (timer) _clearTimeout(timer);
  4900. maxTimer = null;
  4901. resolve(invoke());
  4902. }, maxDuration);
  4903. timer = setTimeout(() => {
  4904. if (maxTimer) _clearTimeout(maxTimer);
  4905. maxTimer = null;
  4906. resolve(invoke());
  4907. }, duration);
  4908. });
  4909. };
  4910. return filter;
  4911. }
  4912. function throttleFilter(...args) {
  4913. let lastExec = 0;
  4914. let timer;
  4915. let isLeading = true;
  4916. let lastRejector = noop;
  4917. let lastValue;
  4918. let ms;
  4919. let trailing;
  4920. let leading;
  4921. let rejectOnCancel;
  4922. if (!isRef(args[0]) && typeof args[0] === "object") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);
  4923. else [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
  4924. const clear = () => {
  4925. if (timer) {
  4926. clearTimeout(timer);
  4927. timer = void 0;
  4928. lastRejector();
  4929. lastRejector = noop;
  4930. }
  4931. };
  4932. const filter = (_invoke) => {
  4933. const duration = toValue(ms);
  4934. const elapsed = Date.now() - lastExec;
  4935. const invoke = () => {
  4936. return lastValue = _invoke();
  4937. };
  4938. clear();
  4939. if (duration <= 0) {
  4940. lastExec = Date.now();
  4941. return invoke();
  4942. }
  4943. if (elapsed > duration && (leading || !isLeading)) {
  4944. lastExec = Date.now();
  4945. invoke();
  4946. } else if (trailing) lastValue = new Promise((resolve, reject) => {
  4947. lastRejector = rejectOnCancel ? reject : resolve;
  4948. timer = setTimeout(() => {
  4949. lastExec = Date.now();
  4950. isLeading = true;
  4951. resolve(invoke());
  4952. clear();
  4953. }, Math.max(0, duration - elapsed));
  4954. });
  4955. if (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);
  4956. isLeading = false;
  4957. return lastValue;
  4958. };
  4959. return filter;
  4960. }
  4961. function cacheStringFunction(fn) {
  4962. const cache = /* @__PURE__ */ Object.create(null);
  4963. return (str) => {
  4964. return cache[str] || (cache[str] = fn(str));
  4965. };
  4966. }
  4967. var hyphenateRE = /\B([A-Z])/g;
  4968. cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
  4969. var camelizeRE = /-(\w)/g;
  4970. cacheStringFunction((str) => {
  4971. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  4972. });
  4973. function getLifeCycleTarget(target) {
  4974. return target || getCurrentInstance();
  4975. }
  4976. function useDebounceFn(fn, ms = 200, options = {}) {
  4977. return createFilterWrapper(debounceFilter(ms, options), fn);
  4978. }
  4979. function refDebounced(value, ms = 200, options = {}) {
  4980. const debounced = ref(value.value);
  4981. const updater = useDebounceFn(() => {
  4982. debounced.value = value.value;
  4983. }, ms, options);
  4984. watch(value, () => updater());
  4985. return debounced;
  4986. }
  4987. function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
  4988. return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
  4989. }
  4990. function tryOnMounted(fn, sync = true, target) {
  4991. if (getLifeCycleTarget()) onMounted(fn, target);
  4992. else if (sync) fn();
  4993. else nextTick(fn);
  4994. }
  4995. function useTimeoutFn(cb, interval, options = {}) {
  4996. const { immediate = true } = options;
  4997. const isPending = ref(false);
  4998. let timer = null;
  4999. function clear() {
  5000. if (timer) {
  5001. clearTimeout(timer);
  5002. timer = null;
  5003. }
  5004. }
  5005. function stop() {
  5006. isPending.value = false;
  5007. clear();
  5008. }
  5009. function start(...args) {
  5010. clear();
  5011. isPending.value = true;
  5012. timer = setTimeout(() => {
  5013. isPending.value = false;
  5014. timer = null;
  5015. cb(...args);
  5016. }, toValue(interval));
  5017. }
  5018. if (immediate) {
  5019. isPending.value = true;
  5020. if (isClient) start();
  5021. }
  5022. tryOnScopeDispose(stop);
  5023. return {
  5024. isPending: readonly(isPending),
  5025. start,
  5026. stop
  5027. };
  5028. }
  5029. //#endregion
  5030. //#region node_modules/@vueuse/core/index.mjs
  5031. var defaultWindow = isClient ? window : void 0;
  5032. var defaultDocument = isClient ? window.document : void 0;
  5033. isClient && window.navigator;
  5034. isClient && window.location;
  5035. function unrefElement(elRef) {
  5036. var _a;
  5037. const plain = toValue(elRef);
  5038. return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
  5039. }
  5040. function useEventListener(...args) {
  5041. let target;
  5042. let events;
  5043. let listeners;
  5044. let options;
  5045. if (typeof args[0] === "string" || Array.isArray(args[0])) {
  5046. [events, listeners, options] = args;
  5047. target = defaultWindow;
  5048. } else [target, events, listeners, options] = args;
  5049. if (!target) return noop;
  5050. if (!Array.isArray(events)) events = [events];
  5051. if (!Array.isArray(listeners)) listeners = [listeners];
  5052. const cleanups = [];
  5053. const cleanup = () => {
  5054. cleanups.forEach((fn) => fn());
  5055. cleanups.length = 0;
  5056. };
  5057. const register = (el, event, listener, options2) => {
  5058. el.addEventListener(event, listener, options2);
  5059. return () => el.removeEventListener(event, listener, options2);
  5060. };
  5061. const stopWatch = watch(() => [unrefElement(target), toValue(options)], ([el, options2]) => {
  5062. cleanup();
  5063. if (!el) return;
  5064. const optionsClone = isObject(options2) ? { ...options2 } : options2;
  5065. cleanups.push(...events.flatMap((event) => {
  5066. return listeners.map((listener) => register(el, event, listener, optionsClone));
  5067. }));
  5068. }, {
  5069. immediate: true,
  5070. flush: "post"
  5071. });
  5072. const stop = () => {
  5073. stopWatch();
  5074. cleanup();
  5075. };
  5076. tryOnScopeDispose(stop);
  5077. return stop;
  5078. }
  5079. var _iOSWorkaround = false;
  5080. function onClickOutside(target, handler, options = {}) {
  5081. const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
  5082. if (!window) return noop;
  5083. if (isIOS && !_iOSWorkaround) {
  5084. _iOSWorkaround = true;
  5085. Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", noop));
  5086. window.document.documentElement.addEventListener("click", noop);
  5087. }
  5088. let shouldListen = true;
  5089. const shouldIgnore = (event) => {
  5090. return toValue(ignore).some((target2) => {
  5091. if (typeof target2 === "string") return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
  5092. else {
  5093. const el = unrefElement(target2);
  5094. return el && (event.target === el || event.composedPath().includes(el));
  5095. }
  5096. });
  5097. };
  5098. function hasMultipleRoots(target2) {
  5099. const vm = toValue(target2);
  5100. return vm && vm.$.subTree.shapeFlag === 16;
  5101. }
  5102. function checkMultipleRoots(target2, event) {
  5103. const vm = toValue(target2);
  5104. const children = vm.$.subTree && vm.$.subTree.children;
  5105. if (children == null || !Array.isArray(children)) return false;
  5106. return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
  5107. }
  5108. const listener = (event) => {
  5109. const el = unrefElement(target);
  5110. if (event.target == null) return;
  5111. if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
  5112. if (!el || el === event.target || event.composedPath().includes(el)) return;
  5113. if (event.detail === 0) shouldListen = !shouldIgnore(event);
  5114. if (!shouldListen) {
  5115. shouldListen = true;
  5116. return;
  5117. }
  5118. handler(event);
  5119. };
  5120. let isProcessingClick = false;
  5121. const cleanup = [
  5122. useEventListener(window, "click", (event) => {
  5123. if (!isProcessingClick) {
  5124. isProcessingClick = true;
  5125. setTimeout(() => {
  5126. isProcessingClick = false;
  5127. }, 0);
  5128. listener(event);
  5129. }
  5130. }, {
  5131. passive: true,
  5132. capture
  5133. }),
  5134. useEventListener(window, "pointerdown", (e) => {
  5135. const el = unrefElement(target);
  5136. shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
  5137. }, { passive: true }),
  5138. detectIframe && useEventListener(window, "blur", (event) => {
  5139. setTimeout(() => {
  5140. var _a;
  5141. const el = unrefElement(target);
  5142. if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement))) handler(event);
  5143. }, 0);
  5144. })
  5145. ].filter(Boolean);
  5146. const stop = () => cleanup.forEach((fn) => fn());
  5147. return stop;
  5148. }
  5149. function useMounted() {
  5150. const isMounted = ref(false);
  5151. const instance = getCurrentInstance();
  5152. if (instance) onMounted(() => {
  5153. isMounted.value = true;
  5154. }, instance);
  5155. return isMounted;
  5156. }
  5157. function useSupported(callback) {
  5158. const isMounted = useMounted();
  5159. return computed(() => {
  5160. isMounted.value;
  5161. return Boolean(callback());
  5162. });
  5163. }
  5164. function useMutationObserver(target, callback, options = {}) {
  5165. const { window = defaultWindow, ...mutationOptions } = options;
  5166. let observer;
  5167. const isSupported = useSupported(() => window && "MutationObserver" in window);
  5168. const cleanup = () => {
  5169. if (observer) {
  5170. observer.disconnect();
  5171. observer = void 0;
  5172. }
  5173. };
  5174. const targets = computed(() => {
  5175. const value = toValue(target);
  5176. const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);
  5177. return new Set(items);
  5178. });
  5179. const stopWatch = watch(() => targets.value, (targets2) => {
  5180. cleanup();
  5181. if (isSupported.value && targets2.size) {
  5182. observer = new MutationObserver(callback);
  5183. targets2.forEach((el) => observer.observe(el, mutationOptions));
  5184. }
  5185. }, {
  5186. immediate: true,
  5187. flush: "post"
  5188. });
  5189. const takeRecords = () => {
  5190. return observer == null ? void 0 : observer.takeRecords();
  5191. };
  5192. const stop = () => {
  5193. stopWatch();
  5194. cleanup();
  5195. };
  5196. tryOnScopeDispose(stop);
  5197. return {
  5198. isSupported,
  5199. stop,
  5200. takeRecords
  5201. };
  5202. }
  5203. function useActiveElement(options = {}) {
  5204. var _a;
  5205. const { window = defaultWindow, deep = true, triggerOnRemoval = false } = options;
  5206. const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;
  5207. const getDeepActiveElement = () => {
  5208. var _a2;
  5209. let element = document == null ? void 0 : document.activeElement;
  5210. if (deep) while (element == null ? void 0 : element.shadowRoot) element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;
  5211. return element;
  5212. };
  5213. const activeElement = ref();
  5214. const trigger = () => {
  5215. activeElement.value = getDeepActiveElement();
  5216. };
  5217. if (window) {
  5218. useEventListener(window, "blur", (event) => {
  5219. if (event.relatedTarget !== null) return;
  5220. trigger();
  5221. }, true);
  5222. useEventListener(window, "focus", trigger, true);
  5223. }
  5224. if (triggerOnRemoval) useMutationObserver(document, (mutations) => {
  5225. mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {
  5226. if (node === activeElement.value) trigger();
  5227. });
  5228. }, {
  5229. childList: true,
  5230. subtree: true
  5231. });
  5232. trigger();
  5233. return activeElement;
  5234. }
  5235. function useMediaQuery(query, options = {}) {
  5236. const { window = defaultWindow } = options;
  5237. const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
  5238. let mediaQuery;
  5239. const matches = ref(false);
  5240. const handler = (event) => {
  5241. matches.value = event.matches;
  5242. };
  5243. const cleanup = () => {
  5244. if (!mediaQuery) return;
  5245. if ("removeEventListener" in mediaQuery) mediaQuery.removeEventListener("change", handler);
  5246. else mediaQuery.removeListener(handler);
  5247. };
  5248. const stopWatch = watchEffect(() => {
  5249. if (!isSupported.value) return;
  5250. cleanup();
  5251. mediaQuery = window.matchMedia(toValue(query));
  5252. if ("addEventListener" in mediaQuery) mediaQuery.addEventListener("change", handler);
  5253. else mediaQuery.addListener(handler);
  5254. matches.value = mediaQuery.matches;
  5255. });
  5256. tryOnScopeDispose(() => {
  5257. stopWatch();
  5258. cleanup();
  5259. mediaQuery = void 0;
  5260. });
  5261. return matches;
  5262. }
  5263. function cloneFnJSON(source) {
  5264. return JSON.parse(JSON.stringify(source));
  5265. }
  5266. function useCssVar(prop, target, options = {}) {
  5267. const { window = defaultWindow, initialValue, observe = false } = options;
  5268. const variable = ref(initialValue);
  5269. const elRef = computed(() => {
  5270. var _a;
  5271. return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
  5272. });
  5273. function updateCssVar() {
  5274. var _a;
  5275. const key = toValue(prop);
  5276. const el = toValue(elRef);
  5277. if (el && window && key) variable.value = ((_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim()) || initialValue;
  5278. }
  5279. if (observe) useMutationObserver(elRef, updateCssVar, {
  5280. attributeFilter: ["style", "class"],
  5281. window
  5282. });
  5283. watch([elRef, () => toValue(prop)], (_, old) => {
  5284. if (old[0] && old[1]) old[0].style.removeProperty(old[1]);
  5285. updateCssVar();
  5286. }, { immediate: true });
  5287. watch(variable, (val) => {
  5288. var _a;
  5289. const raw_prop = toValue(prop);
  5290. if (((_a = elRef.value) == null ? void 0 : _a.style) && raw_prop) if (val == null) elRef.value.style.removeProperty(raw_prop);
  5291. else elRef.value.style.setProperty(raw_prop, val);
  5292. });
  5293. return variable;
  5294. }
  5295. function useDocumentVisibility(options = {}) {
  5296. const { document = defaultDocument } = options;
  5297. if (!document) return ref("visible");
  5298. const visibility = ref(document.visibilityState);
  5299. useEventListener(document, "visibilitychange", () => {
  5300. visibility.value = document.visibilityState;
  5301. });
  5302. return visibility;
  5303. }
  5304. function useResizeObserver(target, callback, options = {}) {
  5305. const { window = defaultWindow, ...observerOptions } = options;
  5306. let observer;
  5307. const isSupported = useSupported(() => window && "ResizeObserver" in window);
  5308. const cleanup = () => {
  5309. if (observer) {
  5310. observer.disconnect();
  5311. observer = void 0;
  5312. }
  5313. };
  5314. const stopWatch = watch(computed(() => {
  5315. const _targets = toValue(target);
  5316. return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
  5317. }), (els) => {
  5318. cleanup();
  5319. if (isSupported.value && window) {
  5320. observer = new ResizeObserver(callback);
  5321. for (const _el of els) if (_el) observer.observe(_el, observerOptions);
  5322. }
  5323. }, {
  5324. immediate: true,
  5325. flush: "post"
  5326. });
  5327. const stop = () => {
  5328. cleanup();
  5329. stopWatch();
  5330. };
  5331. tryOnScopeDispose(stop);
  5332. return {
  5333. isSupported,
  5334. stop
  5335. };
  5336. }
  5337. function useElementBounding(target, options = {}) {
  5338. const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options;
  5339. const height = ref(0);
  5340. const bottom = ref(0);
  5341. const left = ref(0);
  5342. const right = ref(0);
  5343. const top = ref(0);
  5344. const width = ref(0);
  5345. const x = ref(0);
  5346. const y = ref(0);
  5347. function recalculate() {
  5348. const el = unrefElement(target);
  5349. if (!el) {
  5350. if (reset) {
  5351. height.value = 0;
  5352. bottom.value = 0;
  5353. left.value = 0;
  5354. right.value = 0;
  5355. top.value = 0;
  5356. width.value = 0;
  5357. x.value = 0;
  5358. y.value = 0;
  5359. }
  5360. return;
  5361. }
  5362. const rect = el.getBoundingClientRect();
  5363. height.value = rect.height;
  5364. bottom.value = rect.bottom;
  5365. left.value = rect.left;
  5366. right.value = rect.right;
  5367. top.value = rect.top;
  5368. width.value = rect.width;
  5369. x.value = rect.x;
  5370. y.value = rect.y;
  5371. }
  5372. function update() {
  5373. if (updateTiming === "sync") recalculate();
  5374. else if (updateTiming === "next-frame") requestAnimationFrame(() => recalculate());
  5375. }
  5376. useResizeObserver(target, update);
  5377. watch(() => unrefElement(target), (ele) => !ele && update());
  5378. useMutationObserver(target, update, { attributeFilter: ["style", "class"] });
  5379. if (windowScroll) useEventListener("scroll", update, {
  5380. capture: true,
  5381. passive: true
  5382. });
  5383. if (windowResize) useEventListener("resize", update, { passive: true });
  5384. tryOnMounted(() => {
  5385. if (immediate) update();
  5386. });
  5387. return {
  5388. height,
  5389. bottom,
  5390. left,
  5391. right,
  5392. top,
  5393. width,
  5394. x,
  5395. y,
  5396. update
  5397. };
  5398. }
  5399. function useElementSize(target, initialSize = {
  5400. width: 0,
  5401. height: 0
  5402. }, options = {}) {
  5403. const { window = defaultWindow, box = "content-box" } = options;
  5404. const isSVG = computed(() => {
  5405. var _a, _b;
  5406. return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
  5407. });
  5408. const width = ref(initialSize.width);
  5409. const height = ref(initialSize.height);
  5410. const { stop: stop1 } = useResizeObserver(target, ([entry]) => {
  5411. const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
  5412. if (window && isSVG.value) {
  5413. const $elem = unrefElement(target);
  5414. if ($elem) {
  5415. const rect = $elem.getBoundingClientRect();
  5416. width.value = rect.width;
  5417. height.value = rect.height;
  5418. }
  5419. } else if (boxSize) {
  5420. const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
  5421. width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
  5422. height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
  5423. } else {
  5424. width.value = entry.contentRect.width;
  5425. height.value = entry.contentRect.height;
  5426. }
  5427. }, options);
  5428. tryOnMounted(() => {
  5429. const ele = unrefElement(target);
  5430. if (ele) {
  5431. width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
  5432. height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
  5433. }
  5434. });
  5435. const stop2 = watch(() => unrefElement(target), (ele) => {
  5436. width.value = ele ? initialSize.width : 0;
  5437. height.value = ele ? initialSize.height : 0;
  5438. });
  5439. function stop() {
  5440. stop1();
  5441. stop2();
  5442. }
  5443. return {
  5444. width,
  5445. height,
  5446. stop
  5447. };
  5448. }
  5449. function useIntersectionObserver(target, callback, options = {}) {
  5450. const { root, rootMargin = "0px", threshold = 0, window = defaultWindow, immediate = true } = options;
  5451. const isSupported = useSupported(() => window && "IntersectionObserver" in window);
  5452. const targets = computed(() => {
  5453. const _target = toValue(target);
  5454. return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
  5455. });
  5456. let cleanup = noop;
  5457. const isActive = ref(immediate);
  5458. const stopWatch = isSupported.value ? watch(() => [
  5459. targets.value,
  5460. unrefElement(root),
  5461. isActive.value
  5462. ], ([targets2, root2]) => {
  5463. cleanup();
  5464. if (!isActive.value) return;
  5465. if (!targets2.length) return;
  5466. const observer = new IntersectionObserver(callback, {
  5467. root: unrefElement(root2),
  5468. rootMargin,
  5469. threshold
  5470. });
  5471. targets2.forEach((el) => el && observer.observe(el));
  5472. cleanup = () => {
  5473. observer.disconnect();
  5474. cleanup = noop;
  5475. };
  5476. }, {
  5477. immediate,
  5478. flush: "post"
  5479. }) : noop;
  5480. const stop = () => {
  5481. cleanup();
  5482. stopWatch();
  5483. isActive.value = false;
  5484. };
  5485. tryOnScopeDispose(stop);
  5486. return {
  5487. isSupported,
  5488. isActive,
  5489. pause() {
  5490. cleanup();
  5491. isActive.value = false;
  5492. },
  5493. resume() {
  5494. isActive.value = true;
  5495. },
  5496. stop
  5497. };
  5498. }
  5499. Number.POSITIVE_INFINITY;
  5500. function useVModel(props, key, emit, options = {}) {
  5501. var _a, _b, _c;
  5502. const { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;
  5503. const vm = getCurrentInstance();
  5504. const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.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));
  5505. let event = eventName;
  5506. if (!key) key = "modelValue";
  5507. event = event || `update:${key.toString()}`;
  5508. const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
  5509. const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
  5510. const triggerEmit = (value) => {
  5511. if (shouldEmit) {
  5512. if (shouldEmit(value)) _emit(event, value);
  5513. } else _emit(event, value);
  5514. };
  5515. if (passive) {
  5516. const proxy = ref(getValue());
  5517. let isUpdating = false;
  5518. watch(() => props[key], (v) => {
  5519. if (!isUpdating) {
  5520. isUpdating = true;
  5521. proxy.value = cloneFn(v);
  5522. nextTick(() => isUpdating = false);
  5523. }
  5524. });
  5525. watch(proxy, (v) => {
  5526. if (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);
  5527. }, { deep });
  5528. return proxy;
  5529. } else return computed({
  5530. get() {
  5531. return getValue();
  5532. },
  5533. set(value) {
  5534. triggerEmit(value);
  5535. }
  5536. });
  5537. }
  5538. function useWindowFocus(options = {}) {
  5539. const { window = defaultWindow } = options;
  5540. if (!window) return ref(false);
  5541. const focused = ref(window.document.hasFocus());
  5542. useEventListener(window, "blur", () => {
  5543. focused.value = false;
  5544. });
  5545. useEventListener(window, "focus", () => {
  5546. focused.value = true;
  5547. });
  5548. return focused;
  5549. }
  5550. function useWindowSize(options = {}) {
  5551. const { window = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options;
  5552. const width = ref(initialWidth);
  5553. const height = ref(initialHeight);
  5554. const update = () => {
  5555. if (window) if (type === "outer") {
  5556. width.value = window.outerWidth;
  5557. height.value = window.outerHeight;
  5558. } else if (includeScrollbar) {
  5559. width.value = window.innerWidth;
  5560. height.value = window.innerHeight;
  5561. } else {
  5562. width.value = window.document.documentElement.clientWidth;
  5563. height.value = window.document.documentElement.clientHeight;
  5564. }
  5565. };
  5566. update();
  5567. tryOnMounted(update);
  5568. useEventListener("resize", update, { passive: true });
  5569. if (listenOrientation) watch(useMediaQuery("(orientation: portrait)"), () => update());
  5570. return {
  5571. width,
  5572. height
  5573. };
  5574. }
  5575. //#endregion
  5576. //#region node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
  5577. function useCalcInputWidth() {
  5578. const calculatorRef = shallowRef();
  5579. const calculatorWidth = ref(0);
  5580. const inputStyle = computed(() => ({ minWidth: `${Math.max(calculatorWidth.value, 11)}px` }));
  5581. const resetCalculatorWidth = () => {
  5582. calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
  5583. };
  5584. useResizeObserver(calculatorRef, resetCalculatorWidth);
  5585. return {
  5586. calculatorRef,
  5587. calculatorWidth,
  5588. inputStyle
  5589. };
  5590. }
  5591. //#endregion
  5592. //#region node_modules/element-plus/es/hooks/use-deprecated/index.mjs
  5593. var useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
  5594. watch(() => unref(condition), (val) => {
  5595. if (val) debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
  5596. For more detail, please visit: ${ref}
  5597. `);
  5598. }, { immediate: true });
  5599. };
  5600. //#endregion
  5601. //#region node_modules/element-plus/es/utils/dom/aria.mjs
  5602. 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])`;
  5603. var isShadowRoot$1 = (e) => {
  5604. if (typeof ShadowRoot === "undefined") return false;
  5605. return e instanceof ShadowRoot;
  5606. };
  5607. var isHTMLElement$1 = (e) => {
  5608. if (typeof Element === "undefined") return false;
  5609. return e instanceof Element;
  5610. };
  5611. /**
  5612. * Determine if the testing element is visible on screen no matter if its on the viewport or not
  5613. */
  5614. var isVisible = (element) => {
  5615. return getComputedStyle(element).position === "fixed" ? false : element.offsetParent !== null;
  5616. };
  5617. var obtainAllFocusableElements$1 = (element) => {
  5618. return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
  5619. };
  5620. /**
  5621. * @desc Determine if target element is focusable
  5622. * @param element {HTMLElement}
  5623. * @returns {Boolean} true if it is focusable
  5624. */
  5625. var isFocusable = (element) => {
  5626. if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) return true;
  5627. if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") return false;
  5628. switch (element.nodeName) {
  5629. case "A": return !!element.href && element.rel !== "ignore";
  5630. case "INPUT": return !(element.type === "hidden" || element.type === "file");
  5631. case "BUTTON":
  5632. case "SELECT":
  5633. case "TEXTAREA": return true;
  5634. default: return false;
  5635. }
  5636. };
  5637. /**
  5638. * Trigger an event
  5639. * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
  5640. * @param {HTMLElement} elm
  5641. * @param {String} name
  5642. * @param {*} opts
  5643. */
  5644. var triggerEvent = function(elm, name, ...opts) {
  5645. let eventName;
  5646. if (name.includes("mouse") || name.includes("click")) eventName = "MouseEvents";
  5647. else if (name.includes("key")) eventName = "KeyboardEvent";
  5648. else eventName = "HTMLEvents";
  5649. const evt = document.createEvent(eventName);
  5650. evt.initEvent(name, ...opts);
  5651. elm.dispatchEvent(evt);
  5652. return elm;
  5653. };
  5654. var isLeaf = (el) => !el.getAttribute("aria-owns");
  5655. var getSibling = (el, distance, elClass) => {
  5656. const { parentNode } = el;
  5657. if (!parentNode) return null;
  5658. const siblings = parentNode.querySelectorAll(elClass);
  5659. return siblings[Array.prototype.indexOf.call(siblings, el) + distance] || null;
  5660. };
  5661. var focusElement = (el, options) => {
  5662. if (!el || !el.focus) return;
  5663. let cleanup = false;
  5664. if (isHTMLElement$1(el) && !isFocusable(el) && !el.getAttribute("tabindex")) {
  5665. el.setAttribute("tabindex", "-1");
  5666. cleanup = true;
  5667. }
  5668. el.focus(options);
  5669. if (isHTMLElement$1(el) && cleanup) el.removeAttribute("tabindex");
  5670. };
  5671. var focusNode = (el) => {
  5672. if (!el) return;
  5673. focusElement(el);
  5674. !isLeaf(el) && el.click();
  5675. };
  5676. //#endregion
  5677. //#region node_modules/element-plus/es/utils/browser.mjs
  5678. var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
  5679. var isAndroid = () => isClient && /android/i.test(window.navigator.userAgent);
  5680. //#endregion
  5681. //#region node_modules/element-plus/es/utils/strings.mjs
  5682. /**
  5683. * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
  5684. */
  5685. var escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
  5686. var capitalize = (str) => capitalize$1(str);
  5687. //#endregion
  5688. //#region node_modules/element-plus/es/utils/dom/style.mjs
  5689. var SCOPE$12 = "utils/dom/style";
  5690. var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
  5691. var hasClass = (el, cls) => {
  5692. if (!el || !cls) return false;
  5693. if (cls.includes(" ")) throw new Error("className should not contain space.");
  5694. return el.classList.contains(cls);
  5695. };
  5696. var addClass = (el, cls) => {
  5697. if (!el || !cls.trim()) return;
  5698. el.classList.add(...classNameToArray(cls));
  5699. };
  5700. var removeClass = (el, cls) => {
  5701. if (!el || !cls.trim()) return;
  5702. el.classList.remove(...classNameToArray(cls));
  5703. };
  5704. var getStyle = (element, styleName) => {
  5705. if (!isClient || !element || !styleName || isShadowRoot$1(element)) return "";
  5706. let key = camelize$1(styleName);
  5707. if (key === "float") key = "cssFloat";
  5708. try {
  5709. const style = element.style[key];
  5710. if (style) return style;
  5711. const computed = document.defaultView?.getComputedStyle(element, "");
  5712. return computed ? computed[key] : "";
  5713. } catch {
  5714. return element.style[key];
  5715. }
  5716. };
  5717. var setStyle = (element, styleName, value) => {
  5718. if (!element || !styleName) return;
  5719. if (isObject$2(styleName)) entriesOf(styleName).forEach(([prop, value]) => setStyle(element, prop, value));
  5720. else {
  5721. const key = camelize$1(styleName);
  5722. element.style[key] = value;
  5723. }
  5724. };
  5725. function addUnit(value, defaultUnit = "px") {
  5726. if (!value && value !== 0) return "";
  5727. if (isNumber(value) || isStringNumber(value)) return `${value}${defaultUnit}`;
  5728. else if (isString(value)) return value;
  5729. debugWarn(SCOPE$12, "binding value must be a string or number");
  5730. }
  5731. //#endregion
  5732. //#region node_modules/element-plus/es/hooks/use-draggable/index.mjs
  5733. var useDraggable = (targetRef, dragRef, draggable, overflow) => {
  5734. const transform = {
  5735. offsetX: 0,
  5736. offsetY: 0
  5737. };
  5738. const isDragging = ref(false);
  5739. const adjustPosition = (moveX, moveY) => {
  5740. if (targetRef.value) {
  5741. const { offsetX, offsetY } = transform;
  5742. const targetRect = targetRef.value.getBoundingClientRect();
  5743. const targetLeft = targetRect.left;
  5744. const targetTop = targetRect.top;
  5745. const targetWidth = targetRect.width;
  5746. const targetHeight = targetRect.height;
  5747. const clientWidth = document.documentElement.clientWidth;
  5748. const clientHeight = document.documentElement.clientHeight;
  5749. const minLeft = -targetLeft + offsetX;
  5750. const minTop = -targetTop + offsetY;
  5751. const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
  5752. const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY;
  5753. if (!overflow?.value) {
  5754. moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
  5755. moveY = Math.min(Math.max(moveY, minTop), maxTop);
  5756. }
  5757. transform.offsetX = moveX;
  5758. transform.offsetY = moveY;
  5759. targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
  5760. }
  5761. };
  5762. const onMousedown = (e) => {
  5763. const downX = e.clientX;
  5764. const downY = e.clientY;
  5765. const { offsetX, offsetY } = transform;
  5766. const onMousemove = (e) => {
  5767. if (!isDragging.value) isDragging.value = true;
  5768. adjustPosition(offsetX + e.clientX - downX, offsetY + e.clientY - downY);
  5769. };
  5770. const onMouseup = () => {
  5771. isDragging.value = false;
  5772. document.removeEventListener("mousemove", onMousemove);
  5773. document.removeEventListener("mouseup", onMouseup);
  5774. };
  5775. document.addEventListener("mousemove", onMousemove);
  5776. document.addEventListener("mouseup", onMouseup);
  5777. };
  5778. const onDraggable = () => {
  5779. if (dragRef.value && targetRef.value) {
  5780. dragRef.value.addEventListener("mousedown", onMousedown);
  5781. window.addEventListener("resize", updatePosition);
  5782. }
  5783. };
  5784. const offDraggable = () => {
  5785. if (dragRef.value && targetRef.value) {
  5786. dragRef.value.removeEventListener("mousedown", onMousedown);
  5787. window.removeEventListener("resize", updatePosition);
  5788. }
  5789. };
  5790. const resetPosition = () => {
  5791. transform.offsetX = 0;
  5792. transform.offsetY = 0;
  5793. if (targetRef.value) targetRef.value.style.transform = "";
  5794. };
  5795. const updatePosition = () => {
  5796. const { offsetX, offsetY } = transform;
  5797. adjustPosition(offsetX, offsetY);
  5798. };
  5799. onMounted(() => {
  5800. watchEffect(() => {
  5801. if (draggable.value) onDraggable();
  5802. else offDraggable();
  5803. });
  5804. });
  5805. onBeforeUnmount(() => {
  5806. offDraggable();
  5807. });
  5808. return {
  5809. isDragging,
  5810. resetPosition,
  5811. updatePosition
  5812. };
  5813. };
  5814. //#endregion
  5815. //#region node_modules/element-plus/es/hooks/use-focus/index.mjs
  5816. var useFocus = (el) => {
  5817. return { focus: () => {
  5818. el.value?.focus?.();
  5819. } };
  5820. };
  5821. //#endregion
  5822. //#region node_modules/element-plus/es/locale/lang/en.mjs
  5823. var en_default = {
  5824. name: "en",
  5825. el: {
  5826. breadcrumb: { label: "Breadcrumb" },
  5827. colorpicker: {
  5828. confirm: "OK",
  5829. clear: "Clear",
  5830. defaultLabel: "color picker",
  5831. description: "current color is {color}. press enter to select a new color.",
  5832. alphaLabel: "pick alpha value",
  5833. alphaDescription: "alpha {alpha}, current color is {color}",
  5834. hueLabel: "pick hue value",
  5835. hueDescription: "hue {hue}, current color is {color}",
  5836. svLabel: "pick saturation and brightness value",
  5837. svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
  5838. predefineDescription: "select {value} as the color"
  5839. },
  5840. datepicker: {
  5841. now: "Now",
  5842. today: "Today",
  5843. cancel: "Cancel",
  5844. clear: "Clear",
  5845. confirm: "OK",
  5846. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  5847. monthTablePrompt: "Use the arrow keys and enter to select the month",
  5848. yearTablePrompt: "Use the arrow keys and enter to select the year",
  5849. selectedDate: "Selected date",
  5850. selectDate: "Select date",
  5851. selectTime: "Select time",
  5852. startDate: "Start Date",
  5853. startTime: "Start Time",
  5854. endDate: "End Date",
  5855. endTime: "End Time",
  5856. prevYear: "Previous Year",
  5857. nextYear: "Next Year",
  5858. prevMonth: "Previous Month",
  5859. nextMonth: "Next Month",
  5860. year: "",
  5861. month1: "January",
  5862. month2: "February",
  5863. month3: "March",
  5864. month4: "April",
  5865. month5: "May",
  5866. month6: "June",
  5867. month7: "July",
  5868. month8: "August",
  5869. month9: "September",
  5870. month10: "October",
  5871. month11: "November",
  5872. month12: "December",
  5873. weeks: {
  5874. sun: "Sun",
  5875. mon: "Mon",
  5876. tue: "Tue",
  5877. wed: "Wed",
  5878. thu: "Thu",
  5879. fri: "Fri",
  5880. sat: "Sat"
  5881. },
  5882. weeksFull: {
  5883. sun: "Sunday",
  5884. mon: "Monday",
  5885. tue: "Tuesday",
  5886. wed: "Wednesday",
  5887. thu: "Thursday",
  5888. fri: "Friday",
  5889. sat: "Saturday"
  5890. },
  5891. months: {
  5892. jan: "Jan",
  5893. feb: "Feb",
  5894. mar: "Mar",
  5895. apr: "Apr",
  5896. may: "May",
  5897. jun: "Jun",
  5898. jul: "Jul",
  5899. aug: "Aug",
  5900. sep: "Sep",
  5901. oct: "Oct",
  5902. nov: "Nov",
  5903. dec: "Dec"
  5904. }
  5905. },
  5906. inputNumber: {
  5907. decrease: "decrease number",
  5908. increase: "increase number"
  5909. },
  5910. select: {
  5911. loading: "Loading",
  5912. noMatch: "No matching data",
  5913. noData: "No data",
  5914. placeholder: "Select"
  5915. },
  5916. mention: { loading: "Loading" },
  5917. dropdown: { toggleDropdown: "Toggle Dropdown" },
  5918. cascader: {
  5919. noMatch: "No matching data",
  5920. loading: "Loading",
  5921. placeholder: "Select",
  5922. noData: "No data"
  5923. },
  5924. pagination: {
  5925. goto: "Go to",
  5926. pagesize: "/page",
  5927. total: "Total {total}",
  5928. pageClassifier: "",
  5929. page: "Page",
  5930. prev: "Go to previous page",
  5931. next: "Go to next page",
  5932. currentPage: "page {pager}",
  5933. prevPages: "Previous {pager} pages",
  5934. nextPages: "Next {pager} pages",
  5935. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  5936. },
  5937. dialog: { close: "Close this dialog" },
  5938. drawer: { close: "Close this dialog" },
  5939. messagebox: {
  5940. title: "Message",
  5941. confirm: "OK",
  5942. cancel: "Cancel",
  5943. error: "Illegal input",
  5944. close: "Close this dialog"
  5945. },
  5946. upload: {
  5947. deleteTip: "press delete to remove",
  5948. delete: "Delete",
  5949. preview: "Preview",
  5950. continue: "Continue"
  5951. },
  5952. slider: {
  5953. defaultLabel: "slider between {min} and {max}",
  5954. defaultRangeStartLabel: "pick start value",
  5955. defaultRangeEndLabel: "pick end value"
  5956. },
  5957. table: {
  5958. emptyText: "No Data",
  5959. confirmFilter: "Confirm",
  5960. resetFilter: "Reset",
  5961. clearFilter: "All",
  5962. sumText: "Sum",
  5963. selectAllLabel: "Select all rows",
  5964. selectRowLabel: "Select this row",
  5965. expandRowLabel: "Expand this row",
  5966. collapseRowLabel: "Collapse this row",
  5967. sortLabel: "Sort by {column}",
  5968. filterLabel: "Filter by {column}"
  5969. },
  5970. tag: { close: "Close this tag" },
  5971. tour: {
  5972. next: "Next",
  5973. previous: "Previous",
  5974. finish: "Finish",
  5975. close: "Close this dialog"
  5976. },
  5977. tree: { emptyText: "No Data" },
  5978. transfer: {
  5979. noMatch: "No matching data",
  5980. noData: "No data",
  5981. titles: ["List 1", "List 2"],
  5982. filterPlaceholder: "Enter keyword",
  5983. noCheckedFormat: "{total} items",
  5984. hasCheckedFormat: "{checked}/{total} checked"
  5985. },
  5986. image: { error: "FAILED" },
  5987. pageHeader: { title: "Back" },
  5988. popconfirm: {
  5989. confirmButtonText: "Yes",
  5990. cancelButtonText: "No"
  5991. },
  5992. carousel: {
  5993. leftArrow: "Carousel arrow left",
  5994. rightArrow: "Carousel arrow right",
  5995. indicator: "Carousel switch to index {index}"
  5996. }
  5997. }
  5998. };
  5999. //#endregion
  6000. //#region node_modules/element-plus/es/hooks/use-locale/index.mjs
  6001. var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
  6002. var translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => `${option?.[key] ?? `{${key}}`}`);
  6003. var buildLocaleContext = (locale) => {
  6004. return {
  6005. lang: computed(() => unref(locale).name),
  6006. locale: isRef(locale) ? locale : ref(locale),
  6007. t: buildTranslator(locale)
  6008. };
  6009. };
  6010. var localeContextKey = Symbol("localeContextKey");
  6011. var useLocale = (localeOverrides) => {
  6012. const locale = localeOverrides || inject(localeContextKey, ref());
  6013. return buildLocaleContext(computed(() => locale.value || en_default));
  6014. };
  6015. //#endregion
  6016. //#region node_modules/element-plus/es/hooks/use-namespace/index.mjs
  6017. var defaultNamespace = "el";
  6018. var statePrefix = "is-";
  6019. var _bem = (namespace, block, blockSuffix, element, modifier) => {
  6020. let cls = `${namespace}-${block}`;
  6021. if (blockSuffix) cls += `-${blockSuffix}`;
  6022. if (element) cls += `__${element}`;
  6023. if (modifier) cls += `--${modifier}`;
  6024. return cls;
  6025. };
  6026. var namespaceContextKey = Symbol("namespaceContextKey");
  6027. var useGetDerivedNamespace = (namespaceOverrides) => {
  6028. const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("el")) : ref("el"));
  6029. return computed(() => {
  6030. return unref(derivedNamespace) || "el";
  6031. });
  6032. };
  6033. var useNamespace = (block, namespaceOverrides) => {
  6034. const namespace = useGetDerivedNamespace(namespaceOverrides);
  6035. const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
  6036. const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
  6037. const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
  6038. const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
  6039. const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
  6040. const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
  6041. const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
  6042. const is = (name, ...args) => {
  6043. const state = args.length >= 1 ? args[0] : true;
  6044. return name && state ? `${statePrefix}${name}` : "";
  6045. };
  6046. const cssVar = (object) => {
  6047. const styles = {};
  6048. for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
  6049. return styles;
  6050. };
  6051. const cssVarBlock = (object) => {
  6052. const styles = {};
  6053. for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
  6054. return styles;
  6055. };
  6056. const cssVarName = (name) => `--${namespace.value}-${name}`;
  6057. const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
  6058. return {
  6059. namespace,
  6060. b,
  6061. e,
  6062. m,
  6063. be,
  6064. em,
  6065. bm,
  6066. bem,
  6067. is,
  6068. cssVar,
  6069. cssVarName,
  6070. cssVarBlock,
  6071. cssVarBlockName
  6072. };
  6073. };
  6074. //#endregion
  6075. //#region node_modules/element-plus/es/utils/easings.mjs
  6076. function easeInOutCubic(t, b, c, d) {
  6077. const cc = c - b;
  6078. t /= d / 2;
  6079. if (t < 1) return cc / 2 * t * t * t + b;
  6080. return cc / 2 * ((t -= 2) * t * t + 2) + b;
  6081. }
  6082. //#endregion
  6083. //#region node_modules/element-plus/es/utils/raf.mjs
  6084. var rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
  6085. var cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
  6086. //#endregion
  6087. //#region node_modules/element-plus/es/utils/dom/scroll.mjs
  6088. var isScroll = (el, isVertical) => {
  6089. if (!isClient) return false;
  6090. const key = {
  6091. undefined: "overflow",
  6092. true: "overflow-y",
  6093. false: "overflow-x"
  6094. }[String(isVertical)];
  6095. const overflow = getStyle(el, key);
  6096. return [
  6097. "scroll",
  6098. "auto",
  6099. "overlay"
  6100. ].some((s) => overflow.includes(s));
  6101. };
  6102. var getScrollContainer = (el, isVertical) => {
  6103. if (!isClient) return;
  6104. let parent = el;
  6105. while (parent) {
  6106. if ([
  6107. window,
  6108. document,
  6109. document.documentElement
  6110. ].includes(parent)) return window;
  6111. if (isScroll(parent, isVertical)) return parent;
  6112. if (isShadowRoot$1(parent)) parent = parent.host;
  6113. else parent = parent.parentNode;
  6114. }
  6115. return parent;
  6116. };
  6117. var scrollBarWidth;
  6118. var getScrollBarWidth = (namespace) => {
  6119. if (!isClient) return 0;
  6120. if (scrollBarWidth !== void 0) return scrollBarWidth;
  6121. const outer = document.createElement("div");
  6122. outer.className = `${namespace}-scrollbar__wrap`;
  6123. outer.style.visibility = "hidden";
  6124. outer.style.width = "100px";
  6125. outer.style.position = "absolute";
  6126. outer.style.top = "-9999px";
  6127. document.body.appendChild(outer);
  6128. const widthNoScroll = outer.offsetWidth;
  6129. outer.style.overflow = "scroll";
  6130. const inner = document.createElement("div");
  6131. inner.style.width = "100%";
  6132. outer.appendChild(inner);
  6133. const widthWithScroll = inner.offsetWidth;
  6134. outer.parentNode?.removeChild(outer);
  6135. scrollBarWidth = widthNoScroll - widthWithScroll;
  6136. return scrollBarWidth;
  6137. };
  6138. /**
  6139. * Scroll with in the container element, positioning the **selected** element at the top
  6140. * of the container
  6141. */
  6142. function scrollIntoView(container, selected) {
  6143. if (!isClient) return;
  6144. if (!selected) {
  6145. container.scrollTop = 0;
  6146. return;
  6147. }
  6148. const offsetParents = [];
  6149. let pointer = selected.offsetParent;
  6150. while (pointer !== null && container !== pointer && container.contains(pointer)) {
  6151. offsetParents.push(pointer);
  6152. pointer = pointer.offsetParent;
  6153. }
  6154. const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
  6155. const bottom = top + selected.offsetHeight;
  6156. const viewRectTop = container.scrollTop;
  6157. const viewRectBottom = viewRectTop + container.clientHeight;
  6158. if (top < viewRectTop) container.scrollTop = top;
  6159. else if (bottom > viewRectBottom) container.scrollTop = bottom - container.clientHeight;
  6160. }
  6161. function animateScrollTo(container, from, to, duration, callback) {
  6162. const startTime = Date.now();
  6163. let handle;
  6164. const scroll = () => {
  6165. const time = Date.now() - startTime;
  6166. const nextScrollTop = easeInOutCubic(time > duration ? duration : time, from, to, duration);
  6167. if (isWindow(container)) container.scrollTo(window.pageXOffset, nextScrollTop);
  6168. else container.scrollTop = nextScrollTop;
  6169. if (time < duration) handle = rAF(scroll);
  6170. else if (isFunction$1(callback)) callback();
  6171. };
  6172. scroll();
  6173. return () => {
  6174. handle && cAF(handle);
  6175. };
  6176. }
  6177. var getScrollElement = (target, container) => {
  6178. if (isWindow(container)) return target.ownerDocument.documentElement;
  6179. return container;
  6180. };
  6181. var getScrollTop = (container) => {
  6182. if (isWindow(container)) return window.scrollY;
  6183. return container.scrollTop;
  6184. };
  6185. //#endregion
  6186. //#region node_modules/element-plus/es/hooks/use-lockscreen/index.mjs
  6187. /**
  6188. * Hook that monitoring the ref value to lock or unlock the screen.
  6189. * When the trigger became true, it assumes modal is now opened and vice versa.
  6190. * @param trigger {Ref<boolean>}
  6191. */
  6192. var useLockscreen = (trigger, options = {}) => {
  6193. if (!isRef(trigger)) throwError("[useLockscreen]", "You need to pass a ref param to this function");
  6194. const ns = options.ns || useNamespace("popup");
  6195. const hiddenCls = computed(() => ns.bm("parent", "hidden"));
  6196. let scrollBarWidth = 0;
  6197. let withoutHiddenClass = false;
  6198. let bodyWidth = "0";
  6199. let cleaned = false;
  6200. const cleanup = () => {
  6201. if (cleaned) return;
  6202. cleaned = true;
  6203. setTimeout(() => {
  6204. if (typeof document === "undefined") return;
  6205. if (withoutHiddenClass && document) {
  6206. document.body.style.width = bodyWidth;
  6207. removeClass(document.body, hiddenCls.value);
  6208. }
  6209. }, 200);
  6210. };
  6211. watch(trigger, (val) => {
  6212. if (!val) {
  6213. cleanup();
  6214. return;
  6215. }
  6216. cleaned = false;
  6217. withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
  6218. if (withoutHiddenClass) {
  6219. bodyWidth = document.body.style.width;
  6220. addClass(document.body, hiddenCls.value);
  6221. }
  6222. scrollBarWidth = getScrollBarWidth(ns.namespace.value);
  6223. const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  6224. const bodyOverflowY = getStyle(document.body, "overflowY");
  6225. if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) document.body.style.width = `calc(100% - ${scrollBarWidth}px)`;
  6226. });
  6227. onScopeDispose(() => cleanup());
  6228. };
  6229. //#endregion
  6230. //#region node_modules/element-plus/es/utils/dom/event.mjs
  6231. var composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
  6232. const handleEvent = (event) => {
  6233. const shouldPrevent = theirsHandler?.(event);
  6234. if (checkForDefaultPrevented === false || !shouldPrevent) return oursHandler?.(event);
  6235. };
  6236. return handleEvent;
  6237. };
  6238. var whenMouse = (handler) => {
  6239. return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
  6240. };
  6241. var getEventCode = (event) => {
  6242. if (event.code && event.code !== "Unidentified") return event.code;
  6243. const key = getEventKey(event);
  6244. if (key) {
  6245. if (Object.values(EVENT_CODE).includes(key)) return key;
  6246. switch (key) {
  6247. case " ": return EVENT_CODE.space;
  6248. default: return "";
  6249. }
  6250. }
  6251. return "";
  6252. };
  6253. var getEventKey = (event) => {
  6254. let key = event.key && event.key !== "Unidentified" ? event.key : "";
  6255. if (!key && event.type === "keyup" && isAndroid()) {
  6256. const target = event.target;
  6257. key = target.value.charAt(target.selectionStart - 1);
  6258. }
  6259. return key;
  6260. };
  6261. //#endregion
  6262. //#region node_modules/element-plus/es/hooks/use-modal/index.mjs
  6263. var modalStack = [];
  6264. var closeModal = (e) => {
  6265. if (modalStack.length === 0) return;
  6266. if (getEventCode(e) === EVENT_CODE.esc) {
  6267. e.stopPropagation();
  6268. modalStack[modalStack.length - 1].handleClose();
  6269. }
  6270. };
  6271. var useModal = (instance, visibleRef) => {
  6272. watch(visibleRef, (val) => {
  6273. if (val) modalStack.push(instance);
  6274. else modalStack.splice(modalStack.indexOf(instance), 1);
  6275. });
  6276. };
  6277. if (isClient) useEventListener(document, "keydown", closeModal);
  6278. //#endregion
  6279. //#region node_modules/element-plus/es/hooks/use-model-toggle/index.mjs
  6280. var _prop = buildProp({
  6281. type: definePropType(Boolean),
  6282. default: null
  6283. });
  6284. var _event = buildProp({ type: definePropType(Function) });
  6285. var createModelToggleComposable = (name) => {
  6286. const updateEventKey = `update:${name}`;
  6287. const updateEventKeyRaw = `onUpdate:${name}`;
  6288. const useModelToggleEmits = [updateEventKey];
  6289. const useModelToggleProps = {
  6290. [name]: _prop,
  6291. [updateEventKeyRaw]: _event
  6292. };
  6293. const useModelToggle = ({ indicator, toggleReason, shouldHideWhenRouteChanges, shouldProceed, onShow, onHide }) => {
  6294. const instance = getCurrentInstance();
  6295. const { emit } = instance;
  6296. const props = instance.props;
  6297. const hasUpdateHandler = computed(() => isFunction$1(props[updateEventKeyRaw]));
  6298. const isModelBindingAbsent = computed(() => props[name] === null);
  6299. const doShow = (event) => {
  6300. if (indicator.value === true) return;
  6301. indicator.value = true;
  6302. if (toggleReason) toggleReason.value = event;
  6303. if (isFunction$1(onShow)) onShow(event);
  6304. };
  6305. const doHide = (event) => {
  6306. if (indicator.value === false) return;
  6307. indicator.value = false;
  6308. if (toggleReason) toggleReason.value = event;
  6309. if (isFunction$1(onHide)) onHide(event);
  6310. };
  6311. const show = (event) => {
  6312. if (props.disabled === true || isFunction$1(shouldProceed) && !shouldProceed()) return;
  6313. const shouldEmit = hasUpdateHandler.value && isClient;
  6314. if (shouldEmit) emit(updateEventKey, true);
  6315. if (isModelBindingAbsent.value || !shouldEmit) doShow(event);
  6316. };
  6317. const hide = (event) => {
  6318. if (props.disabled === true || !isClient) return;
  6319. const shouldEmit = hasUpdateHandler.value && isClient;
  6320. if (shouldEmit) emit(updateEventKey, false);
  6321. if (isModelBindingAbsent.value || !shouldEmit) doHide(event);
  6322. };
  6323. const onChange = (val) => {
  6324. if (!isBoolean(val)) return;
  6325. if (props.disabled && val) {
  6326. if (hasUpdateHandler.value) emit(updateEventKey, false);
  6327. } else if (indicator.value !== val) if (val) doShow();
  6328. else doHide();
  6329. };
  6330. const toggle = () => {
  6331. if (indicator.value) hide();
  6332. else show();
  6333. };
  6334. watch(() => props[name], onChange);
  6335. if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) watch(() => ({ ...instance.proxy.$route }), () => {
  6336. if (shouldHideWhenRouteChanges.value && indicator.value) hide();
  6337. });
  6338. onMounted(() => {
  6339. onChange(props[name]);
  6340. });
  6341. return {
  6342. hide,
  6343. show,
  6344. toggle,
  6345. hasUpdateHandler
  6346. };
  6347. };
  6348. return {
  6349. useModelToggle,
  6350. useModelToggleProps,
  6351. useModelToggleEmits
  6352. };
  6353. };
  6354. var { useModelToggle, useModelToggleProps, useModelToggleEmits } = createModelToggleComposable("modelValue");
  6355. //#endregion
  6356. //#region node_modules/element-plus/es/hooks/use-prevent-global/index.mjs
  6357. var usePreventGlobal = (indicator, evt, cb) => {
  6358. const prevent = (e) => {
  6359. if (cb(e)) e.stopImmediatePropagation();
  6360. };
  6361. let stop = void 0;
  6362. watch(() => indicator.value, (val) => {
  6363. if (val) stop = useEventListener(document, evt, prevent, true);
  6364. else stop?.();
  6365. }, { immediate: true });
  6366. };
  6367. //#endregion
  6368. //#region node_modules/element-plus/es/hooks/use-prop/index.mjs
  6369. var useProp = (name) => {
  6370. const vm = getCurrentInstance();
  6371. return computed(() => (vm?.proxy?.$props)?.[name]);
  6372. }, W = "bottom", T$1 = "right", P$1 = "left", me = "auto", Q = [
  6373. "top",
  6374. W,
  6375. T$1,
  6376. P$1
  6377. ], Y$1 = "start", Ye = "clippingParents", je = "viewport", ee = "popper", Ge = "reference", De = Q.reduce(function(e, t) {
  6378. return e.concat([t + "-" + Y$1, t + "-end"]);
  6379. }, []), Ee = [].concat(Q, [me]).reduce(function(e, t) {
  6380. return e.concat([
  6381. t,
  6382. t + "-" + Y$1,
  6383. t + "-end"
  6384. ]);
  6385. }, []), it = [
  6386. "beforeRead",
  6387. "read",
  6388. "afterRead",
  6389. "beforeMain",
  6390. "main",
  6391. "afterMain",
  6392. "beforeWrite",
  6393. "write",
  6394. "afterWrite"
  6395. ];
  6396. function V(e) {
  6397. return e ? (e.nodeName || "").toLowerCase() : null;
  6398. }
  6399. function B(e) {
  6400. if (e == null) return window;
  6401. if (e.toString() !== "[object Window]") {
  6402. var t = e.ownerDocument;
  6403. return t && t.defaultView || window;
  6404. }
  6405. return e;
  6406. }
  6407. function G(e) {
  6408. return e instanceof B(e).Element || e instanceof Element;
  6409. }
  6410. function R(e) {
  6411. return e instanceof B(e).HTMLElement || e instanceof HTMLElement;
  6412. }
  6413. function Ae(e) {
  6414. if (typeof ShadowRoot == "undefined") return !1;
  6415. return e instanceof B(e).ShadowRoot || e instanceof ShadowRoot;
  6416. }
  6417. function Tt(e) {
  6418. var t = e.state;
  6419. Object.keys(t.elements).forEach(function(n) {
  6420. var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
  6421. !R(a) || !V(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(c) {
  6422. var s = o[c];
  6423. s === !1 ? a.removeAttribute(c) : a.setAttribute(c, s === !0 ? "" : s);
  6424. }));
  6425. });
  6426. }
  6427. function Bt(e) {
  6428. var t = e.state, n = {
  6429. popper: {
  6430. position: t.options.strategy,
  6431. left: "0",
  6432. top: "0",
  6433. margin: "0"
  6434. },
  6435. arrow: { position: "absolute" },
  6436. reference: {}
  6437. };
  6438. return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
  6439. Object.keys(t.elements).forEach(function(r) {
  6440. var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]).reduce(function(i, f) {
  6441. return i[f] = "", i;
  6442. }, {});
  6443. !R(o) || !V(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(i) {
  6444. o.removeAttribute(i);
  6445. }));
  6446. });
  6447. };
  6448. }
  6449. var ke = {
  6450. name: "applyStyles",
  6451. enabled: !0,
  6452. phase: "write",
  6453. fn: Tt,
  6454. effect: Bt,
  6455. requires: ["computeStyles"]
  6456. };
  6457. function C(e) {
  6458. return e.split("-")[0];
  6459. }
  6460. var J = Math.max, ve = Math.min, te = Math.round;
  6461. function Le() {
  6462. var e = navigator.userAgentData;
  6463. return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
  6464. return t.brand + "/" + t.version;
  6465. }).join(" ") : navigator.userAgent;
  6466. }
  6467. function at() {
  6468. return !/^((?!chrome|android).)*safari/i.test(Le());
  6469. }
  6470. function ne(e, t, n) {
  6471. t === void 0 && (t = !1), n === void 0 && (n = !1);
  6472. var r = e.getBoundingClientRect(), o = 1, a = 1;
  6473. t && R(e) && (o = e.offsetWidth > 0 && te(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && te(r.height) / e.offsetHeight || 1);
  6474. var s = (G(e) ? B(e) : window).visualViewport, i = !at() && n, f = (r.left + (i && s ? s.offsetLeft : 0)) / o, u = (r.top + (i && s ? s.offsetTop : 0)) / a, m = r.width / o, h = r.height / a;
  6475. return {
  6476. width: m,
  6477. height: h,
  6478. top: u,
  6479. right: f + m,
  6480. bottom: u + h,
  6481. left: f,
  6482. x: f,
  6483. y: u
  6484. };
  6485. }
  6486. function Pe(e) {
  6487. var t = ne(e), n = e.offsetWidth, r = e.offsetHeight;
  6488. return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
  6489. x: e.offsetLeft,
  6490. y: e.offsetTop,
  6491. width: n,
  6492. height: r
  6493. };
  6494. }
  6495. function st(e, t) {
  6496. var n = t.getRootNode && t.getRootNode();
  6497. if (e.contains(t)) return !0;
  6498. if (n && Ae(n)) {
  6499. var r = t;
  6500. do {
  6501. if (r && e.isSameNode(r)) return !0;
  6502. r = r.parentNode || r.host;
  6503. } while (r);
  6504. }
  6505. return !1;
  6506. }
  6507. function I$1(e) {
  6508. return B(e).getComputedStyle(e);
  6509. }
  6510. function Rt(e) {
  6511. return [
  6512. "table",
  6513. "td",
  6514. "th"
  6515. ].indexOf(V(e)) >= 0;
  6516. }
  6517. function N$1(e) {
  6518. return ((G(e) ? e.ownerDocument : e.document) || window.document).documentElement;
  6519. }
  6520. function ye(e) {
  6521. return V(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ae(e) ? e.host : null) || N$1(e);
  6522. }
  6523. function ft(e) {
  6524. return !R(e) || I$1(e).position === "fixed" ? null : e.offsetParent;
  6525. }
  6526. function Ht(e) {
  6527. var t = /firefox/i.test(Le());
  6528. if (/Trident/i.test(Le()) && R(e)) {
  6529. if (I$1(e).position === "fixed") return null;
  6530. }
  6531. var o = ye(e);
  6532. for (Ae(o) && (o = o.host); R(o) && ["html", "body"].indexOf(V(o)) < 0;) {
  6533. var a = I$1(o);
  6534. if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
  6535. o = o.parentNode;
  6536. }
  6537. return null;
  6538. }
  6539. function se(e) {
  6540. for (var t = B(e), n = ft(e); n && Rt(n) && I$1(n).position === "static";) n = ft(n);
  6541. return n && (V(n) === "html" || V(n) === "body" && I$1(n).position === "static") ? t : n || Ht(e) || t;
  6542. }
  6543. function Me(e) {
  6544. return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
  6545. }
  6546. function fe(e, t, n) {
  6547. return J(e, ve(t, n));
  6548. }
  6549. function St(e, t, n) {
  6550. var r = fe(e, t, n);
  6551. return r > n ? n : r;
  6552. }
  6553. function ct() {
  6554. return {
  6555. top: 0,
  6556. right: 0,
  6557. bottom: 0,
  6558. left: 0
  6559. };
  6560. }
  6561. function ut(e) {
  6562. return Object.assign({}, ct(), e);
  6563. }
  6564. function pt(e, t) {
  6565. return t.reduce(function(n, r) {
  6566. return n[r] = e, n;
  6567. }, {});
  6568. }
  6569. var Vt = function(e, t) {
  6570. return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, ut(typeof e != "number" ? e : pt(e, Q));
  6571. };
  6572. function Ct(e) {
  6573. var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, c = n.modifiersData.popperOffsets, s = C(n.placement), i = Me(s), u = ["left", "right"].indexOf(s) >= 0 ? "height" : "width";
  6574. if (!(!a || !c)) {
  6575. var m = Vt(o.padding, n), h = Pe(a), l = i === "y" ? "top" : P$1, g = i === "y" ? W : T$1, p = n.rects.reference[u] + n.rects.reference[i] - c[i] - n.rects.popper[u], y = c[i] - n.rects.reference[i], b = se(a), x = b ? i === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, O = p / 2 - y / 2, d = m[l], v = x - h[u] - m[g], w = x / 2 - h[u] / 2 + O, $ = fe(d, w, v), j = i;
  6576. n.modifiersData[r] = (t = {}, t[j] = $, t.centerOffset = $ - w, t);
  6577. }
  6578. }
  6579. function qt(e) {
  6580. var t = e.state, r = e.options.element, o = r === void 0 ? "[data-popper-arrow]" : r;
  6581. o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || st(t.elements.popper, o) && (t.elements.arrow = o));
  6582. }
  6583. var lt = {
  6584. name: "arrow",
  6585. enabled: !0,
  6586. phase: "main",
  6587. fn: Ct,
  6588. effect: qt,
  6589. requires: ["popperOffsets"],
  6590. requiresIfExists: ["preventOverflow"]
  6591. };
  6592. function re(e) {
  6593. return e.split("-")[1];
  6594. }
  6595. var It = {
  6596. top: "auto",
  6597. right: "auto",
  6598. bottom: "auto",
  6599. left: "auto"
  6600. };
  6601. function Nt(e, t) {
  6602. var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
  6603. return {
  6604. x: te(n * o) / o || 0,
  6605. y: te(r * o) / o || 0
  6606. };
  6607. }
  6608. function dt(e) {
  6609. var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, m = e.isFixed, h = c.x, l = h === void 0 ? 0 : h, g = c.y, p = g === void 0 ? 0 : g, y = typeof u == "function" ? u({
  6610. x: l,
  6611. y: p
  6612. }) : {
  6613. x: l,
  6614. y: p
  6615. };
  6616. l = y.x, p = y.y;
  6617. var b = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = P$1, d = "top", v = window;
  6618. if (f) {
  6619. var w = se(n), $ = "clientHeight", j = "clientWidth";
  6620. if (w === B(n) && (w = N$1(n), I$1(w).position !== "static" && s === "absolute" && ($ = "scrollHeight", j = "scrollWidth")), w = w, o === "top" || (o === "left" || o === "right") && a === "end") {
  6621. d = W;
  6622. var D = m && w === v && v.visualViewport ? v.visualViewport.height : w[$];
  6623. p -= D - r.height, p *= i ? 1 : -1;
  6624. }
  6625. if (o === "left" || (o === "top" || o === "bottom") && a === "end") {
  6626. O = T$1;
  6627. var E = m && w === v && v.visualViewport ? v.visualViewport.width : w[j];
  6628. l -= E - r.width, l *= i ? 1 : -1;
  6629. }
  6630. }
  6631. var A = Object.assign({ position: s }, f && It), H = u === !0 ? Nt({
  6632. x: l,
  6633. y: p
  6634. }, B(n)) : {
  6635. x: l,
  6636. y: p
  6637. };
  6638. if (l = H.x, p = H.y, i) {
  6639. var k;
  6640. return Object.assign({}, A, (k = {}, k[d] = x ? "0" : "", k[O] = b ? "0" : "", k.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + p + "px)" : "translate3d(" + l + "px, " + p + "px, 0)", k));
  6641. }
  6642. return Object.assign({}, A, (t = {}, t[d] = x ? p + "px" : "", t[O] = b ? l + "px" : "", t.transform = "", t));
  6643. }
  6644. function Ft(e) {
  6645. var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, c = a === void 0 ? !0 : a, s = n.roundOffsets, i = s === void 0 ? !0 : s, f = {
  6646. placement: C(t.placement),
  6647. variation: re(t.placement),
  6648. popper: t.elements.popper,
  6649. popperRect: t.rects.popper,
  6650. gpuAcceleration: o,
  6651. isFixed: t.options.strategy === "fixed"
  6652. };
  6653. t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, dt(Object.assign({}, f, {
  6654. offsets: t.modifiersData.popperOffsets,
  6655. position: t.options.strategy,
  6656. adaptive: c,
  6657. roundOffsets: i
  6658. })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, dt(Object.assign({}, f, {
  6659. offsets: t.modifiersData.arrow,
  6660. position: "absolute",
  6661. adaptive: !1,
  6662. roundOffsets: i
  6663. })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
  6664. }
  6665. var We = {
  6666. name: "computeStyles",
  6667. enabled: !0,
  6668. phase: "beforeWrite",
  6669. fn: Ft,
  6670. data: {}
  6671. }, ge = { passive: !0 };
  6672. function Ut(e) {
  6673. var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, c = r.resize, s = c === void 0 ? !0 : c, i = B(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
  6674. return a && f.forEach(function(u) {
  6675. u.addEventListener("scroll", n.update, ge);
  6676. }), s && i.addEventListener("resize", n.update, ge), function() {
  6677. a && f.forEach(function(u) {
  6678. u.removeEventListener("scroll", n.update, ge);
  6679. }), s && i.removeEventListener("resize", n.update, ge);
  6680. };
  6681. }
  6682. var Te = {
  6683. name: "eventListeners",
  6684. enabled: !0,
  6685. phase: "write",
  6686. fn: function() {},
  6687. effect: Ut,
  6688. data: {}
  6689. }, _t = {
  6690. left: "right",
  6691. right: "left",
  6692. bottom: "top",
  6693. top: "bottom"
  6694. };
  6695. function be(e) {
  6696. return e.replace(/left|right|bottom|top/g, function(t) {
  6697. return _t[t];
  6698. });
  6699. }
  6700. var zt = {
  6701. start: "end",
  6702. end: "start"
  6703. };
  6704. function ht(e) {
  6705. return e.replace(/start|end/g, function(t) {
  6706. return zt[t];
  6707. });
  6708. }
  6709. function Be(e) {
  6710. var t = B(e);
  6711. return {
  6712. scrollLeft: t.pageXOffset,
  6713. scrollTop: t.pageYOffset
  6714. };
  6715. }
  6716. function Re(e) {
  6717. return ne(N$1(e)).left + Be(e).scrollLeft;
  6718. }
  6719. function Xt(e, t) {
  6720. var n = B(e), r = N$1(e), o = n.visualViewport, a = r.clientWidth, c = r.clientHeight, s = 0, i = 0;
  6721. if (o) {
  6722. a = o.width, c = o.height;
  6723. var f = at();
  6724. (f || !f && t === "fixed") && (s = o.offsetLeft, i = o.offsetTop);
  6725. }
  6726. return {
  6727. width: a,
  6728. height: c,
  6729. x: s + Re(e),
  6730. y: i
  6731. };
  6732. }
  6733. function Yt(e) {
  6734. var t, n = N$1(e), r = Be(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = J(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), c = J(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Re(e), i = -r.scrollTop;
  6735. return I$1(o || n).direction === "rtl" && (s += J(n.clientWidth, o ? o.clientWidth : 0) - a), {
  6736. width: a,
  6737. height: c,
  6738. x: s,
  6739. y: i
  6740. };
  6741. }
  6742. function He(e) {
  6743. var t = I$1(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
  6744. return /auto|scroll|overlay|hidden/.test(n + o + r);
  6745. }
  6746. function mt(e) {
  6747. return [
  6748. "html",
  6749. "body",
  6750. "#document"
  6751. ].indexOf(V(e)) >= 0 ? e.ownerDocument.body : R(e) && He(e) ? e : mt(ye(e));
  6752. }
  6753. function ce(e, t) {
  6754. var n;
  6755. t === void 0 && (t = []);
  6756. var r = mt(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = B(r), c = o ? [a].concat(a.visualViewport || [], He(r) ? r : []) : r, s = t.concat(c);
  6757. return o ? s : s.concat(ce(ye(c)));
  6758. }
  6759. function Se(e) {
  6760. return Object.assign({}, e, {
  6761. left: e.x,
  6762. top: e.y,
  6763. right: e.x + e.width,
  6764. bottom: e.y + e.height
  6765. });
  6766. }
  6767. function Gt(e, t) {
  6768. var n = ne(e, !1, t === "fixed");
  6769. return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
  6770. }
  6771. function vt(e, t, n) {
  6772. return t === "viewport" ? Se(Xt(e, n)) : G(t) ? Gt(t, n) : Se(Yt(N$1(e)));
  6773. }
  6774. function Jt(e) {
  6775. var t = ce(ye(e)), r = ["absolute", "fixed"].indexOf(I$1(e).position) >= 0 && R(e) ? se(e) : e;
  6776. return G(r) ? t.filter(function(o) {
  6777. return G(o) && st(o, r) && V(o) !== "body";
  6778. }) : [];
  6779. }
  6780. function Kt(e, t, n, r) {
  6781. var o = t === "clippingParents" ? Jt(e) : [].concat(t), a = [].concat(o, [n]), c = a[0], s = a.reduce(function(i, f) {
  6782. var u = vt(e, f, r);
  6783. return i.top = J(u.top, i.top), i.right = ve(u.right, i.right), i.bottom = ve(u.bottom, i.bottom), i.left = J(u.left, i.left), i;
  6784. }, vt(e, c, r));
  6785. return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
  6786. }
  6787. function yt(e) {
  6788. var t = e.reference, n = e.element, r = e.placement, o = r ? C(r) : null, a = r ? re(r) : null, c = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, i;
  6789. switch (o) {
  6790. case "top":
  6791. i = {
  6792. x: c,
  6793. y: t.y - n.height
  6794. };
  6795. break;
  6796. case W:
  6797. i = {
  6798. x: c,
  6799. y: t.y + t.height
  6800. };
  6801. break;
  6802. case T$1:
  6803. i = {
  6804. x: t.x + t.width,
  6805. y: s
  6806. };
  6807. break;
  6808. case P$1:
  6809. i = {
  6810. x: t.x - n.width,
  6811. y: s
  6812. };
  6813. break;
  6814. default: i = {
  6815. x: t.x,
  6816. y: t.y
  6817. };
  6818. }
  6819. var f = o ? Me(o) : null;
  6820. if (f != null) {
  6821. var u = f === "y" ? "height" : "width";
  6822. switch (a) {
  6823. case Y$1:
  6824. i[f] = i[f] - (t[u] / 2 - n[u] / 2);
  6825. break;
  6826. case "end":
  6827. i[f] = i[f] + (t[u] / 2 - n[u] / 2);
  6828. break;
  6829. }
  6830. }
  6831. return i;
  6832. }
  6833. function oe(e, t) {
  6834. t === void 0 && (t = {});
  6835. var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.strategy, c = a === void 0 ? e.strategy : a, s = n.boundary, i = s === void 0 ? Ye : s, f = n.rootBoundary, u = f === void 0 ? je : f, m = n.elementContext, h = m === void 0 ? ee : m, l = n.altBoundary, g = l === void 0 ? !1 : l, p = n.padding, y = p === void 0 ? 0 : p, b = ut(typeof y != "number" ? y : pt(y, Q)), x = h === "popper" ? Ge : ee, O = e.rects.popper, d = e.elements[g ? x : h], v = Kt(G(d) ? d : d.contextElement || N$1(e.elements.popper), i, u, c), w = ne(e.elements.reference), $ = yt({
  6836. reference: w,
  6837. element: O,
  6838. placement: o
  6839. }), j = Se(Object.assign({}, O, $)), D = h === "popper" ? j : w, E = {
  6840. top: v.top - D.top + b.top,
  6841. bottom: D.bottom - v.bottom + b.bottom,
  6842. left: v.left - D.left + b.left,
  6843. right: D.right - v.right + b.right
  6844. }, A = e.modifiersData.offset;
  6845. if (h === "popper" && A) {
  6846. var H = A[o];
  6847. Object.keys(E).forEach(function(k) {
  6848. var F = ["right", "bottom"].indexOf(k) >= 0 ? 1 : -1, U = ["top", "bottom"].indexOf(k) >= 0 ? "y" : "x";
  6849. E[k] += H[U] * F;
  6850. });
  6851. }
  6852. return E;
  6853. }
  6854. function Qt(e, t) {
  6855. t === void 0 && (t = {});
  6856. var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, c = n.padding, s = n.flipVariations, i = n.allowedAutoPlacements, f = i === void 0 ? Ee : i, u = re(r), m = u ? s ? De : De.filter(function(g) {
  6857. return re(g) === u;
  6858. }) : Q, h = m.filter(function(g) {
  6859. return f.indexOf(g) >= 0;
  6860. });
  6861. h.length === 0 && (h = m);
  6862. var l = h.reduce(function(g, p) {
  6863. return g[p] = oe(e, {
  6864. placement: p,
  6865. boundary: o,
  6866. rootBoundary: a,
  6867. padding: c
  6868. })[C(p)], g;
  6869. }, {});
  6870. return Object.keys(l).sort(function(g, p) {
  6871. return l[g] - l[p];
  6872. });
  6873. }
  6874. function Zt(e) {
  6875. if (C(e) === "auto") return [];
  6876. var t = be(e);
  6877. return [
  6878. ht(e),
  6879. t,
  6880. ht(t)
  6881. ];
  6882. }
  6883. function en(e) {
  6884. var t = e.state, n = e.options, r = e.name;
  6885. if (!t.modifiersData[r]._skip) {
  6886. for (var o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !0 : c, i = n.fallbackPlacements, f = n.padding, u = n.boundary, m = n.rootBoundary, h = n.altBoundary, l = n.flipVariations, g = l === void 0 ? !0 : l, p = n.allowedAutoPlacements, y = t.options.placement, x = C(y) === y, O = i || (x || !g ? [be(y)] : Zt(y)), d = [y].concat(O).reduce(function(z, q) {
  6887. return z.concat(C(q) === "auto" ? Qt(t, {
  6888. placement: q,
  6889. boundary: u,
  6890. rootBoundary: m,
  6891. padding: f,
  6892. flipVariations: g,
  6893. allowedAutoPlacements: p
  6894. }) : q);
  6895. }, []), v = t.rects.reference, w = t.rects.popper, $ = /* @__PURE__ */ new Map(), j = !0, D = d[0], E = 0; E < d.length; E++) {
  6896. var A = d[E], H = C(A), k = re(A) === Y$1, F = ["top", W].indexOf(H) >= 0, U = F ? "width" : "height", M = oe(t, {
  6897. placement: A,
  6898. boundary: u,
  6899. rootBoundary: m,
  6900. altBoundary: h,
  6901. padding: f
  6902. }), S = F ? k ? T$1 : P$1 : k ? W : "top";
  6903. v[U] > w[U] && (S = be(S));
  6904. var ue = be(S), _ = [];
  6905. if (a && _.push(M[H] <= 0), s && _.push(M[S] <= 0, M[ue] <= 0), _.every(function(z) {
  6906. return z;
  6907. })) {
  6908. D = A, j = !1;
  6909. break;
  6910. }
  6911. $.set(A, _);
  6912. }
  6913. if (j) {
  6914. for (var pe = g ? 3 : 1, xe = function(z) {
  6915. var q = d.find(function(de) {
  6916. var ae = $.get(de);
  6917. if (ae) return ae.slice(0, z).every(function(K) {
  6918. return K;
  6919. });
  6920. });
  6921. if (q) return D = q, "break";
  6922. }, ie = pe; ie > 0; ie--) if (xe(ie) === "break") break;
  6923. }
  6924. t.placement !== D && (t.modifiersData[r]._skip = !0, t.placement = D, t.reset = !0);
  6925. }
  6926. }
  6927. var gt = {
  6928. name: "flip",
  6929. enabled: !0,
  6930. phase: "main",
  6931. fn: en,
  6932. requiresIfExists: ["offset"],
  6933. data: { _skip: !1 }
  6934. };
  6935. function bt(e, t, n) {
  6936. return n === void 0 && (n = {
  6937. x: 0,
  6938. y: 0
  6939. }), {
  6940. top: e.top - t.height - n.y,
  6941. right: e.right - t.width + n.x,
  6942. bottom: e.bottom - t.height + n.y,
  6943. left: e.left - t.width - n.x
  6944. };
  6945. }
  6946. function wt(e) {
  6947. return [
  6948. "top",
  6949. T$1,
  6950. W,
  6951. P$1
  6952. ].some(function(t) {
  6953. return e[t] >= 0;
  6954. });
  6955. }
  6956. function tn(e) {
  6957. var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, c = oe(t, { elementContext: "reference" }), s = oe(t, { altBoundary: !0 }), i = bt(c, r), f = bt(s, o, a), u = wt(i), m = wt(f);
  6958. t.modifiersData[n] = {
  6959. referenceClippingOffsets: i,
  6960. popperEscapeOffsets: f,
  6961. isReferenceHidden: u,
  6962. hasPopperEscaped: m
  6963. }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
  6964. "data-popper-reference-hidden": u,
  6965. "data-popper-escaped": m
  6966. });
  6967. }
  6968. var xt = {
  6969. name: "hide",
  6970. enabled: !0,
  6971. phase: "main",
  6972. requiresIfExists: ["preventOverflow"],
  6973. fn: tn
  6974. };
  6975. function nn(e, t, n) {
  6976. var r = C(e), o = ["left", "top"].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, c = a[0], s = a[1];
  6977. return c = c || 0, s = (s || 0) * o, ["left", "right"].indexOf(r) >= 0 ? {
  6978. x: s,
  6979. y: c
  6980. } : {
  6981. x: c,
  6982. y: s
  6983. };
  6984. }
  6985. function rn(e) {
  6986. var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, c = Ee.reduce(function(u, m) {
  6987. return u[m] = nn(m, t.rects, a), u;
  6988. }, {}), s = c[t.placement], i = s.x, f = s.y;
  6989. t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += f), t.modifiersData[r] = c;
  6990. }
  6991. var Ot = {
  6992. name: "offset",
  6993. enabled: !0,
  6994. phase: "main",
  6995. requires: ["popperOffsets"],
  6996. fn: rn
  6997. };
  6998. function on(e) {
  6999. var t = e.state, n = e.name;
  7000. t.modifiersData[n] = yt({
  7001. reference: t.rects.reference,
  7002. element: t.rects.popper,
  7003. placement: t.placement
  7004. });
  7005. }
  7006. var Ve = {
  7007. name: "popperOffsets",
  7008. enabled: !0,
  7009. phase: "read",
  7010. fn: on,
  7011. data: {}
  7012. };
  7013. function an(e) {
  7014. return e === "x" ? "y" : "x";
  7015. }
  7016. function sn(e) {
  7017. var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !1 : c, i = n.boundary, f = n.rootBoundary, u = n.altBoundary, m = n.padding, h = n.tether, l = h === void 0 ? !0 : h, g = n.tetherOffset, p = g === void 0 ? 0 : g, y = oe(t, {
  7018. boundary: i,
  7019. rootBoundary: f,
  7020. padding: m,
  7021. altBoundary: u
  7022. }), b = C(t.placement), x = re(t.placement), O = !x, d = Me(b), v = an(d), w = t.modifiersData.popperOffsets, $ = t.rects.reference, j = t.rects.popper, D = typeof p == "function" ? p(Object.assign({}, t.rects, { placement: t.placement })) : p, E = typeof D == "number" ? {
  7023. mainAxis: D,
  7024. altAxis: D
  7025. } : Object.assign({
  7026. mainAxis: 0,
  7027. altAxis: 0
  7028. }, D), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
  7029. x: 0,
  7030. y: 0
  7031. };
  7032. if (w) {
  7033. if (a) {
  7034. var k, F = d === "y" ? "top" : P$1, U = d === "y" ? W : T$1, M = d === "y" ? "height" : "width", S = w[d], ue = S + y[F], _ = S - y[U], pe = l ? -j[M] / 2 : 0, xe = x === "start" ? $[M] : j[M], ie = x === "start" ? -j[M] : -$[M], le = t.elements.arrow, z = l && le ? Pe(le) : {
  7035. width: 0,
  7036. height: 0
  7037. }, q = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ct(), de = q[F], ae = q[U], K = fe(0, $[M], z[M]), Et = O ? $[M] / 2 - pe - K - de - E.mainAxis : xe - K - de - E.mainAxis, At = O ? -$[M] / 2 + pe + K + ae + E.mainAxis : ie + K + ae + E.mainAxis, Oe = t.elements.arrow && se(t.elements.arrow), kt = Oe ? d === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (k = A == null ? void 0 : A[d]) != null ? k : 0, Lt = S + Et - Ce - kt, Pt = S + At - Ce, qe = fe(l ? ve(ue, Lt) : ue, S, l ? J(_, Pt) : _);
  7038. w[d] = qe, H[d] = qe - S;
  7039. }
  7040. if (s) {
  7041. var Ie, Mt = d === "x" ? "top" : P$1, Wt = d === "x" ? W : T$1, X = w[v], he = v === "y" ? "height" : "width", Ne = X + y[Mt], Fe = X - y[Wt], $e = ["top", P$1].indexOf(b) !== -1, Ue = (Ie = A == null ? void 0 : A[v]) != null ? Ie : 0, _e = $e ? Ne : X - $[he] - j[he] - Ue + E.altAxis, ze = $e ? X + $[he] + j[he] - Ue - E.altAxis : Fe, Xe = l && $e ? St(_e, X, ze) : fe(l ? _e : Ne, X, l ? ze : Fe);
  7042. w[v] = Xe, H[v] = Xe - X;
  7043. }
  7044. t.modifiersData[r] = H;
  7045. }
  7046. }
  7047. var $t = {
  7048. name: "preventOverflow",
  7049. enabled: !0,
  7050. phase: "main",
  7051. fn: sn,
  7052. requiresIfExists: ["offset"]
  7053. };
  7054. function fn(e) {
  7055. return {
  7056. scrollLeft: e.scrollLeft,
  7057. scrollTop: e.scrollTop
  7058. };
  7059. }
  7060. function cn(e) {
  7061. return e === B(e) || !R(e) ? Be(e) : fn(e);
  7062. }
  7063. function un(e) {
  7064. var t = e.getBoundingClientRect(), n = te(t.width) / e.offsetWidth || 1, r = te(t.height) / e.offsetHeight || 1;
  7065. return n !== 1 || r !== 1;
  7066. }
  7067. function pn(e, t, n) {
  7068. n === void 0 && (n = !1);
  7069. var r = R(t), o = R(t) && un(t), a = N$1(t), c = ne(e, o, n), s = {
  7070. scrollLeft: 0,
  7071. scrollTop: 0
  7072. }, i = {
  7073. x: 0,
  7074. y: 0
  7075. };
  7076. return (r || !r && !n) && ((V(t) !== "body" || He(a)) && (s = cn(t)), R(t) ? (i = ne(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : a && (i.x = Re(a))), {
  7077. x: c.left + s.scrollLeft - i.x,
  7078. y: c.top + s.scrollTop - i.y,
  7079. width: c.width,
  7080. height: c.height
  7081. };
  7082. }
  7083. function ln(e) {
  7084. var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  7085. e.forEach(function(a) {
  7086. t.set(a.name, a);
  7087. });
  7088. function o(a) {
  7089. n.add(a.name);
  7090. [].concat(a.requires || [], a.requiresIfExists || []).forEach(function(s) {
  7091. if (!n.has(s)) {
  7092. var i = t.get(s);
  7093. i && o(i);
  7094. }
  7095. }), r.push(a);
  7096. }
  7097. return e.forEach(function(a) {
  7098. n.has(a.name) || o(a);
  7099. }), r;
  7100. }
  7101. function dn(e) {
  7102. var t = ln(e);
  7103. return it.reduce(function(n, r) {
  7104. return n.concat(t.filter(function(o) {
  7105. return o.phase === r;
  7106. }));
  7107. }, []);
  7108. }
  7109. function hn(e) {
  7110. var t;
  7111. return function() {
  7112. return t || (t = new Promise(function(n) {
  7113. Promise.resolve().then(function() {
  7114. t = void 0, n(e());
  7115. });
  7116. })), t;
  7117. };
  7118. }
  7119. function mn(e) {
  7120. var t = e.reduce(function(n, r) {
  7121. var o = n[r.name];
  7122. return n[r.name] = o ? Object.assign({}, o, r, {
  7123. options: Object.assign({}, o.options, r.options),
  7124. data: Object.assign({}, o.data, r.data)
  7125. }) : r, n;
  7126. }, {});
  7127. return Object.keys(t).map(function(n) {
  7128. return t[n];
  7129. });
  7130. }
  7131. var jt = {
  7132. placement: "bottom",
  7133. modifiers: [],
  7134. strategy: "absolute"
  7135. };
  7136. function Dt() {
  7137. for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  7138. return !t.some(function(r) {
  7139. return !(r && typeof r.getBoundingClientRect == "function");
  7140. });
  7141. }
  7142. function we(e) {
  7143. e === void 0 && (e = {});
  7144. var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? jt : o;
  7145. return function(c, s, i) {
  7146. i === void 0 && (i = a);
  7147. var f = {
  7148. placement: "bottom",
  7149. orderedModifiers: [],
  7150. options: Object.assign({}, jt, a),
  7151. modifiersData: {},
  7152. elements: {
  7153. reference: c,
  7154. popper: s
  7155. },
  7156. attributes: {},
  7157. styles: {}
  7158. }, u = [], m = !1, h = {
  7159. state: f,
  7160. setOptions: function(p) {
  7161. var y = typeof p == "function" ? p(f.options) : p;
  7162. g(), f.options = Object.assign({}, a, f.options, y), f.scrollParents = {
  7163. reference: G(c) ? ce(c) : c.contextElement ? ce(c.contextElement) : [],
  7164. popper: ce(s)
  7165. };
  7166. var b = dn(mn([].concat(r, f.options.modifiers)));
  7167. return f.orderedModifiers = b.filter(function(x) {
  7168. return x.enabled;
  7169. }), l(), h.update();
  7170. },
  7171. forceUpdate: function() {
  7172. if (!m) {
  7173. var p = f.elements, y = p.reference, b = p.popper;
  7174. if (Dt(y, b)) {
  7175. f.rects = {
  7176. reference: pn(y, se(b), f.options.strategy === "fixed"),
  7177. popper: Pe(b)
  7178. }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(j) {
  7179. return f.modifiersData[j.name] = Object.assign({}, j.data);
  7180. });
  7181. for (var x = 0; x < f.orderedModifiers.length; x++) {
  7182. if (f.reset === !0) {
  7183. f.reset = !1, x = -1;
  7184. continue;
  7185. }
  7186. var O = f.orderedModifiers[x], d = O.fn, v = O.options, w = v === void 0 ? {} : v, $ = O.name;
  7187. typeof d == "function" && (f = d({
  7188. state: f,
  7189. options: w,
  7190. name: $,
  7191. instance: h
  7192. }) || f);
  7193. }
  7194. }
  7195. }
  7196. },
  7197. update: hn(function() {
  7198. return new Promise(function(p) {
  7199. h.forceUpdate(), p(f);
  7200. });
  7201. }),
  7202. destroy: function() {
  7203. g(), m = !0;
  7204. }
  7205. };
  7206. if (!Dt(c, s)) return h;
  7207. h.setOptions(i).then(function(p) {
  7208. !m && i.onFirstUpdate && i.onFirstUpdate(p);
  7209. });
  7210. function l() {
  7211. f.orderedModifiers.forEach(function(p) {
  7212. var y = p.name, b = p.options, x = b === void 0 ? {} : b, O = p.effect;
  7213. if (typeof O == "function") {
  7214. var d = O({
  7215. state: f,
  7216. name: y,
  7217. instance: h,
  7218. options: x
  7219. }), v = function() {};
  7220. u.push(d || v);
  7221. }
  7222. });
  7223. }
  7224. function g() {
  7225. u.forEach(function(p) {
  7226. return p();
  7227. }), u = [];
  7228. }
  7229. return h;
  7230. };
  7231. }
  7232. we();
  7233. we({ defaultModifiers: [
  7234. Te,
  7235. Ve,
  7236. We,
  7237. ke
  7238. ] });
  7239. var wn = we({ defaultModifiers: [
  7240. Te,
  7241. Ve,
  7242. We,
  7243. ke,
  7244. Ot,
  7245. gt,
  7246. $t,
  7247. lt,
  7248. xt
  7249. ] });
  7250. //#endregion
  7251. //#region node_modules/element-plus/es/hooks/use-popper/index.mjs
  7252. var usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
  7253. const stateUpdater = {
  7254. name: "updateState",
  7255. enabled: true,
  7256. phase: "write",
  7257. fn: ({ state }) => {
  7258. const derivedState = deriveState(state);
  7259. Object.assign(states.value, derivedState);
  7260. },
  7261. requires: ["computeStyles"]
  7262. };
  7263. const options = computed(() => {
  7264. const { onFirstUpdate, placement, strategy, modifiers } = unref(opts);
  7265. return {
  7266. onFirstUpdate,
  7267. placement: placement || "bottom",
  7268. strategy: strategy || "absolute",
  7269. modifiers: [
  7270. ...modifiers || [],
  7271. stateUpdater,
  7272. {
  7273. name: "applyStyles",
  7274. enabled: false
  7275. }
  7276. ]
  7277. };
  7278. });
  7279. const instanceRef = shallowRef();
  7280. const states = ref({
  7281. styles: {
  7282. popper: {
  7283. position: unref(options).strategy,
  7284. left: "0",
  7285. top: "0"
  7286. },
  7287. arrow: { position: "absolute" }
  7288. },
  7289. attributes: {}
  7290. });
  7291. const destroy = () => {
  7292. if (!instanceRef.value) return;
  7293. instanceRef.value.destroy();
  7294. instanceRef.value = void 0;
  7295. };
  7296. watch(options, (newOptions) => {
  7297. const instance = unref(instanceRef);
  7298. if (instance) instance.setOptions(newOptions);
  7299. }, { deep: true });
  7300. watch([referenceElementRef, popperElementRef], ([referenceElement, popperElement]) => {
  7301. destroy();
  7302. if (!referenceElement || !popperElement) return;
  7303. instanceRef.value = wn(referenceElement, popperElement, unref(options));
  7304. });
  7305. onBeforeUnmount(() => {
  7306. destroy();
  7307. });
  7308. return {
  7309. state: computed(() => ({ ...unref(instanceRef)?.state || {} })),
  7310. styles: computed(() => unref(states).styles),
  7311. attributes: computed(() => unref(states).attributes),
  7312. update: () => unref(instanceRef)?.update(),
  7313. forceUpdate: () => unref(instanceRef)?.forceUpdate(),
  7314. instanceRef: computed(() => unref(instanceRef))
  7315. };
  7316. };
  7317. function deriveState(state) {
  7318. const elements = Object.keys(state.elements);
  7319. return {
  7320. styles: fromPairs(elements.map((element) => [element, state.styles[element] || {}])),
  7321. attributes: fromPairs(elements.map((element) => [element, state.attributes[element]]))
  7322. };
  7323. }
  7324. //#endregion
  7325. //#region node_modules/element-plus/es/hooks/use-same-target/index.mjs
  7326. var useSameTarget = (handleClick) => {
  7327. if (!handleClick) return {
  7328. onClick: NOOP,
  7329. onMousedown: NOOP,
  7330. onMouseup: NOOP
  7331. };
  7332. let mousedownTarget = false;
  7333. let mouseupTarget = false;
  7334. const onClick = (e) => {
  7335. if (mousedownTarget && mouseupTarget) handleClick(e);
  7336. mousedownTarget = mouseupTarget = false;
  7337. };
  7338. const onMousedown = (e) => {
  7339. mousedownTarget = e.target === e.currentTarget;
  7340. };
  7341. const onMouseup = (e) => {
  7342. mouseupTarget = e.target === e.currentTarget;
  7343. };
  7344. return {
  7345. onClick,
  7346. onMousedown,
  7347. onMouseup
  7348. };
  7349. };
  7350. //#endregion
  7351. //#region node_modules/element-plus/es/utils/vue/global-node.mjs
  7352. var globalNodes = [];
  7353. var target = !isClient ? void 0 : document.body;
  7354. function createGlobalNode(id) {
  7355. const el = document.createElement("div");
  7356. if (id !== void 0) el.setAttribute("id", id);
  7357. if (target) {
  7358. target.appendChild(el);
  7359. globalNodes.push(el);
  7360. }
  7361. return el;
  7362. }
  7363. function removeGlobalNode(el) {
  7364. globalNodes.splice(globalNodes.indexOf(el), 1);
  7365. el.remove();
  7366. }
  7367. //#endregion
  7368. //#region node_modules/element-plus/es/hooks/use-teleport/index.mjs
  7369. var useTeleport = (contentRenderer, appendToBody) => {
  7370. const isTeleportVisible = ref(false);
  7371. if (!isClient) return {
  7372. isTeleportVisible,
  7373. showTeleport: NOOP,
  7374. hideTeleport: NOOP,
  7375. renderTeleport: NOOP
  7376. };
  7377. let $el = null;
  7378. const showTeleport = () => {
  7379. isTeleportVisible.value = true;
  7380. if ($el !== null) return;
  7381. $el = createGlobalNode();
  7382. };
  7383. const hideTeleport = () => {
  7384. isTeleportVisible.value = false;
  7385. if ($el !== null) {
  7386. removeGlobalNode($el);
  7387. $el = null;
  7388. }
  7389. };
  7390. const renderTeleport = () => {
  7391. return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h$1(Teleport, { to: $el }, contentRenderer())] : void 0;
  7392. };
  7393. onUnmounted(hideTeleport);
  7394. return {
  7395. isTeleportVisible,
  7396. showTeleport,
  7397. hideTeleport,
  7398. renderTeleport
  7399. };
  7400. };
  7401. //#endregion
  7402. //#region node_modules/element-plus/es/hooks/use-throttle-render/index.mjs
  7403. var useThrottleRender = (loading, throttle = 0) => {
  7404. if (throttle === 0) return loading;
  7405. const throttled = ref(isObject$2(throttle) && Boolean(throttle.initVal));
  7406. let timeoutHandle = null;
  7407. const dispatchThrottling = (timer) => {
  7408. if (isUndefined(timer)) {
  7409. throttled.value = loading.value;
  7410. return;
  7411. }
  7412. if (timeoutHandle) clearTimeout(timeoutHandle);
  7413. timeoutHandle = setTimeout(() => {
  7414. throttled.value = loading.value;
  7415. }, timer);
  7416. };
  7417. const dispatcher = (type) => {
  7418. if (type === "leading") if (isNumber(throttle)) dispatchThrottling(throttle);
  7419. else dispatchThrottling(throttle.leading);
  7420. else if (isObject$2(throttle)) dispatchThrottling(throttle.trailing);
  7421. else throttled.value = false;
  7422. };
  7423. onMounted(() => dispatcher("leading"));
  7424. watch(() => loading.value, (val) => {
  7425. dispatcher(val ? "leading" : "trailing");
  7426. });
  7427. return throttled;
  7428. };
  7429. //#endregion
  7430. //#region node_modules/element-plus/es/hooks/use-timeout/index.mjs
  7431. function useTimeout() {
  7432. let timeoutHandle;
  7433. const registerTimeout = (fn, delay) => {
  7434. cancelTimeout();
  7435. timeoutHandle = window.setTimeout(fn, delay);
  7436. };
  7437. const cancelTimeout = () => window.clearTimeout(timeoutHandle);
  7438. tryOnScopeDispose(() => cancelTimeout());
  7439. return {
  7440. registerTimeout,
  7441. cancelTimeout
  7442. };
  7443. }
  7444. //#endregion
  7445. //#region node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs
  7446. /* istanbul ignore file */
  7447. var AFTER_APPEAR = "after-appear";
  7448. var AFTER_ENTER = "after-enter";
  7449. var AFTER_LEAVE = "after-leave";
  7450. var APPEAR = "appear";
  7451. var APPEAR_CANCELLED = "appear-cancelled";
  7452. var BEFORE_ENTER = "before-enter";
  7453. var BEFORE_LEAVE = "before-leave";
  7454. var ENTER = "enter";
  7455. var ENTER_CANCELLED = "enter-cancelled";
  7456. var LEAVE = "leave";
  7457. var LEAVE_CANCELLED = "leave-cancelled";
  7458. var useTransitionFallthroughEmits = [
  7459. AFTER_APPEAR,
  7460. AFTER_ENTER,
  7461. AFTER_LEAVE,
  7462. APPEAR,
  7463. APPEAR_CANCELLED,
  7464. BEFORE_ENTER,
  7465. BEFORE_LEAVE,
  7466. ENTER,
  7467. ENTER_CANCELLED,
  7468. LEAVE,
  7469. LEAVE_CANCELLED
  7470. ];
  7471. /**
  7472. * NOTE:
  7473. * This is only a delegator for delegating transition callbacks.
  7474. * Use this at your need.
  7475. */
  7476. /**
  7477. * Simple usage
  7478. *
  7479. * In your setups:
  7480. *
  7481. * setup() {
  7482. * const fallthroughMethods = useTransitionFallthrough()
  7483. * return fallthrough
  7484. * }
  7485. *
  7486. * In your template:
  7487. *
  7488. * <template>
  7489. * <transition name="whatever" v-bind="fallthrough">
  7490. * <slot />
  7491. * </transition>
  7492. * </template>
  7493. *
  7494. */
  7495. var useTransitionFallthrough = () => {
  7496. const { emit } = getCurrentInstance();
  7497. return {
  7498. onAfterAppear: () => {
  7499. emit(AFTER_APPEAR);
  7500. },
  7501. onAfterEnter: () => {
  7502. emit(AFTER_ENTER);
  7503. },
  7504. onAfterLeave: () => {
  7505. emit(AFTER_LEAVE);
  7506. },
  7507. onAppearCancelled: () => {
  7508. emit(APPEAR_CANCELLED);
  7509. },
  7510. onBeforeEnter: () => {
  7511. emit(BEFORE_ENTER);
  7512. },
  7513. onBeforeLeave: () => {
  7514. emit(BEFORE_LEAVE);
  7515. },
  7516. onEnter: () => {
  7517. emit(ENTER);
  7518. },
  7519. onEnterCancelled: () => {
  7520. emit(ENTER_CANCELLED);
  7521. },
  7522. onLeave: () => {
  7523. emit(LEAVE);
  7524. },
  7525. onLeaveCancelled: () => {
  7526. emit(LEAVE_CANCELLED);
  7527. }
  7528. };
  7529. };
  7530. //#endregion
  7531. //#region node_modules/element-plus/es/hooks/use-id/index.mjs
  7532. var defaultIdInjection = {
  7533. prefix: Math.floor(Math.random() * 1e4),
  7534. current: 0
  7535. };
  7536. var ID_INJECTION_KEY = Symbol("elIdInjection");
  7537. var useIdInjection = () => {
  7538. return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
  7539. };
  7540. var useId = (deterministicId) => {
  7541. const idInjection = useIdInjection();
  7542. if (!isClient && idInjection === defaultIdInjection) debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  7543. usage: app.provide(ID_INJECTION_KEY, {
  7544. prefix: number,
  7545. current: number,
  7546. })`);
  7547. const namespace = useGetDerivedNamespace();
  7548. return computedEager(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
  7549. };
  7550. //#endregion
  7551. //#region node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs
  7552. var registeredEscapeHandlers = [];
  7553. var cachedHandler = (event) => {
  7554. if (getEventCode(event) === EVENT_CODE.esc) registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
  7555. };
  7556. var useEscapeKeydown = (handler) => {
  7557. onMounted(() => {
  7558. if (registeredEscapeHandlers.length === 0) document.addEventListener("keydown", cachedHandler);
  7559. if (isClient) registeredEscapeHandlers.push(handler);
  7560. });
  7561. onBeforeUnmount(() => {
  7562. registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
  7563. if (registeredEscapeHandlers.length === 0) {
  7564. if (isClient) document.removeEventListener("keydown", cachedHandler);
  7565. }
  7566. });
  7567. };
  7568. //#endregion
  7569. //#region node_modules/element-plus/es/hooks/use-popper-container/index.mjs
  7570. var usePopperContainerId = () => {
  7571. const namespace = useGetDerivedNamespace();
  7572. const idInjection = useIdInjection();
  7573. const id = computed(() => {
  7574. return `${namespace.value}-popper-container-${idInjection.prefix}`;
  7575. });
  7576. return {
  7577. id,
  7578. selector: computed(() => `#${id.value}`)
  7579. };
  7580. };
  7581. var createContainer = (id) => {
  7582. const container = document.createElement("div");
  7583. container.id = id;
  7584. document.body.appendChild(container);
  7585. return container;
  7586. };
  7587. var usePopperContainer = () => {
  7588. const { id, selector } = usePopperContainerId();
  7589. onBeforeMount(() => {
  7590. if (!isClient) return;
  7591. if (!document.body.querySelector(selector.value)) createContainer(id.value);
  7592. });
  7593. return {
  7594. id,
  7595. selector
  7596. };
  7597. };
  7598. //#endregion
  7599. //#region node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs
  7600. var useDelayedRender = ({ indicator, intermediateIndicator, shouldSetIntermediate = () => true, beforeShow, afterShow, afterHide, beforeHide }) => {
  7601. watch(() => unref(indicator), (val) => {
  7602. if (val) {
  7603. beforeShow?.();
  7604. nextTick(() => {
  7605. if (!unref(indicator)) return;
  7606. if (shouldSetIntermediate("show")) intermediateIndicator.value = true;
  7607. });
  7608. } else {
  7609. beforeHide?.();
  7610. nextTick(() => {
  7611. if (unref(indicator)) return;
  7612. if (shouldSetIntermediate("hide")) intermediateIndicator.value = false;
  7613. });
  7614. }
  7615. });
  7616. watch(() => intermediateIndicator.value, (val) => {
  7617. if (val) afterShow?.();
  7618. else afterHide?.();
  7619. });
  7620. };
  7621. //#endregion
  7622. //#region node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs
  7623. /**
  7624. * @deprecated Removed after 3.0.0, Use `UseDelayedToggleProps` instead.
  7625. */
  7626. var useDelayedToggleProps = buildProps({
  7627. showAfter: {
  7628. type: Number,
  7629. default: 0
  7630. },
  7631. hideAfter: {
  7632. type: Number,
  7633. default: 200
  7634. },
  7635. autoClose: {
  7636. type: Number,
  7637. default: 0
  7638. }
  7639. });
  7640. var useDelayedTogglePropsDefaults = {
  7641. showAfter: 0,
  7642. hideAfter: 200,
  7643. autoClose: 0
  7644. };
  7645. var useDelayedToggle = ({ showAfter, hideAfter, autoClose, open, close }) => {
  7646. const { registerTimeout } = useTimeout();
  7647. const { registerTimeout: registerTimeoutForAutoClose, cancelTimeout: cancelTimeoutForAutoClose } = useTimeout();
  7648. const onOpen = (event, delay = unref(showAfter)) => {
  7649. registerTimeout(() => {
  7650. open(event);
  7651. const _autoClose = unref(autoClose);
  7652. if (isNumber(_autoClose) && _autoClose > 0) registerTimeoutForAutoClose(() => {
  7653. close(event);
  7654. }, _autoClose);
  7655. }, delay);
  7656. };
  7657. const onClose = (event, delay = unref(hideAfter)) => {
  7658. cancelTimeoutForAutoClose();
  7659. registerTimeout(() => {
  7660. close(event);
  7661. }, delay);
  7662. };
  7663. return {
  7664. onOpen,
  7665. onClose
  7666. };
  7667. };
  7668. //#endregion
  7669. //#region node_modules/element-plus/es/hooks/use-forward-ref/index.mjs
  7670. var FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef");
  7671. var useForwardRef = (forwardRef) => {
  7672. const setForwardRef = ((el) => {
  7673. forwardRef.value = el;
  7674. });
  7675. provide(FORWARD_REF_INJECTION_KEY, { setForwardRef });
  7676. };
  7677. var useForwardRefDirective = (setForwardRef) => {
  7678. return {
  7679. mounted(el) {
  7680. setForwardRef(el);
  7681. },
  7682. updated(el) {
  7683. setForwardRef(el);
  7684. },
  7685. unmounted() {
  7686. setForwardRef(null);
  7687. }
  7688. };
  7689. };
  7690. //#endregion
  7691. //#region node_modules/element-plus/es/hooks/use-z-index/index.mjs
  7692. var initial = { current: 0 };
  7693. var zIndex = ref(0);
  7694. var defaultInitialZIndex = 2e3;
  7695. var ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
  7696. var zIndexContextKey = Symbol("zIndexContextKey");
  7697. var useZIndex = (zIndexOverrides) => {
  7698. const increasingInjection = getCurrentInstance() ? inject(ZINDEX_INJECTION_KEY, initial) : initial;
  7699. const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
  7700. const initialZIndex = computed(() => {
  7701. const zIndexFromInjection = unref(zIndexInjection);
  7702. return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
  7703. });
  7704. const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
  7705. const nextZIndex = () => {
  7706. increasingInjection.current++;
  7707. zIndex.value = increasingInjection.current;
  7708. return currentZIndex.value;
  7709. };
  7710. if (!isClient && !inject(ZINDEX_INJECTION_KEY)) debugWarn("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
  7711. usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
  7712. return {
  7713. initialZIndex,
  7714. currentZIndex,
  7715. nextZIndex
  7716. };
  7717. };
  7718. //#endregion
  7719. //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
  7720. var min$1 = Math.min;
  7721. var max$1 = Math.max;
  7722. var round = Math.round;
  7723. var floor$1 = Math.floor;
  7724. var createCoords = (v) => ({
  7725. x: v,
  7726. y: v
  7727. });
  7728. var oppositeSideMap = {
  7729. left: "right",
  7730. right: "left",
  7731. bottom: "top",
  7732. top: "bottom"
  7733. };
  7734. function clamp(start, value, end) {
  7735. return max$1(start, min$1(value, end));
  7736. }
  7737. function evaluate(value, param) {
  7738. return typeof value === "function" ? value(param) : value;
  7739. }
  7740. function getSide(placement) {
  7741. return placement.split("-")[0];
  7742. }
  7743. function getAlignment(placement) {
  7744. return placement.split("-")[1];
  7745. }
  7746. function getOppositeAxis(axis) {
  7747. return axis === "x" ? "y" : "x";
  7748. }
  7749. function getAxisLength(axis) {
  7750. return axis === "y" ? "height" : "width";
  7751. }
  7752. function getSideAxis(placement) {
  7753. const firstChar = placement[0];
  7754. return firstChar === "t" || firstChar === "b" ? "y" : "x";
  7755. }
  7756. function getAlignmentAxis(placement) {
  7757. return getOppositeAxis(getSideAxis(placement));
  7758. }
  7759. function getAlignmentSides(placement, rects, rtl) {
  7760. if (rtl === void 0) rtl = false;
  7761. const alignment = getAlignment(placement);
  7762. const alignmentAxis = getAlignmentAxis(placement);
  7763. const length = getAxisLength(alignmentAxis);
  7764. let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
  7765. if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
  7766. return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
  7767. }
  7768. function getExpandedPlacements(placement) {
  7769. const oppositePlacement = getOppositePlacement(placement);
  7770. return [
  7771. getOppositeAlignmentPlacement(placement),
  7772. oppositePlacement,
  7773. getOppositeAlignmentPlacement(oppositePlacement)
  7774. ];
  7775. }
  7776. function getOppositeAlignmentPlacement(placement) {
  7777. return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
  7778. }
  7779. var lrPlacement = ["left", "right"];
  7780. var rlPlacement = ["right", "left"];
  7781. var tbPlacement = ["top", "bottom"];
  7782. var btPlacement = ["bottom", "top"];
  7783. function getSideList(side, isStart, rtl) {
  7784. switch (side) {
  7785. case "top":
  7786. case "bottom":
  7787. if (rtl) return isStart ? rlPlacement : lrPlacement;
  7788. return isStart ? lrPlacement : rlPlacement;
  7789. case "left":
  7790. case "right": return isStart ? tbPlacement : btPlacement;
  7791. default: return [];
  7792. }
  7793. }
  7794. function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
  7795. const alignment = getAlignment(placement);
  7796. let list = getSideList(getSide(placement), direction === "start", rtl);
  7797. if (alignment) {
  7798. list = list.map((side) => side + "-" + alignment);
  7799. if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
  7800. }
  7801. return list;
  7802. }
  7803. function getOppositePlacement(placement) {
  7804. const side = getSide(placement);
  7805. return oppositeSideMap[side] + placement.slice(side.length);
  7806. }
  7807. function expandPaddingObject(padding) {
  7808. return {
  7809. top: 0,
  7810. right: 0,
  7811. bottom: 0,
  7812. left: 0,
  7813. ...padding
  7814. };
  7815. }
  7816. function getPaddingObject(padding) {
  7817. return typeof padding !== "number" ? expandPaddingObject(padding) : {
  7818. top: padding,
  7819. right: padding,
  7820. bottom: padding,
  7821. left: padding
  7822. };
  7823. }
  7824. function rectToClientRect(rect) {
  7825. const { x, y, width, height } = rect;
  7826. return {
  7827. width,
  7828. height,
  7829. top: y,
  7830. left: x,
  7831. right: x + width,
  7832. bottom: y + height,
  7833. x,
  7834. y
  7835. };
  7836. }
  7837. //#endregion
  7838. //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
  7839. function computeCoordsFromPlacement(_ref, placement, rtl) {
  7840. let { reference, floating } = _ref;
  7841. const sideAxis = getSideAxis(placement);
  7842. const alignmentAxis = getAlignmentAxis(placement);
  7843. const alignLength = getAxisLength(alignmentAxis);
  7844. const side = getSide(placement);
  7845. const isVertical = sideAxis === "y";
  7846. const commonX = reference.x + reference.width / 2 - floating.width / 2;
  7847. const commonY = reference.y + reference.height / 2 - floating.height / 2;
  7848. const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
  7849. let coords;
  7850. switch (side) {
  7851. case "top":
  7852. coords = {
  7853. x: commonX,
  7854. y: reference.y - floating.height
  7855. };
  7856. break;
  7857. case "bottom":
  7858. coords = {
  7859. x: commonX,
  7860. y: reference.y + reference.height
  7861. };
  7862. break;
  7863. case "right":
  7864. coords = {
  7865. x: reference.x + reference.width,
  7866. y: commonY
  7867. };
  7868. break;
  7869. case "left":
  7870. coords = {
  7871. x: reference.x - floating.width,
  7872. y: commonY
  7873. };
  7874. break;
  7875. default: coords = {
  7876. x: reference.x,
  7877. y: reference.y
  7878. };
  7879. }
  7880. switch (getAlignment(placement)) {
  7881. case "start":
  7882. coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
  7883. break;
  7884. case "end":
  7885. coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
  7886. break;
  7887. }
  7888. return coords;
  7889. }
  7890. /**
  7891. * Resolves with an object of overflow side offsets that determine how much the
  7892. * element is overflowing a given clipping boundary on each side.
  7893. * - positive = overflowing the boundary by that number of pixels
  7894. * - negative = how many pixels left before it will overflow
  7895. * - 0 = lies flush with the boundary
  7896. * @see https://floating-ui.com/docs/detectOverflow
  7897. */
  7898. async function detectOverflow$1(state, options) {
  7899. var _await$platform$isEle;
  7900. if (options === void 0) options = {};
  7901. const { x, y, platform, rects, elements, strategy } = state;
  7902. const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
  7903. const paddingObject = getPaddingObject(padding);
  7904. const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
  7905. const clippingClientRect = rectToClientRect(await platform.getClippingRect({
  7906. element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
  7907. boundary,
  7908. rootBoundary,
  7909. strategy
  7910. }));
  7911. const rect = elementContext === "floating" ? {
  7912. x,
  7913. y,
  7914. width: rects.floating.width,
  7915. height: rects.floating.height
  7916. } : rects.reference;
  7917. const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
  7918. const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
  7919. x: 1,
  7920. y: 1
  7921. } : {
  7922. x: 1,
  7923. y: 1
  7924. };
  7925. const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
  7926. elements,
  7927. rect,
  7928. offsetParent,
  7929. strategy
  7930. }) : rect);
  7931. return {
  7932. top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
  7933. bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
  7934. left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
  7935. right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
  7936. };
  7937. }
  7938. var MAX_RESET_COUNT = 50;
  7939. /**
  7940. * Computes the `x` and `y` coordinates that will place the floating element
  7941. * next to a given reference element.
  7942. *
  7943. * This export does not have any `platform` interface logic. You will need to
  7944. * write one for the platform you are using Floating UI with.
  7945. */
  7946. var computePosition$1 = async (reference, floating, config) => {
  7947. const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
  7948. const platformWithDetectOverflow = platform.detectOverflow ? platform : {
  7949. ...platform,
  7950. detectOverflow: detectOverflow$1
  7951. };
  7952. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
  7953. let rects = await platform.getElementRects({
  7954. reference,
  7955. floating,
  7956. strategy
  7957. });
  7958. let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
  7959. let statefulPlacement = placement;
  7960. let resetCount = 0;
  7961. const middlewareData = {};
  7962. for (let i = 0; i < middleware.length; i++) {
  7963. const currentMiddleware = middleware[i];
  7964. if (!currentMiddleware) continue;
  7965. const { name, fn } = currentMiddleware;
  7966. const { x: nextX, y: nextY, data, reset } = await fn({
  7967. x,
  7968. y,
  7969. initialPlacement: placement,
  7970. placement: statefulPlacement,
  7971. strategy,
  7972. middlewareData,
  7973. rects,
  7974. platform: platformWithDetectOverflow,
  7975. elements: {
  7976. reference,
  7977. floating
  7978. }
  7979. });
  7980. x = nextX != null ? nextX : x;
  7981. y = nextY != null ? nextY : y;
  7982. middlewareData[name] = {
  7983. ...middlewareData[name],
  7984. ...data
  7985. };
  7986. if (reset && resetCount < MAX_RESET_COUNT) {
  7987. resetCount++;
  7988. if (typeof reset === "object") {
  7989. if (reset.placement) statefulPlacement = reset.placement;
  7990. if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
  7991. reference,
  7992. floating,
  7993. strategy
  7994. }) : reset.rects;
  7995. ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
  7996. }
  7997. i = -1;
  7998. }
  7999. }
  8000. return {
  8001. x,
  8002. y,
  8003. placement: statefulPlacement,
  8004. strategy,
  8005. middlewareData
  8006. };
  8007. };
  8008. /**
  8009. * Provides data to position an inner element of the floating element so that it
  8010. * appears centered to the reference element.
  8011. * @see https://floating-ui.com/docs/arrow
  8012. */
  8013. var arrow$1 = (options) => ({
  8014. name: "arrow",
  8015. options,
  8016. async fn(state) {
  8017. const { x, y, placement, rects, platform, elements, middlewareData } = state;
  8018. const { element, padding = 0 } = evaluate(options, state) || {};
  8019. if (element == null) return {};
  8020. const paddingObject = getPaddingObject(padding);
  8021. const coords = {
  8022. x,
  8023. y
  8024. };
  8025. const axis = getAlignmentAxis(placement);
  8026. const length = getAxisLength(axis);
  8027. const arrowDimensions = await platform.getDimensions(element);
  8028. const isYAxis = axis === "y";
  8029. const minProp = isYAxis ? "top" : "left";
  8030. const maxProp = isYAxis ? "bottom" : "right";
  8031. const clientProp = isYAxis ? "clientHeight" : "clientWidth";
  8032. const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
  8033. const startDiff = coords[axis] - rects.reference[axis];
  8034. const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
  8035. let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
  8036. if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
  8037. const centerToReference = endDiff / 2 - startDiff / 2;
  8038. const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
  8039. const minPadding = min$1(paddingObject[minProp], largestPossiblePadding);
  8040. const maxPadding = min$1(paddingObject[maxProp], largestPossiblePadding);
  8041. const min$1$1 = minPadding;
  8042. const max = clientSize - arrowDimensions[length] - maxPadding;
  8043. const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
  8044. const offset = clamp(min$1$1, center, max);
  8045. const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
  8046. const alignmentOffset = shouldAddOffset ? center < min$1$1 ? center - min$1$1 : center - max : 0;
  8047. return {
  8048. [axis]: coords[axis] + alignmentOffset,
  8049. data: {
  8050. [axis]: offset,
  8051. centerOffset: center - offset - alignmentOffset,
  8052. ...shouldAddOffset && { alignmentOffset }
  8053. },
  8054. reset: shouldAddOffset
  8055. };
  8056. }
  8057. });
  8058. /**
  8059. * Optimizes the visibility of the floating element by flipping the `placement`
  8060. * in order to keep it in view when the preferred placement(s) will overflow the
  8061. * clipping boundary. Alternative to `autoPlacement`.
  8062. * @see https://floating-ui.com/docs/flip
  8063. */
  8064. var flip$1 = function(options) {
  8065. if (options === void 0) options = {};
  8066. return {
  8067. name: "flip",
  8068. options,
  8069. async fn(state) {
  8070. var _middlewareData$arrow, _middlewareData$flip;
  8071. const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
  8072. const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
  8073. if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
  8074. const side = getSide(placement);
  8075. const initialSideAxis = getSideAxis(initialPlacement);
  8076. const isBasePlacement = getSide(initialPlacement) === initialPlacement;
  8077. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
  8078. const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
  8079. const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
  8080. if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
  8081. const placements = [initialPlacement, ...fallbackPlacements];
  8082. const overflow = await platform.detectOverflow(state, detectOverflowOptions);
  8083. const overflows = [];
  8084. let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
  8085. if (checkMainAxis) overflows.push(overflow[side]);
  8086. if (checkCrossAxis) {
  8087. const sides = getAlignmentSides(placement, rects, rtl);
  8088. overflows.push(overflow[sides[0]], overflow[sides[1]]);
  8089. }
  8090. overflowsData = [...overflowsData, {
  8091. placement,
  8092. overflows
  8093. }];
  8094. if (!overflows.every((side) => side <= 0)) {
  8095. var _middlewareData$flip2, _overflowsData$filter;
  8096. const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
  8097. const nextPlacement = placements[nextIndex];
  8098. if (nextPlacement) {
  8099. if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
  8100. data: {
  8101. index: nextIndex,
  8102. overflows: overflowsData
  8103. },
  8104. reset: { placement: nextPlacement }
  8105. };
  8106. }
  8107. let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
  8108. if (!resetPlacement) switch (fallbackStrategy) {
  8109. case "bestFit": {
  8110. var _overflowsData$filter2;
  8111. const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
  8112. if (hasFallbackAxisSideDirection) {
  8113. const currentSideAxis = getSideAxis(d.placement);
  8114. return currentSideAxis === initialSideAxis || currentSideAxis === "y";
  8115. }
  8116. return true;
  8117. }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
  8118. if (placement) resetPlacement = placement;
  8119. break;
  8120. }
  8121. case "initialPlacement":
  8122. resetPlacement = initialPlacement;
  8123. break;
  8124. }
  8125. if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
  8126. }
  8127. return {};
  8128. }
  8129. };
  8130. };
  8131. var originSides = /* @__PURE__ */ new Set(["left", "top"]);
  8132. async function convertValueToCoords(state, options) {
  8133. const { placement, platform, elements } = state;
  8134. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
  8135. const side = getSide(placement);
  8136. const alignment = getAlignment(placement);
  8137. const isVertical = getSideAxis(placement) === "y";
  8138. const mainAxisMulti = originSides.has(side) ? -1 : 1;
  8139. const crossAxisMulti = rtl && isVertical ? -1 : 1;
  8140. const rawValue = evaluate(options, state);
  8141. let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
  8142. mainAxis: rawValue,
  8143. crossAxis: 0,
  8144. alignmentAxis: null
  8145. } : {
  8146. mainAxis: rawValue.mainAxis || 0,
  8147. crossAxis: rawValue.crossAxis || 0,
  8148. alignmentAxis: rawValue.alignmentAxis
  8149. };
  8150. if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
  8151. return isVertical ? {
  8152. x: crossAxis * crossAxisMulti,
  8153. y: mainAxis * mainAxisMulti
  8154. } : {
  8155. x: mainAxis * mainAxisMulti,
  8156. y: crossAxis * crossAxisMulti
  8157. };
  8158. }
  8159. /**
  8160. * Modifies the placement by translating the floating element along the
  8161. * specified axes.
  8162. * A number (shorthand for `mainAxis` or distance), or an axes configuration
  8163. * object may be passed.
  8164. * @see https://floating-ui.com/docs/offset
  8165. */
  8166. var offset$1 = function(options) {
  8167. if (options === void 0) options = 0;
  8168. return {
  8169. name: "offset",
  8170. options,
  8171. async fn(state) {
  8172. var _middlewareData$offse, _middlewareData$arrow;
  8173. const { x, y, placement, middlewareData } = state;
  8174. const diffCoords = await convertValueToCoords(state, options);
  8175. if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
  8176. return {
  8177. x: x + diffCoords.x,
  8178. y: y + diffCoords.y,
  8179. data: {
  8180. ...diffCoords,
  8181. placement
  8182. }
  8183. };
  8184. }
  8185. };
  8186. };
  8187. /**
  8188. * Optimizes the visibility of the floating element by shifting it in order to
  8189. * keep it in view when it will overflow the clipping boundary.
  8190. * @see https://floating-ui.com/docs/shift
  8191. */
  8192. var shift$1 = function(options) {
  8193. if (options === void 0) options = {};
  8194. return {
  8195. name: "shift",
  8196. options,
  8197. async fn(state) {
  8198. const { x, y, placement, platform } = state;
  8199. const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
  8200. let { x, y } = _ref;
  8201. return {
  8202. x,
  8203. y
  8204. };
  8205. } }, ...detectOverflowOptions } = evaluate(options, state);
  8206. const coords = {
  8207. x,
  8208. y
  8209. };
  8210. const overflow = await platform.detectOverflow(state, detectOverflowOptions);
  8211. const crossAxis = getSideAxis(getSide(placement));
  8212. const mainAxis = getOppositeAxis(crossAxis);
  8213. let mainAxisCoord = coords[mainAxis];
  8214. let crossAxisCoord = coords[crossAxis];
  8215. if (checkMainAxis) {
  8216. const minSide = mainAxis === "y" ? "top" : "left";
  8217. const maxSide = mainAxis === "y" ? "bottom" : "right";
  8218. const min = mainAxisCoord + overflow[minSide];
  8219. const max = mainAxisCoord - overflow[maxSide];
  8220. mainAxisCoord = clamp(min, mainAxisCoord, max);
  8221. }
  8222. if (checkCrossAxis) {
  8223. const minSide = crossAxis === "y" ? "top" : "left";
  8224. const maxSide = crossAxis === "y" ? "bottom" : "right";
  8225. const min = crossAxisCoord + overflow[minSide];
  8226. const max = crossAxisCoord - overflow[maxSide];
  8227. crossAxisCoord = clamp(min, crossAxisCoord, max);
  8228. }
  8229. const limitedCoords = limiter.fn({
  8230. ...state,
  8231. [mainAxis]: mainAxisCoord,
  8232. [crossAxis]: crossAxisCoord
  8233. });
  8234. return {
  8235. ...limitedCoords,
  8236. data: {
  8237. x: limitedCoords.x - x,
  8238. y: limitedCoords.y - y,
  8239. enabled: {
  8240. [mainAxis]: checkMainAxis,
  8241. [crossAxis]: checkCrossAxis
  8242. }
  8243. }
  8244. };
  8245. }
  8246. };
  8247. };
  8248. //#endregion
  8249. //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
  8250. function hasWindow() {
  8251. return typeof window !== "undefined";
  8252. }
  8253. function getNodeName(node) {
  8254. if (isNode(node)) return (node.nodeName || "").toLowerCase();
  8255. return "#document";
  8256. }
  8257. function getWindow(node) {
  8258. var _node$ownerDocument;
  8259. return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
  8260. }
  8261. function getDocumentElement(node) {
  8262. var _ref;
  8263. return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
  8264. }
  8265. function isNode(value) {
  8266. if (!hasWindow()) return false;
  8267. return value instanceof Node || value instanceof getWindow(value).Node;
  8268. }
  8269. function isElement(value) {
  8270. if (!hasWindow()) return false;
  8271. return value instanceof Element || value instanceof getWindow(value).Element;
  8272. }
  8273. function isHTMLElement(value) {
  8274. if (!hasWindow()) return false;
  8275. return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
  8276. }
  8277. function isShadowRoot(value) {
  8278. if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
  8279. return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
  8280. }
  8281. function isOverflowElement(element) {
  8282. const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
  8283. return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
  8284. }
  8285. function isTableElement(element) {
  8286. return /^(table|td|th)$/.test(getNodeName(element));
  8287. }
  8288. function isTopLayer(element) {
  8289. try {
  8290. if (element.matches(":popover-open")) return true;
  8291. } catch (_e) {}
  8292. try {
  8293. return element.matches(":modal");
  8294. } catch (_e) {
  8295. return false;
  8296. }
  8297. }
  8298. var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
  8299. var containRe = /paint|layout|strict|content/;
  8300. var isNotNone = (value) => !!value && value !== "none";
  8301. var isWebKitValue;
  8302. function isContainingBlock(elementOrCss) {
  8303. const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
  8304. return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
  8305. }
  8306. function getContainingBlock(element) {
  8307. let currentNode = getParentNode(element);
  8308. while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
  8309. if (isContainingBlock(currentNode)) return currentNode;
  8310. else if (isTopLayer(currentNode)) return null;
  8311. currentNode = getParentNode(currentNode);
  8312. }
  8313. return null;
  8314. }
  8315. function isWebKit() {
  8316. if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
  8317. return isWebKitValue;
  8318. }
  8319. function isLastTraversableNode(node) {
  8320. return /^(html|body|#document)$/.test(getNodeName(node));
  8321. }
  8322. function getComputedStyle$1(element) {
  8323. return getWindow(element).getComputedStyle(element);
  8324. }
  8325. function getNodeScroll(element) {
  8326. if (isElement(element)) return {
  8327. scrollLeft: element.scrollLeft,
  8328. scrollTop: element.scrollTop
  8329. };
  8330. return {
  8331. scrollLeft: element.scrollX,
  8332. scrollTop: element.scrollY
  8333. };
  8334. }
  8335. function getParentNode(node) {
  8336. if (getNodeName(node) === "html") return node;
  8337. const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
  8338. return isShadowRoot(result) ? result.host : result;
  8339. }
  8340. function getNearestOverflowAncestor(node) {
  8341. const parentNode = getParentNode(node);
  8342. if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
  8343. if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
  8344. return getNearestOverflowAncestor(parentNode);
  8345. }
  8346. function getOverflowAncestors(node, list, traverseIframes) {
  8347. var _node$ownerDocument2;
  8348. if (list === void 0) list = [];
  8349. if (traverseIframes === void 0) traverseIframes = true;
  8350. const scrollableAncestor = getNearestOverflowAncestor(node);
  8351. const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
  8352. const win = getWindow(scrollableAncestor);
  8353. if (isBody) {
  8354. const frameElement = getFrameElement(win);
  8355. return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
  8356. } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
  8357. }
  8358. function getFrameElement(win) {
  8359. return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
  8360. }
  8361. //#endregion
  8362. //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
  8363. function getCssDimensions(element) {
  8364. const css = getComputedStyle$1(element);
  8365. let width = parseFloat(css.width) || 0;
  8366. let height = parseFloat(css.height) || 0;
  8367. const hasOffset = isHTMLElement(element);
  8368. const offsetWidth = hasOffset ? element.offsetWidth : width;
  8369. const offsetHeight = hasOffset ? element.offsetHeight : height;
  8370. const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
  8371. if (shouldFallback) {
  8372. width = offsetWidth;
  8373. height = offsetHeight;
  8374. }
  8375. return {
  8376. width,
  8377. height,
  8378. $: shouldFallback
  8379. };
  8380. }
  8381. function unwrapElement(element) {
  8382. return !isElement(element) ? element.contextElement : element;
  8383. }
  8384. function getScale(element) {
  8385. const domElement = unwrapElement(element);
  8386. if (!isHTMLElement(domElement)) return createCoords(1);
  8387. const rect = domElement.getBoundingClientRect();
  8388. const { width, height, $ } = getCssDimensions(domElement);
  8389. let x = ($ ? round(rect.width) : rect.width) / width;
  8390. let y = ($ ? round(rect.height) : rect.height) / height;
  8391. if (!x || !Number.isFinite(x)) x = 1;
  8392. if (!y || !Number.isFinite(y)) y = 1;
  8393. return {
  8394. x,
  8395. y
  8396. };
  8397. }
  8398. var noOffsets = /* @__PURE__ */ createCoords(0);
  8399. function getVisualOffsets(element) {
  8400. const win = getWindow(element);
  8401. if (!isWebKit() || !win.visualViewport) return noOffsets;
  8402. return {
  8403. x: win.visualViewport.offsetLeft,
  8404. y: win.visualViewport.offsetTop
  8405. };
  8406. }
  8407. function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
  8408. if (isFixed === void 0) isFixed = false;
  8409. if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
  8410. return isFixed;
  8411. }
  8412. function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
  8413. if (includeScale === void 0) includeScale = false;
  8414. if (isFixedStrategy === void 0) isFixedStrategy = false;
  8415. const clientRect = element.getBoundingClientRect();
  8416. const domElement = unwrapElement(element);
  8417. let scale = createCoords(1);
  8418. if (includeScale) if (offsetParent) {
  8419. if (isElement(offsetParent)) scale = getScale(offsetParent);
  8420. } else scale = getScale(element);
  8421. const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
  8422. let x = (clientRect.left + visualOffsets.x) / scale.x;
  8423. let y = (clientRect.top + visualOffsets.y) / scale.y;
  8424. let width = clientRect.width / scale.x;
  8425. let height = clientRect.height / scale.y;
  8426. if (domElement) {
  8427. const win = getWindow(domElement);
  8428. const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
  8429. let currentWin = win;
  8430. let currentIFrame = getFrameElement(currentWin);
  8431. while (currentIFrame && offsetParent && offsetWin !== currentWin) {
  8432. const iframeScale = getScale(currentIFrame);
  8433. const iframeRect = currentIFrame.getBoundingClientRect();
  8434. const css = getComputedStyle$1(currentIFrame);
  8435. const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
  8436. const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
  8437. x *= iframeScale.x;
  8438. y *= iframeScale.y;
  8439. width *= iframeScale.x;
  8440. height *= iframeScale.y;
  8441. x += left;
  8442. y += top;
  8443. currentWin = getWindow(currentIFrame);
  8444. currentIFrame = getFrameElement(currentWin);
  8445. }
  8446. }
  8447. return rectToClientRect({
  8448. width,
  8449. height,
  8450. x,
  8451. y
  8452. });
  8453. }
  8454. function getWindowScrollBarX(element, rect) {
  8455. const leftScroll = getNodeScroll(element).scrollLeft;
  8456. if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
  8457. return rect.left + leftScroll;
  8458. }
  8459. function getHTMLOffset(documentElement, scroll) {
  8460. const htmlRect = documentElement.getBoundingClientRect();
  8461. return {
  8462. x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
  8463. y: htmlRect.top + scroll.scrollTop
  8464. };
  8465. }
  8466. function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
  8467. let { elements, rect, offsetParent, strategy } = _ref;
  8468. const isFixed = strategy === "fixed";
  8469. const documentElement = getDocumentElement(offsetParent);
  8470. const topLayer = elements ? isTopLayer(elements.floating) : false;
  8471. if (offsetParent === documentElement || topLayer && isFixed) return rect;
  8472. let scroll = {
  8473. scrollLeft: 0,
  8474. scrollTop: 0
  8475. };
  8476. let scale = createCoords(1);
  8477. const offsets = createCoords(0);
  8478. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  8479. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  8480. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
  8481. if (isOffsetParentAnElement) {
  8482. const offsetRect = getBoundingClientRect(offsetParent);
  8483. scale = getScale(offsetParent);
  8484. offsets.x = offsetRect.x + offsetParent.clientLeft;
  8485. offsets.y = offsetRect.y + offsetParent.clientTop;
  8486. }
  8487. }
  8488. const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
  8489. return {
  8490. width: rect.width * scale.x,
  8491. height: rect.height * scale.y,
  8492. x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
  8493. y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
  8494. };
  8495. }
  8496. function getClientRects(element) {
  8497. return Array.from(element.getClientRects());
  8498. }
  8499. function getDocumentRect(element) {
  8500. const html = getDocumentElement(element);
  8501. const scroll = getNodeScroll(element);
  8502. const body = element.ownerDocument.body;
  8503. const width = max$1(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
  8504. const height = max$1(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
  8505. let x = -scroll.scrollLeft + getWindowScrollBarX(element);
  8506. const y = -scroll.scrollTop;
  8507. if (getComputedStyle$1(body).direction === "rtl") x += max$1(html.clientWidth, body.clientWidth) - width;
  8508. return {
  8509. width,
  8510. height,
  8511. x,
  8512. y
  8513. };
  8514. }
  8515. var SCROLLBAR_MAX = 25;
  8516. function getViewportRect(element, strategy) {
  8517. const win = getWindow(element);
  8518. const html = getDocumentElement(element);
  8519. const visualViewport = win.visualViewport;
  8520. let width = html.clientWidth;
  8521. let height = html.clientHeight;
  8522. let x = 0;
  8523. let y = 0;
  8524. if (visualViewport) {
  8525. width = visualViewport.width;
  8526. height = visualViewport.height;
  8527. const visualViewportBased = isWebKit();
  8528. if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
  8529. x = visualViewport.offsetLeft;
  8530. y = visualViewport.offsetTop;
  8531. }
  8532. }
  8533. const windowScrollbarX = getWindowScrollBarX(html);
  8534. if (windowScrollbarX <= 0) {
  8535. const doc = html.ownerDocument;
  8536. const body = doc.body;
  8537. const bodyStyles = getComputedStyle(body);
  8538. const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
  8539. const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
  8540. if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
  8541. } else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
  8542. return {
  8543. width,
  8544. height,
  8545. x,
  8546. y
  8547. };
  8548. }
  8549. function getInnerBoundingClientRect(element, strategy) {
  8550. const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
  8551. const top = clientRect.top + element.clientTop;
  8552. const left = clientRect.left + element.clientLeft;
  8553. const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
  8554. return {
  8555. width: element.clientWidth * scale.x,
  8556. height: element.clientHeight * scale.y,
  8557. x: left * scale.x,
  8558. y: top * scale.y
  8559. };
  8560. }
  8561. function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
  8562. let rect;
  8563. if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
  8564. else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
  8565. else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
  8566. else {
  8567. const visualOffsets = getVisualOffsets(element);
  8568. rect = {
  8569. x: clippingAncestor.x - visualOffsets.x,
  8570. y: clippingAncestor.y - visualOffsets.y,
  8571. width: clippingAncestor.width,
  8572. height: clippingAncestor.height
  8573. };
  8574. }
  8575. return rectToClientRect(rect);
  8576. }
  8577. function hasFixedPositionAncestor(element, stopNode) {
  8578. const parentNode = getParentNode(element);
  8579. if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
  8580. return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
  8581. }
  8582. function getClippingElementAncestors(element, cache) {
  8583. const cachedResult = cache.get(element);
  8584. if (cachedResult) return cachedResult;
  8585. let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
  8586. let currentContainingBlockComputedStyle = null;
  8587. const elementIsFixed = getComputedStyle$1(element).position === "fixed";
  8588. let currentNode = elementIsFixed ? getParentNode(element) : element;
  8589. while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
  8590. const computedStyle = getComputedStyle$1(currentNode);
  8591. const currentNodeIsContaining = isContainingBlock(currentNode);
  8592. if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
  8593. if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
  8594. else currentContainingBlockComputedStyle = computedStyle;
  8595. currentNode = getParentNode(currentNode);
  8596. }
  8597. cache.set(element, result);
  8598. return result;
  8599. }
  8600. function getClippingRect(_ref) {
  8601. let { element, boundary, rootBoundary, strategy } = _ref;
  8602. const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
  8603. const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
  8604. let top = firstRect.top;
  8605. let right = firstRect.right;
  8606. let bottom = firstRect.bottom;
  8607. let left = firstRect.left;
  8608. for (let i = 1; i < clippingAncestors.length; i++) {
  8609. const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
  8610. top = max$1(rect.top, top);
  8611. right = min$1(rect.right, right);
  8612. bottom = min$1(rect.bottom, bottom);
  8613. left = max$1(rect.left, left);
  8614. }
  8615. return {
  8616. width: right - left,
  8617. height: bottom - top,
  8618. x: left,
  8619. y: top
  8620. };
  8621. }
  8622. function getDimensions(element) {
  8623. const { width, height } = getCssDimensions(element);
  8624. return {
  8625. width,
  8626. height
  8627. };
  8628. }
  8629. function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
  8630. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  8631. const documentElement = getDocumentElement(offsetParent);
  8632. const isFixed = strategy === "fixed";
  8633. const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
  8634. let scroll = {
  8635. scrollLeft: 0,
  8636. scrollTop: 0
  8637. };
  8638. const offsets = createCoords(0);
  8639. function setLeftRTLScrollbarOffset() {
  8640. offsets.x = getWindowScrollBarX(documentElement);
  8641. }
  8642. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  8643. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
  8644. if (isOffsetParentAnElement) {
  8645. const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
  8646. offsets.x = offsetRect.x + offsetParent.clientLeft;
  8647. offsets.y = offsetRect.y + offsetParent.clientTop;
  8648. } else if (documentElement) setLeftRTLScrollbarOffset();
  8649. }
  8650. if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
  8651. const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
  8652. return {
  8653. x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
  8654. y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
  8655. width: rect.width,
  8656. height: rect.height
  8657. };
  8658. }
  8659. function isStaticPositioned(element) {
  8660. return getComputedStyle$1(element).position === "static";
  8661. }
  8662. function getTrueOffsetParent(element, polyfill) {
  8663. if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
  8664. if (polyfill) return polyfill(element);
  8665. let rawOffsetParent = element.offsetParent;
  8666. if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
  8667. return rawOffsetParent;
  8668. }
  8669. function getOffsetParent(element, polyfill) {
  8670. const win = getWindow(element);
  8671. if (isTopLayer(element)) return win;
  8672. if (!isHTMLElement(element)) {
  8673. let svgOffsetParent = getParentNode(element);
  8674. while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
  8675. if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
  8676. svgOffsetParent = getParentNode(svgOffsetParent);
  8677. }
  8678. return win;
  8679. }
  8680. let offsetParent = getTrueOffsetParent(element, polyfill);
  8681. while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
  8682. if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
  8683. return offsetParent || getContainingBlock(element) || win;
  8684. }
  8685. var getElementRects = async function(data) {
  8686. const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
  8687. const getDimensionsFn = this.getDimensions;
  8688. const floatingDimensions = await getDimensionsFn(data.floating);
  8689. return {
  8690. reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
  8691. floating: {
  8692. x: 0,
  8693. y: 0,
  8694. width: floatingDimensions.width,
  8695. height: floatingDimensions.height
  8696. }
  8697. };
  8698. };
  8699. function isRTL$1(element) {
  8700. return getComputedStyle$1(element).direction === "rtl";
  8701. }
  8702. var platform = {
  8703. convertOffsetParentRelativeRectToViewportRelativeRect,
  8704. getDocumentElement,
  8705. getClippingRect,
  8706. getOffsetParent,
  8707. getElementRects,
  8708. getClientRects,
  8709. getDimensions,
  8710. getScale,
  8711. isElement,
  8712. isRTL: isRTL$1
  8713. };
  8714. function rectsAreEqual(a, b) {
  8715. return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
  8716. }
  8717. function observeMove(element, onMove) {
  8718. let io = null;
  8719. let timeoutId;
  8720. const root = getDocumentElement(element);
  8721. function cleanup() {
  8722. var _io;
  8723. clearTimeout(timeoutId);
  8724. (_io = io) == null || _io.disconnect();
  8725. io = null;
  8726. }
  8727. function refresh(skip, threshold) {
  8728. if (skip === void 0) skip = false;
  8729. if (threshold === void 0) threshold = 1;
  8730. cleanup();
  8731. const elementRectForRootMargin = element.getBoundingClientRect();
  8732. const { left, top, width, height } = elementRectForRootMargin;
  8733. if (!skip) onMove();
  8734. if (!width || !height) return;
  8735. const insetTop = floor$1(top);
  8736. const insetRight = floor$1(root.clientWidth - (left + width));
  8737. const insetBottom = floor$1(root.clientHeight - (top + height));
  8738. const insetLeft = floor$1(left);
  8739. const options = {
  8740. rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
  8741. threshold: max$1(0, min$1(1, threshold)) || 1
  8742. };
  8743. let isFirstUpdate = true;
  8744. function handleObserve(entries) {
  8745. const ratio = entries[0].intersectionRatio;
  8746. if (ratio !== threshold) {
  8747. if (!isFirstUpdate) return refresh();
  8748. if (!ratio) timeoutId = setTimeout(() => {
  8749. refresh(false, 1e-7);
  8750. }, 1e3);
  8751. else refresh(false, ratio);
  8752. }
  8753. if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
  8754. isFirstUpdate = false;
  8755. }
  8756. try {
  8757. io = new IntersectionObserver(handleObserve, {
  8758. ...options,
  8759. root: root.ownerDocument
  8760. });
  8761. } catch (_e) {
  8762. io = new IntersectionObserver(handleObserve, options);
  8763. }
  8764. io.observe(element);
  8765. }
  8766. refresh(true);
  8767. return cleanup;
  8768. }
  8769. /**
  8770. * Automatically updates the position of the floating element when necessary.
  8771. * Should only be called when the floating element is mounted on the DOM or
  8772. * visible on the screen.
  8773. * @returns cleanup function that should be invoked when the floating element is
  8774. * removed from the DOM or hidden from the screen.
  8775. * @see https://floating-ui.com/docs/autoUpdate
  8776. */
  8777. function autoUpdate(reference, floating, update, options) {
  8778. if (options === void 0) options = {};
  8779. const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
  8780. const referenceEl = unwrapElement(reference);
  8781. const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
  8782. ancestors.forEach((ancestor) => {
  8783. ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
  8784. ancestorResize && ancestor.addEventListener("resize", update);
  8785. });
  8786. const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
  8787. let reobserveFrame = -1;
  8788. let resizeObserver = null;
  8789. if (elementResize) {
  8790. resizeObserver = new ResizeObserver((_ref) => {
  8791. let [firstEntry] = _ref;
  8792. if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
  8793. resizeObserver.unobserve(floating);
  8794. cancelAnimationFrame(reobserveFrame);
  8795. reobserveFrame = requestAnimationFrame(() => {
  8796. var _resizeObserver;
  8797. (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
  8798. });
  8799. }
  8800. update();
  8801. });
  8802. if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
  8803. if (floating) resizeObserver.observe(floating);
  8804. }
  8805. let frameId;
  8806. let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
  8807. if (animationFrame) frameLoop();
  8808. function frameLoop() {
  8809. const nextRefRect = getBoundingClientRect(reference);
  8810. if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
  8811. prevRefRect = nextRefRect;
  8812. frameId = requestAnimationFrame(frameLoop);
  8813. }
  8814. update();
  8815. return () => {
  8816. var _resizeObserver2;
  8817. ancestors.forEach((ancestor) => {
  8818. ancestorScroll && ancestor.removeEventListener("scroll", update);
  8819. ancestorResize && ancestor.removeEventListener("resize", update);
  8820. });
  8821. cleanupIo?.();
  8822. (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
  8823. resizeObserver = null;
  8824. if (animationFrame) cancelAnimationFrame(frameId);
  8825. };
  8826. }
  8827. /**
  8828. * Resolves with an object of overflow side offsets that determine how much the
  8829. * element is overflowing a given clipping boundary on each side.
  8830. * - positive = overflowing the boundary by that number of pixels
  8831. * - negative = how many pixels left before it will overflow
  8832. * - 0 = lies flush with the boundary
  8833. * @see https://floating-ui.com/docs/detectOverflow
  8834. */
  8835. var detectOverflow = detectOverflow$1;
  8836. /**
  8837. * Modifies the placement by translating the floating element along the
  8838. * specified axes.
  8839. * A number (shorthand for `mainAxis` or distance), or an axes configuration
  8840. * object may be passed.
  8841. * @see https://floating-ui.com/docs/offset
  8842. */
  8843. var offset = offset$1;
  8844. /**
  8845. * Optimizes the visibility of the floating element by shifting it in order to
  8846. * keep it in view when it will overflow the clipping boundary.
  8847. * @see https://floating-ui.com/docs/shift
  8848. */
  8849. var shift = shift$1;
  8850. /**
  8851. * Optimizes the visibility of the floating element by flipping the `placement`
  8852. * in order to keep it in view when the preferred placement(s) will overflow the
  8853. * clipping boundary. Alternative to `autoPlacement`.
  8854. * @see https://floating-ui.com/docs/flip
  8855. */
  8856. var flip = flip$1;
  8857. /**
  8858. * Provides data to position an inner element of the floating element so that it
  8859. * appears centered to the reference element.
  8860. * @see https://floating-ui.com/docs/arrow
  8861. */
  8862. var arrow = arrow$1;
  8863. /**
  8864. * Computes the `x` and `y` coordinates that will place the floating element
  8865. * next to a given reference element.
  8866. */
  8867. var computePosition = (reference, floating, options) => {
  8868. const cache = /* @__PURE__ */ new Map();
  8869. const mergedOptions = {
  8870. platform,
  8871. ...options
  8872. };
  8873. const platformWithCache = {
  8874. ...mergedOptions.platform,
  8875. _c: cache
  8876. };
  8877. return computePosition$1(reference, floating, {
  8878. ...mergedOptions,
  8879. platform: platformWithCache
  8880. });
  8881. };
  8882. //#endregion
  8883. //#region node_modules/element-plus/es/hooks/use-floating/index.mjs
  8884. var useFloatingProps = buildProps({});
  8885. var unrefReference = (elRef) => {
  8886. if (!isClient) return;
  8887. if (!elRef) return elRef;
  8888. const unrefEl = unrefElement(elRef);
  8889. if (unrefEl) return unrefEl;
  8890. return isRef(elRef) ? unrefEl : elRef;
  8891. };
  8892. var getPositionDataWithUnit = (record, key) => {
  8893. const value = record?.[key];
  8894. return isNil(value) ? "" : `${value}px`;
  8895. };
  8896. var useFloating = ({ middleware, placement, strategy }) => {
  8897. const referenceRef = ref();
  8898. const contentRef = ref();
  8899. const states = {
  8900. x: ref(),
  8901. y: ref(),
  8902. placement,
  8903. strategy,
  8904. middlewareData: ref({})
  8905. };
  8906. const update = async () => {
  8907. if (!isClient) return;
  8908. const referenceEl = unrefReference(referenceRef);
  8909. const contentEl = unrefElement(contentRef);
  8910. if (!referenceEl || !contentEl) return;
  8911. const data = await computePosition(referenceEl, contentEl, {
  8912. placement: unref(placement),
  8913. strategy: unref(strategy),
  8914. middleware: unref(middleware)
  8915. });
  8916. keysOf(states).forEach((key) => {
  8917. states[key].value = data[key];
  8918. });
  8919. };
  8920. onMounted(() => {
  8921. watchEffect(() => {
  8922. update();
  8923. });
  8924. });
  8925. return {
  8926. ...states,
  8927. update,
  8928. referenceRef,
  8929. contentRef
  8930. };
  8931. };
  8932. var arrowMiddleware = ({ arrowRef, padding }) => {
  8933. return {
  8934. name: "arrow",
  8935. options: {
  8936. element: arrowRef,
  8937. padding
  8938. },
  8939. fn(args) {
  8940. const arrowEl = unref(arrowRef);
  8941. if (!arrowEl) return {};
  8942. return arrow({
  8943. element: arrowEl,
  8944. padding
  8945. }).fn(args);
  8946. }
  8947. };
  8948. };
  8949. //#endregion
  8950. //#region node_modules/element-plus/es/hooks/use-cursor/index.mjs
  8951. function useCursor(input) {
  8952. let selectionInfo;
  8953. function recordCursor() {
  8954. if (input.value == void 0) return;
  8955. const { selectionStart, selectionEnd, value } = input.value;
  8956. if (selectionStart == null || selectionEnd == null) return;
  8957. selectionInfo = {
  8958. selectionStart,
  8959. selectionEnd,
  8960. value,
  8961. beforeTxt: value.slice(0, Math.max(0, selectionStart)),
  8962. afterTxt: value.slice(Math.max(0, selectionEnd))
  8963. };
  8964. }
  8965. function setCursor() {
  8966. if (input.value == void 0 || selectionInfo == void 0) return;
  8967. const { value } = input.value;
  8968. const { beforeTxt, afterTxt, selectionStart } = selectionInfo;
  8969. if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) return;
  8970. let startPos = value.length;
  8971. if (value.endsWith(afterTxt)) startPos = value.length - afterTxt.length;
  8972. else if (value.startsWith(beforeTxt)) startPos = beforeTxt.length;
  8973. else {
  8974. const beforeLastChar = beforeTxt[selectionStart - 1];
  8975. const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
  8976. if (newIndex !== -1) startPos = newIndex + 1;
  8977. }
  8978. input.value.setSelectionRange(startPos, startPos);
  8979. }
  8980. return [recordCursor, setCursor];
  8981. }
  8982. //#endregion
  8983. //#region node_modules/element-plus/es/utils/vue/vnode.mjs
  8984. var SCOPE$11 = "utils/vue/vnode";
  8985. var PatchFlags = /* @__PURE__ */ function(PatchFlags) {
  8986. PatchFlags[PatchFlags["TEXT"] = 1] = "TEXT";
  8987. PatchFlags[PatchFlags["CLASS"] = 2] = "CLASS";
  8988. PatchFlags[PatchFlags["STYLE"] = 4] = "STYLE";
  8989. PatchFlags[PatchFlags["PROPS"] = 8] = "PROPS";
  8990. PatchFlags[PatchFlags["FULL_PROPS"] = 16] = "FULL_PROPS";
  8991. PatchFlags[PatchFlags["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
  8992. PatchFlags[PatchFlags["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
  8993. PatchFlags[PatchFlags["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
  8994. PatchFlags[PatchFlags["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
  8995. PatchFlags[PatchFlags["NEED_PATCH"] = 512] = "NEED_PATCH";
  8996. PatchFlags[PatchFlags["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
  8997. PatchFlags[PatchFlags["HOISTED"] = -1] = "HOISTED";
  8998. PatchFlags[PatchFlags["BAIL"] = -2] = "BAIL";
  8999. return PatchFlags;
  9000. }({});
  9001. function isFragment(node) {
  9002. return isVNode(node) && node.type === Fragment;
  9003. }
  9004. function isComment(node) {
  9005. return isVNode(node) && node.type === Comment;
  9006. }
  9007. function isValidElementNode(node) {
  9008. return isVNode(node) && !isFragment(node) && !isComment(node);
  9009. }
  9010. var getNormalizedProps = (node) => {
  9011. if (!isVNode(node)) {
  9012. debugWarn(SCOPE$11, "[getNormalizedProps] must be a VNode");
  9013. return {};
  9014. }
  9015. const raw = node.props || {};
  9016. const type = (isVNode(node.type) ? node.type.props : void 0) || {};
  9017. const props = {};
  9018. Object.keys(type).forEach((key) => {
  9019. if (hasOwn(type[key], "default")) props[key] = type[key].default;
  9020. });
  9021. Object.keys(raw).forEach((key) => {
  9022. props[camelize$1(key)] = raw[key];
  9023. });
  9024. return props;
  9025. };
  9026. var flattedChildren = (children) => {
  9027. const vNodes = isArray$1(children) ? children : [children];
  9028. const result = [];
  9029. vNodes.forEach((child) => {
  9030. if (isArray$1(child)) result.push(...flattedChildren(child));
  9031. else if (isVNode(child) && child.component?.subTree) result.push(child, ...flattedChildren(child.component.subTree));
  9032. else if (isVNode(child) && isArray$1(child.children)) result.push(...flattedChildren(child.children));
  9033. else if (isVNode(child) && child.shapeFlag === 2) result.push(...flattedChildren(child.type()));
  9034. else result.push(child);
  9035. });
  9036. return result;
  9037. };
  9038. //#endregion
  9039. //#region node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
  9040. var getOrderedChildren = (vm, childComponentName, children) => {
  9041. return flattedChildren(vm.subTree).filter((n) => isVNode(n) && n.type?.name === childComponentName && !!n.component).map((n) => n.component.uid).map((uid) => children[uid]).filter((p) => !!p);
  9042. };
  9043. var useOrderedChildren = (vm, childComponentName) => {
  9044. const children = shallowRef({});
  9045. const orderedChildren = shallowRef([]);
  9046. const nodesMap = /* @__PURE__ */ new WeakMap();
  9047. const addChild = (child) => {
  9048. children.value[child.uid] = child;
  9049. triggerRef(children);
  9050. onMounted(() => {
  9051. const childNode = child.getVnode().el;
  9052. const parentNode = childNode.parentNode;
  9053. if (!nodesMap.has(parentNode)) {
  9054. nodesMap.set(parentNode, []);
  9055. const originalFn = parentNode.insertBefore.bind(parentNode);
  9056. parentNode.insertBefore = (node, anchor) => {
  9057. if (nodesMap.get(parentNode).some((el) => node === el || anchor === el)) triggerRef(children);
  9058. return originalFn(node, anchor);
  9059. };
  9060. }
  9061. nodesMap.get(parentNode).push(childNode);
  9062. });
  9063. };
  9064. const removeChild = (child) => {
  9065. delete children.value[child.uid];
  9066. triggerRef(children);
  9067. const childNode = child.getVnode().el;
  9068. const parentNode = childNode.parentNode;
  9069. const childNodes = nodesMap.get(parentNode);
  9070. const index = childNodes.indexOf(childNode);
  9071. childNodes.splice(index, 1);
  9072. };
  9073. const sortChildren = () => {
  9074. orderedChildren.value = getOrderedChildren(vm, childComponentName, children.value);
  9075. };
  9076. const IsolatedRenderer = (props) => {
  9077. return props.render();
  9078. };
  9079. return {
  9080. children: orderedChildren,
  9081. addChild,
  9082. removeChild,
  9083. ChildrenSorter: defineComponent({ setup(_, { slots }) {
  9084. return () => {
  9085. sortChildren();
  9086. return slots.default ? h$1(IsolatedRenderer, { render: slots.default }) : null;
  9087. };
  9088. } })
  9089. };
  9090. };
  9091. //#endregion
  9092. //#region node_modules/element-plus/es/hooks/use-size/index.mjs
  9093. var useSizeProp = buildProp({
  9094. type: String,
  9095. values: componentSizes,
  9096. required: false
  9097. });
  9098. var useSizeProps = { size: useSizeProp };
  9099. var SIZE_INJECTION_KEY = Symbol("size");
  9100. var useGlobalSize = () => {
  9101. const injectedSize = inject(SIZE_INJECTION_KEY, {});
  9102. return computed(() => {
  9103. return unref(injectedSize.size) || "";
  9104. });
  9105. };
  9106. //#endregion
  9107. //#region node_modules/element-plus/es/hooks/use-focus-controller/index.mjs
  9108. function useFocusController(target, { disabled, beforeFocus, afterFocus, beforeBlur, afterBlur } = {}) {
  9109. const { emit } = getCurrentInstance();
  9110. const wrapperRef = shallowRef();
  9111. const isFocused = ref(false);
  9112. const handleFocus = (event) => {
  9113. const cancelFocus = isFunction$1(beforeFocus) ? beforeFocus(event) : false;
  9114. if (unref(disabled) || isFocused.value || cancelFocus) return;
  9115. isFocused.value = true;
  9116. emit("focus", event);
  9117. afterFocus?.();
  9118. };
  9119. const handleBlur = (event) => {
  9120. const cancelBlur = isFunction$1(beforeBlur) ? beforeBlur(event) : false;
  9121. if (unref(disabled) || event.relatedTarget && wrapperRef.value?.contains(event.relatedTarget) || cancelBlur) return;
  9122. isFocused.value = false;
  9123. emit("blur", event);
  9124. afterBlur?.();
  9125. };
  9126. const handleClick = (event) => {
  9127. if (unref(disabled) || isFocusable(event.target) || wrapperRef.value?.contains(document.activeElement) && wrapperRef.value !== document.activeElement) return;
  9128. target.value?.focus();
  9129. };
  9130. watch([wrapperRef, () => unref(disabled)], ([el, disabled]) => {
  9131. if (!el) return;
  9132. if (disabled) el.removeAttribute("tabindex");
  9133. else el.setAttribute("tabindex", "-1");
  9134. });
  9135. useEventListener(wrapperRef, "focus", handleFocus, true);
  9136. useEventListener(wrapperRef, "blur", handleBlur, true);
  9137. useEventListener(wrapperRef, "click", handleClick, true);
  9138. return {
  9139. isFocused,
  9140. wrapperRef,
  9141. handleFocus,
  9142. handleBlur
  9143. };
  9144. }
  9145. //#endregion
  9146. //#region node_modules/element-plus/es/utils/i18n.mjs
  9147. var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
  9148. //#endregion
  9149. //#region node_modules/element-plus/es/hooks/use-composition/index.mjs
  9150. function useComposition({ afterComposition, emit }) {
  9151. const isComposing = ref(false);
  9152. const handleCompositionStart = (event) => {
  9153. emit?.("compositionstart", event);
  9154. isComposing.value = true;
  9155. };
  9156. const handleCompositionUpdate = (event) => {
  9157. emit?.("compositionupdate", event);
  9158. const text = event.target?.value;
  9159. isComposing.value = !isKorean(text[text.length - 1] || "");
  9160. };
  9161. const handleCompositionEnd = (event) => {
  9162. emit?.("compositionend", event);
  9163. if (isComposing.value) {
  9164. isComposing.value = false;
  9165. nextTick(() => afterComposition(event));
  9166. }
  9167. };
  9168. const handleComposition = (event) => {
  9169. event.type === "compositionend" ? handleCompositionEnd(event) : handleCompositionUpdate(event);
  9170. };
  9171. return {
  9172. isComposing,
  9173. handleComposition,
  9174. handleCompositionStart,
  9175. handleCompositionUpdate,
  9176. handleCompositionEnd
  9177. };
  9178. }
  9179. //#endregion
  9180. //#region node_modules/element-plus/es/hooks/use-empty-values/index.mjs
  9181. var emptyValuesContextKey = Symbol("emptyValuesContextKey");
  9182. var SCOPE = "use-empty-values";
  9183. var DEFAULT_EMPTY_VALUES = [
  9184. "",
  9185. void 0,
  9186. null
  9187. ];
  9188. var DEFAULT_VALUE_ON_CLEAR = void 0;
  9189. /**
  9190. * @deprecated Removed after 3.0.0, Use `UseEmptyValuesProps` instead.
  9191. */
  9192. var useEmptyValuesProps = buildProps({
  9193. emptyValues: Array,
  9194. valueOnClear: {
  9195. type: definePropType([
  9196. String,
  9197. Number,
  9198. Boolean,
  9199. Function
  9200. ]),
  9201. default: void 0,
  9202. validator: (val) => {
  9203. val = isFunction$1(val) ? val() : val;
  9204. if (isArray$1(val)) return val.every((item) => !item);
  9205. return !val;
  9206. }
  9207. }
  9208. });
  9209. var useEmptyValues = (props, defaultValue) => {
  9210. const config = getCurrentInstance() ? inject(emptyValuesContextKey, ref({})) : ref({});
  9211. const emptyValues = computed(() => props.emptyValues || config.value.emptyValues || DEFAULT_EMPTY_VALUES);
  9212. const valueOnClear = computed(() => {
  9213. if (isFunction$1(props.valueOnClear)) return props.valueOnClear();
  9214. else if (props.valueOnClear !== void 0) return props.valueOnClear;
  9215. else if (isFunction$1(config.value.valueOnClear)) return config.value.valueOnClear();
  9216. else if (config.value.valueOnClear !== void 0) return config.value.valueOnClear;
  9217. return defaultValue !== void 0 ? defaultValue : void 0;
  9218. });
  9219. const isEmptyValue = (value) => {
  9220. let result = true;
  9221. if (isArray$1(value)) result = emptyValues.value.some((emptyValue) => {
  9222. return isEqual$1(value, emptyValue);
  9223. });
  9224. else result = emptyValues.value.includes(value);
  9225. return result;
  9226. };
  9227. if (!isEmptyValue(valueOnClear.value)) debugWarn(SCOPE, "value-on-clear should be a value of empty-values");
  9228. return {
  9229. emptyValues,
  9230. valueOnClear,
  9231. isEmptyValue
  9232. };
  9233. };
  9234. //#endregion
  9235. //#region node_modules/element-plus/es/hooks/use-aria/index.mjs
  9236. /**
  9237. * @deprecated Removed after 3.0.0, Use `AriaProps` instead.
  9238. */
  9239. var ariaProps = buildProps({
  9240. ariaLabel: String,
  9241. ariaOrientation: {
  9242. type: String,
  9243. values: [
  9244. "horizontal",
  9245. "vertical",
  9246. "undefined"
  9247. ]
  9248. },
  9249. ariaControls: String
  9250. });
  9251. var useAriaProps = (arias) => {
  9252. return pick(ariaProps, arias);
  9253. };
  9254. //#endregion
  9255. //#region node_modules/element-plus/es/utils/vue/install.mjs
  9256. var withPropsDefaultsSetter = (target) => {
  9257. const _p = target.props;
  9258. const props = isArray$1(_p) ? fromPairs(_p.map((key) => [key, {}])) : _p;
  9259. target.setPropsDefaults = (defaults) => {
  9260. if (!props) return;
  9261. for (const [key, value] of Object.entries(defaults)) {
  9262. const prop = props[key];
  9263. if (!hasOwn(props, key)) continue;
  9264. if (isPlainObject(prop)) {
  9265. props[key] = {
  9266. ...prop,
  9267. default: value
  9268. };
  9269. continue;
  9270. }
  9271. props[key] = {
  9272. type: prop,
  9273. default: value
  9274. };
  9275. }
  9276. target.props = props;
  9277. };
  9278. };
  9279. var withInstall = (main, extra) => {
  9280. main.install = (app) => {
  9281. for (const comp of [main, ...Object.values(extra ?? {})]) app.component(comp.name, comp);
  9282. };
  9283. if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
  9284. withPropsDefaultsSetter(main);
  9285. return main;
  9286. };
  9287. var withInstallFunction = (fn, name) => {
  9288. fn.install = (app) => {
  9289. fn._context = app._context;
  9290. app.config.globalProperties[name] = fn;
  9291. };
  9292. return fn;
  9293. };
  9294. var withInstallDirective = (directive, name) => {
  9295. directive.install = (app) => {
  9296. app.directive(name, directive);
  9297. };
  9298. return directive;
  9299. };
  9300. var withNoopInstall = (component) => {
  9301. component.install = NOOP;
  9302. withPropsDefaultsSetter(component);
  9303. return component;
  9304. };
  9305. //#endregion
  9306. //#region node_modules/element-plus/es/components/teleport/index.mjs
  9307. var ElTeleport = withInstall(/* @__PURE__ */ defineComponent({
  9308. __name: "teleport",
  9309. props: teleportProps,
  9310. setup(__props) {
  9311. return (_ctx, _cache) => {
  9312. return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, {
  9313. key: 1,
  9314. to: _ctx.to
  9315. }, [renderSlot(_ctx.$slots, "default")], 8, ["to"]));
  9316. };
  9317. }
  9318. }));
  9319. //#endregion
  9320. //#region node_modules/element-plus/es/components/affix/src/affix.vue_vue_type_script_setup_true_lang.mjs
  9321. var COMPONENT_NAME$22 = "ElAffix";
  9322. //#endregion
  9323. //#region node_modules/element-plus/es/components/affix/index.mjs
  9324. var ElAffix = withInstall(/* @__PURE__ */ defineComponent({
  9325. name: COMPONENT_NAME$22,
  9326. __name: "affix",
  9327. props: affixProps,
  9328. emits: affixEmits,
  9329. setup(__props, { expose: __expose, emit: __emit }) {
  9330. const props = __props;
  9331. const emit = __emit;
  9332. const ns = useNamespace("affix");
  9333. const target = shallowRef();
  9334. const root = shallowRef();
  9335. const scrollContainer = shallowRef();
  9336. const { height: windowHeight } = useWindowSize();
  9337. const { height: rootHeight, width: rootWidth, top: rootTop, bottom: rootBottom, left: rootLeft, update: updateRoot } = useElementBounding(root, { windowScroll: false });
  9338. const targetRect = useElementBounding(target);
  9339. const fixed = ref(false);
  9340. const scrollTop = ref(0);
  9341. const transform = ref(0);
  9342. const teleportDisabled = computed(() => {
  9343. return !props.teleported || !fixed.value;
  9344. });
  9345. const rootStyle = computed(() => {
  9346. return {
  9347. display: "flow-root",
  9348. height: fixed.value ? `${rootHeight.value}px` : "",
  9349. width: fixed.value ? `${rootWidth.value}px` : ""
  9350. };
  9351. });
  9352. const affixStyle = computed(() => {
  9353. if (!fixed.value) return {};
  9354. const offset = addUnit(props.offset);
  9355. return {
  9356. height: `${rootHeight.value}px`,
  9357. width: `${rootWidth.value}px`,
  9358. top: props.position === "top" ? offset : "",
  9359. bottom: props.position === "bottom" ? offset : "",
  9360. left: props.teleported ? `${rootLeft.value}px` : "",
  9361. transform: transform.value ? `translateY(${transform.value}px)` : "",
  9362. zIndex: props.zIndex
  9363. };
  9364. });
  9365. const update = () => {
  9366. if (!scrollContainer.value) return;
  9367. scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
  9368. const { position, target, offset } = props;
  9369. const rootHeightOffset = offset + rootHeight.value;
  9370. if (position === "top") if (target) {
  9371. const difference = targetRect.bottom.value - rootHeightOffset;
  9372. fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
  9373. transform.value = difference < 0 ? difference : 0;
  9374. } else fixed.value = offset > rootTop.value;
  9375. else if (target) {
  9376. const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
  9377. fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
  9378. transform.value = difference < 0 ? -difference : 0;
  9379. } else fixed.value = windowHeight.value - offset < rootBottom.value;
  9380. };
  9381. const updateRootRect = async () => {
  9382. if (!fixed.value) {
  9383. updateRoot();
  9384. return;
  9385. }
  9386. fixed.value = false;
  9387. await nextTick();
  9388. updateRoot();
  9389. fixed.value = true;
  9390. };
  9391. const handleScroll = async () => {
  9392. updateRoot();
  9393. await nextTick();
  9394. emit("scroll", {
  9395. scrollTop: scrollTop.value,
  9396. fixed: fixed.value
  9397. });
  9398. };
  9399. watch(fixed, (val) => emit(CHANGE_EVENT, val));
  9400. onMounted(() => {
  9401. if (props.target) {
  9402. target.value = document.querySelector(props.target) ?? void 0;
  9403. if (!target.value) throwError(COMPONENT_NAME$22, `Target does not exist: ${props.target}`);
  9404. } else target.value = document.documentElement;
  9405. scrollContainer.value = getScrollContainer(root.value, true);
  9406. updateRoot();
  9407. });
  9408. onActivated(() => {
  9409. nextTick(updateRootRect);
  9410. });
  9411. onDeactivated(() => {
  9412. fixed.value = false;
  9413. });
  9414. useEventListener(scrollContainer, "scroll", handleScroll);
  9415. watchEffect(update);
  9416. __expose({
  9417. update,
  9418. updateRoot: updateRootRect
  9419. });
  9420. return (_ctx, _cache) => {
  9421. return openBlock(), createElementBlock("div", {
  9422. ref_key: "root",
  9423. ref: root,
  9424. class: normalizeClass(unref(ns).b()),
  9425. style: normalizeStyle(rootStyle.value)
  9426. }, [createVNode(unref(ElTeleport), {
  9427. disabled: teleportDisabled.value,
  9428. to: __props.appendTo
  9429. }, {
  9430. default: withCtx(() => [createBaseVNode("div", {
  9431. class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
  9432. style: normalizeStyle(affixStyle.value)
  9433. }, [renderSlot(_ctx.$slots, "default")], 6)]),
  9434. _: 3
  9435. }, 8, ["disabled", "to"])], 6);
  9436. };
  9437. }
  9438. }));
  9439. //#endregion
  9440. //#region node_modules/element-plus/es/utils/vue/icon.mjs
  9441. var iconPropType = definePropType([
  9442. String,
  9443. Object,
  9444. Function
  9445. ]);
  9446. var CloseComponents = { Close: close_default };
  9447. var TypeComponents = {
  9448. Close: close_default,
  9449. SuccessFilled: success_filled_default,
  9450. InfoFilled: info_filled_default,
  9451. WarningFilled: warning_filled_default,
  9452. CircleCloseFilled: circle_close_filled_default
  9453. };
  9454. var TypeComponentsMap = {
  9455. primary: info_filled_default,
  9456. success: success_filled_default,
  9457. warning: warning_filled_default,
  9458. error: circle_close_filled_default,
  9459. info: info_filled_default
  9460. };
  9461. var ValidateComponentsMap = {
  9462. validating: loading_default,
  9463. success: circle_check_default,
  9464. error: circle_close_default
  9465. };
  9466. //#endregion
  9467. //#region node_modules/element-plus/es/components/alert/src/alert.mjs
  9468. var alertEffects = ["light", "dark"];
  9469. /**
  9470. * @deprecated Removed after 3.0.0, Use `AlertProps` instead.
  9471. */
  9472. var alertProps = buildProps({
  9473. title: {
  9474. type: String,
  9475. default: ""
  9476. },
  9477. description: {
  9478. type: String,
  9479. default: ""
  9480. },
  9481. type: {
  9482. type: String,
  9483. values: keysOf(TypeComponentsMap),
  9484. default: "info"
  9485. },
  9486. closable: {
  9487. type: Boolean,
  9488. default: true
  9489. },
  9490. closeText: {
  9491. type: String,
  9492. default: ""
  9493. },
  9494. showIcon: Boolean,
  9495. center: Boolean,
  9496. effect: {
  9497. type: String,
  9498. values: alertEffects,
  9499. default: "light"
  9500. }
  9501. });
  9502. var alertEmits = { close: (evt) => evt instanceof MouseEvent };
  9503. //#endregion
  9504. //#region node_modules/element-plus/es/components/icon/src/icon.mjs
  9505. /**
  9506. * @deprecated Removed after 3.0.0, Use `IconProps` instead.
  9507. */
  9508. var iconProps = buildProps({
  9509. size: { type: definePropType([Number, String]) },
  9510. color: { type: String }
  9511. });
  9512. //#endregion
  9513. //#region node_modules/element-plus/es/components/icon/index.mjs
  9514. var ElIcon = withInstall(/* @__PURE__ */ defineComponent({
  9515. name: "ElIcon",
  9516. inheritAttrs: false,
  9517. __name: "icon",
  9518. props: iconProps,
  9519. setup(__props) {
  9520. const props = __props;
  9521. const ns = useNamespace("icon");
  9522. const style = computed(() => {
  9523. const { size, color } = props;
  9524. const fontSize = addUnit(size);
  9525. if (!fontSize && !color) return {};
  9526. return {
  9527. fontSize,
  9528. "--color": color
  9529. };
  9530. });
  9531. return (_ctx, _cache) => {
  9532. return openBlock(), createElementBlock("i", mergeProps({
  9533. class: unref(ns).b(),
  9534. style: style.value
  9535. }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
  9536. };
  9537. }
  9538. }));
  9539. //#endregion
  9540. //#region node_modules/element-plus/es/components/alert/index.mjs
  9541. var ElAlert = withInstall(/* @__PURE__ */ defineComponent({
  9542. name: "ElAlert",
  9543. __name: "alert",
  9544. props: alertProps,
  9545. emits: alertEmits,
  9546. setup(__props, { emit: __emit }) {
  9547. const { Close } = TypeComponents;
  9548. const props = __props;
  9549. const emit = __emit;
  9550. const slots = useSlots();
  9551. const ns = useNamespace("alert");
  9552. const visible = ref(true);
  9553. const iconComponent = computed(() => TypeComponentsMap[props.type]);
  9554. const hasDesc = computed(() => {
  9555. if (props.description) return true;
  9556. const slotContent = slots.default?.();
  9557. if (!slotContent) return false;
  9558. return flattedChildren(slotContent).some((child) => !isComment(child));
  9559. });
  9560. const close = (evt) => {
  9561. visible.value = false;
  9562. emit("close", evt);
  9563. };
  9564. return (_ctx, _cache) => {
  9565. return openBlock(), createBlock(Transition, {
  9566. name: unref(ns).b("fade"),
  9567. persisted: ""
  9568. }, {
  9569. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  9570. class: normalizeClass([
  9571. unref(ns).b(),
  9572. unref(ns).m(__props.type),
  9573. unref(ns).is("center", __props.center),
  9574. unref(ns).is(__props.effect)
  9575. ]),
  9576. role: "alert"
  9577. }, [__props.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
  9578. key: 0,
  9579. class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
  9580. }, {
  9581. default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))])]),
  9582. _: 3
  9583. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
  9584. __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
  9585. key: 0,
  9586. class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
  9587. }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
  9588. hasDesc.value ? (openBlock(), createElementBlock("p", {
  9589. key: 1,
  9590. class: normalizeClass(unref(ns).e("description"))
  9591. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2)) : createCommentVNode("v-if", true),
  9592. __props.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [__props.closeText ? (openBlock(), createElementBlock("div", {
  9593. key: 0,
  9594. class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
  9595. onClick: close
  9596. }, toDisplayString(__props.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
  9597. key: 1,
  9598. class: normalizeClass(unref(ns).e("close-btn")),
  9599. onClick: close
  9600. }, {
  9601. default: withCtx(() => [createVNode(unref(Close))]),
  9602. _: 1
  9603. }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
  9604. ], 2)], 2), [[vShow, visible.value]])]),
  9605. _: 3
  9606. }, 8, ["name"]);
  9607. };
  9608. }
  9609. }));
  9610. //#endregion
  9611. //#region node_modules/element-plus/es/components/popper/src/popper.mjs
  9612. var Effect = {
  9613. LIGHT: "light",
  9614. DARK: "dark"
  9615. };
  9616. var roleTypes = [
  9617. "dialog",
  9618. "grid",
  9619. "group",
  9620. "listbox",
  9621. "menu",
  9622. "navigation",
  9623. "tooltip",
  9624. "tree"
  9625. ];
  9626. /**
  9627. * @deprecated Removed after 3.0.0, Use `PopperProps` instead.
  9628. */
  9629. var popperProps = buildProps({ role: {
  9630. type: String,
  9631. values: roleTypes,
  9632. default: "tooltip"
  9633. } });
  9634. /** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */
  9635. var usePopperProps = popperProps;
  9636. //#endregion
  9637. //#region node_modules/element-plus/es/components/popper/src/constants.mjs
  9638. var POPPER_INJECTION_KEY = Symbol("popper");
  9639. var POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
  9640. //#endregion
  9641. //#region node_modules/element-plus/es/components/popper/src/arrow2.mjs
  9642. var arrow_default = /* @__PURE__ */ defineComponent({
  9643. name: "ElPopperArrow",
  9644. inheritAttrs: false,
  9645. __name: "arrow",
  9646. setup(__props, { expose: __expose }) {
  9647. const ns = useNamespace("popper");
  9648. const { arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
  9649. onBeforeUnmount(() => {
  9650. arrowRef.value = void 0;
  9651. });
  9652. __expose({ arrowRef });
  9653. return (_ctx, _cache) => {
  9654. return openBlock(), createElementBlock("span", {
  9655. ref_key: "arrowRef",
  9656. ref: arrowRef,
  9657. class: normalizeClass(unref(ns).e("arrow")),
  9658. style: normalizeStyle(unref(arrowStyle)),
  9659. "data-popper-arrow": ""
  9660. }, null, 6);
  9661. };
  9662. }
  9663. });
  9664. //#endregion
  9665. //#region node_modules/element-plus/es/components/popper/src/trigger.mjs
  9666. /**
  9667. * @deprecated Removed after 3.0.0, Use `PopperTriggerProps` instead.
  9668. */
  9669. var popperTriggerProps = buildProps({
  9670. virtualRef: { type: definePropType(Object) },
  9671. virtualTriggering: Boolean,
  9672. onMouseenter: { type: definePropType(Function) },
  9673. onMouseleave: { type: definePropType(Function) },
  9674. onClick: { type: definePropType(Function) },
  9675. onKeydown: { type: definePropType(Function) },
  9676. onFocus: { type: definePropType(Function) },
  9677. onBlur: { type: definePropType(Function) },
  9678. onContextmenu: { type: definePropType(Function) },
  9679. id: String,
  9680. open: Boolean
  9681. });
  9682. /** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
  9683. var usePopperTriggerProps = popperTriggerProps;
  9684. //#endregion
  9685. //#region node_modules/element-plus/es/components/slot/src/only-child.mjs
  9686. var NAME = "ElOnlyChild";
  9687. var OnlyChild = /* @__PURE__ */ defineComponent({
  9688. name: NAME,
  9689. setup(_, { slots, attrs }) {
  9690. const forwardRefDirective = useForwardRefDirective(inject(FORWARD_REF_INJECTION_KEY)?.setForwardRef ?? NOOP);
  9691. return () => {
  9692. const defaultSlot = slots.default?.(attrs);
  9693. if (!defaultSlot) return null;
  9694. const [firstLegitNode, length] = findFirstLegitChild(defaultSlot);
  9695. if (!firstLegitNode) {
  9696. debugWarn(NAME, "no valid child node found");
  9697. return null;
  9698. }
  9699. if (length > 1) debugWarn(NAME, "requires exact only one valid child.");
  9700. return withDirectives(cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]);
  9701. };
  9702. }
  9703. });
  9704. function findFirstLegitChild(node) {
  9705. if (!node) return [null, 0];
  9706. const children = node;
  9707. const len = children.filter((c) => c.type !== Comment).length;
  9708. for (const child of children) {
  9709. /**
  9710. * when user uses h(Fragment, [text]) to render plain string,
  9711. * this switch case just cannot handle, when the value is primitives
  9712. * we should just return the wrapped string
  9713. */
  9714. if (isObject$2(child)) switch (child.type) {
  9715. case Comment: continue;
  9716. case Text:
  9717. case "svg": return [wrapTextContent(child), len];
  9718. case Fragment: return findFirstLegitChild(child.children);
  9719. default: return [child, len];
  9720. }
  9721. return [wrapTextContent(child), len];
  9722. }
  9723. return [null, 0];
  9724. }
  9725. function wrapTextContent(s) {
  9726. const ns = useNamespace("only-child");
  9727. return createVNode("span", { "class": ns.e("content") }, [s]);
  9728. }
  9729. //#endregion
  9730. //#region node_modules/element-plus/es/components/popper/src/trigger2.mjs
  9731. var trigger_default = /* @__PURE__ */ defineComponent({
  9732. name: "ElPopperTrigger",
  9733. inheritAttrs: false,
  9734. __name: "trigger",
  9735. props: popperTriggerProps,
  9736. setup(__props, { expose: __expose }) {
  9737. const props = __props;
  9738. const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
  9739. useForwardRef(triggerRef);
  9740. const ariaControls = computed(() => {
  9741. return ariaHaspopup.value ? props.id : void 0;
  9742. });
  9743. const ariaDescribedby = computed(() => {
  9744. if (role && role.value === "tooltip") return props.open && props.id ? props.id : void 0;
  9745. });
  9746. const ariaHaspopup = computed(() => {
  9747. if (role && role.value !== "tooltip") return role.value;
  9748. });
  9749. const ariaExpanded = computed(() => {
  9750. return ariaHaspopup.value ? `${props.open}` : void 0;
  9751. });
  9752. let virtualTriggerAriaStopWatch = void 0;
  9753. const TRIGGER_ELE_EVENTS = [
  9754. "onMouseenter",
  9755. "onMouseleave",
  9756. "onClick",
  9757. "onKeydown",
  9758. "onFocus",
  9759. "onBlur",
  9760. "onContextmenu"
  9761. ];
  9762. onMounted(() => {
  9763. watch(() => props.virtualRef, (virtualEl) => {
  9764. if (virtualEl) triggerRef.value = unrefElement(virtualEl);
  9765. }, { immediate: true });
  9766. watch(triggerRef, (el, prevEl) => {
  9767. virtualTriggerAriaStopWatch?.();
  9768. virtualTriggerAriaStopWatch = void 0;
  9769. if (isElement$1(prevEl)) TRIGGER_ELE_EVENTS.forEach((eventName) => {
  9770. const handler = props[eventName];
  9771. if (handler) prevEl.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  9772. });
  9773. if (isElement$1(el)) {
  9774. TRIGGER_ELE_EVENTS.forEach((eventName) => {
  9775. const handler = props[eventName];
  9776. if (handler) el.addEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  9777. });
  9778. if (isFocusable(el)) virtualTriggerAriaStopWatch = watch([
  9779. ariaControls,
  9780. ariaDescribedby,
  9781. ariaHaspopup,
  9782. ariaExpanded
  9783. ], (watches) => {
  9784. [
  9785. "aria-controls",
  9786. "aria-describedby",
  9787. "aria-haspopup",
  9788. "aria-expanded"
  9789. ].forEach((key, idx) => {
  9790. isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  9791. });
  9792. }, { immediate: true });
  9793. }
  9794. if (isElement$1(prevEl) && isFocusable(prevEl)) [
  9795. "aria-controls",
  9796. "aria-describedby",
  9797. "aria-haspopup",
  9798. "aria-expanded"
  9799. ].forEach((key) => prevEl.removeAttribute(key));
  9800. }, { immediate: true });
  9801. });
  9802. onBeforeUnmount(() => {
  9803. virtualTriggerAriaStopWatch?.();
  9804. virtualTriggerAriaStopWatch = void 0;
  9805. if (triggerRef.value && isElement$1(triggerRef.value)) {
  9806. const el = triggerRef.value;
  9807. TRIGGER_ELE_EVENTS.forEach((eventName) => {
  9808. const handler = props[eventName];
  9809. if (handler) el.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  9810. });
  9811. triggerRef.value = void 0;
  9812. }
  9813. });
  9814. __expose({ triggerRef });
  9815. return (_ctx, _cache) => {
  9816. return !__props.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
  9817. "aria-controls": ariaControls.value,
  9818. "aria-describedby": ariaDescribedby.value,
  9819. "aria-expanded": ariaExpanded.value,
  9820. "aria-haspopup": ariaHaspopup.value
  9821. }), {
  9822. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  9823. _: 3
  9824. }, 16, [
  9825. "aria-controls",
  9826. "aria-describedby",
  9827. "aria-expanded",
  9828. "aria-haspopup"
  9829. ])) : createCommentVNode("v-if", true);
  9830. };
  9831. }
  9832. });
  9833. //#endregion
  9834. //#region node_modules/element-plus/es/components/popper/src/arrow.mjs
  9835. /**
  9836. * @deprecated Removed after 3.0.0, Use `PopperArrowProps` instead.
  9837. */
  9838. var popperArrowProps = buildProps({ arrowOffset: {
  9839. type: Number,
  9840. default: 5
  9841. } });
  9842. var popperArrowPropsDefaults = { arrowOffset: 5 };
  9843. /** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */
  9844. var usePopperArrowProps = popperArrowProps;
  9845. //#endregion
  9846. //#region node_modules/element-plus/es/components/popper/src/content.mjs
  9847. /**
  9848. * @deprecated Removed after 3.0.0, Use `PopperCoreConfigProps` instead.
  9849. */
  9850. var popperCoreConfigProps = buildProps({
  9851. boundariesPadding: {
  9852. type: Number,
  9853. default: 0
  9854. },
  9855. fallbackPlacements: {
  9856. type: definePropType(Array),
  9857. default: void 0
  9858. },
  9859. gpuAcceleration: {
  9860. type: Boolean,
  9861. default: true
  9862. },
  9863. offset: {
  9864. type: Number,
  9865. default: 12
  9866. },
  9867. placement: {
  9868. type: String,
  9869. values: Ee,
  9870. default: "bottom"
  9871. },
  9872. popperOptions: {
  9873. type: definePropType(Object),
  9874. default: () => ({})
  9875. },
  9876. strategy: {
  9877. type: String,
  9878. values: ["fixed", "absolute"],
  9879. default: "absolute"
  9880. }
  9881. });
  9882. /**
  9883. * @deprecated Removed after 3.0.0, Use `PopperContentProps` instead.
  9884. */
  9885. var popperContentProps = buildProps({
  9886. ...popperCoreConfigProps,
  9887. ...popperArrowProps,
  9888. id: String,
  9889. style: { type: definePropType([
  9890. String,
  9891. Array,
  9892. Object
  9893. ]) },
  9894. className: { type: definePropType([
  9895. String,
  9896. Array,
  9897. Object
  9898. ]) },
  9899. effect: {
  9900. type: definePropType(String),
  9901. default: "dark"
  9902. },
  9903. visible: Boolean,
  9904. enterable: {
  9905. type: Boolean,
  9906. default: true
  9907. },
  9908. pure: Boolean,
  9909. focusOnShow: Boolean,
  9910. trapping: Boolean,
  9911. popperClass: { type: definePropType([
  9912. String,
  9913. Array,
  9914. Object
  9915. ]) },
  9916. popperStyle: { type: definePropType([
  9917. String,
  9918. Array,
  9919. Object
  9920. ]) },
  9921. referenceEl: { type: definePropType(Object) },
  9922. triggerTargetEl: { type: definePropType(Object) },
  9923. stopPopperMouseEvent: {
  9924. type: Boolean,
  9925. default: true
  9926. },
  9927. virtualTriggering: Boolean,
  9928. zIndex: Number,
  9929. ...useAriaProps(["ariaLabel"]),
  9930. loop: Boolean
  9931. });
  9932. var popperCoreConfigPropsDefaults = {
  9933. boundariesPadding: 0,
  9934. gpuAcceleration: true,
  9935. offset: 12,
  9936. placement: "bottom",
  9937. popperOptions: () => ({}),
  9938. strategy: "absolute"
  9939. };
  9940. var popperContentPropsDefaults = {
  9941. ...popperCoreConfigPropsDefaults,
  9942. ...popperArrowPropsDefaults,
  9943. effect: "dark",
  9944. enterable: true,
  9945. stopPopperMouseEvent: true,
  9946. visible: false,
  9947. pure: false,
  9948. focusOnShow: false,
  9949. trapping: false,
  9950. virtualTriggering: false,
  9951. loop: false,
  9952. style: void 0,
  9953. popperStyle: void 0
  9954. };
  9955. var popperContentEmits = {
  9956. mouseenter: (evt) => evt instanceof MouseEvent,
  9957. mouseleave: (evt) => evt instanceof MouseEvent,
  9958. focus: () => true,
  9959. blur: () => true,
  9960. close: () => true
  9961. };
  9962. /** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */
  9963. var usePopperCoreConfigProps = popperCoreConfigProps;
  9964. /** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */
  9965. var usePopperContentProps = popperContentProps;
  9966. /** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */
  9967. var usePopperContentEmits = popperContentEmits;
  9968. //#endregion
  9969. //#region node_modules/element-plus/es/components/form/src/form.mjs
  9970. /**
  9971. * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.
  9972. */
  9973. var formMetaProps = buildProps({
  9974. size: {
  9975. type: String,
  9976. values: componentSizes
  9977. },
  9978. disabled: Boolean
  9979. });
  9980. /**
  9981. * @deprecated Removed after 3.0.0, Use `FormProps` instead.
  9982. */
  9983. var formProps = buildProps({
  9984. ...formMetaProps,
  9985. model: Object,
  9986. rules: { type: definePropType(Object) },
  9987. labelPosition: {
  9988. type: String,
  9989. values: [
  9990. "left",
  9991. "right",
  9992. "top"
  9993. ],
  9994. default: "right"
  9995. },
  9996. requireAsteriskPosition: {
  9997. type: String,
  9998. values: ["left", "right"],
  9999. default: "left"
  10000. },
  10001. labelWidth: {
  10002. type: [String, Number],
  10003. default: ""
  10004. },
  10005. labelSuffix: {
  10006. type: String,
  10007. default: ""
  10008. },
  10009. inline: Boolean,
  10010. inlineMessage: Boolean,
  10011. statusIcon: Boolean,
  10012. showMessage: {
  10013. type: Boolean,
  10014. default: true
  10015. },
  10016. validateOnRuleChange: {
  10017. type: Boolean,
  10018. default: true
  10019. },
  10020. hideRequiredAsterisk: Boolean,
  10021. scrollToError: Boolean,
  10022. scrollIntoViewOptions: {
  10023. type: definePropType([Object, Boolean]),
  10024. default: true
  10025. }
  10026. });
  10027. var formEmits = { validate: (prop, isValid, message) => (isArray$1(prop) || isString(prop)) && isBoolean(isValid) && isString(message) };
  10028. //#endregion
  10029. //#region node_modules/element-plus/es/components/form/src/constants.mjs
  10030. var formContextKey = Symbol("formContextKey");
  10031. var formItemContextKey = Symbol("formItemContextKey");
  10032. //#endregion
  10033. //#region node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs
  10034. var useFormSize = (fallback, ignore = {}) => {
  10035. const emptyRef = ref(void 0);
  10036. const size = ignore.prop ? emptyRef : useProp("size");
  10037. const globalConfig = ignore.global ? emptyRef : useGlobalSize();
  10038. const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
  10039. const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
  10040. return computed(() => size.value || unref(fallback) || formItem?.size || form?.size || globalConfig.value || "");
  10041. };
  10042. var useFormDisabled = (fallback) => {
  10043. const disabled = useProp("disabled");
  10044. const form = inject(formContextKey, void 0);
  10045. return computed(() => {
  10046. return disabled.value ?? unref(fallback) ?? form?.disabled ?? false;
  10047. });
  10048. };
  10049. var useSize = useFormSize;
  10050. var useDisabled = useFormDisabled;
  10051. //#endregion
  10052. //#region node_modules/element-plus/es/components/form/src/hooks/use-form-item.mjs
  10053. var useFormItem = () => {
  10054. return {
  10055. form: inject(formContextKey, void 0),
  10056. formItem: inject(formItemContextKey, void 0)
  10057. };
  10058. };
  10059. var useFormItemInputId = (props, { formItemContext, disableIdGeneration, disableIdManagement }) => {
  10060. if (!disableIdGeneration) disableIdGeneration = ref(false);
  10061. if (!disableIdManagement) disableIdManagement = ref(false);
  10062. const instance = getCurrentInstance();
  10063. const inLabel = () => {
  10064. let parent = instance?.parent;
  10065. while (parent) {
  10066. if (parent.type.name === "ElFormItem") return false;
  10067. if (parent.type.name === "ElLabelWrap") return true;
  10068. parent = parent.parent;
  10069. }
  10070. return false;
  10071. };
  10072. const inputId = ref();
  10073. let idUnwatch = void 0;
  10074. const isLabeledByFormItem = computed(() => {
  10075. return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && formItemContext.inputIds?.length <= 1);
  10076. });
  10077. onMounted(() => {
  10078. idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration]) => {
  10079. const newId = id ?? (!disableIdGeneration ? useId().value : void 0);
  10080. if (newId !== inputId.value) {
  10081. if (formItemContext?.removeInputId && !inLabel()) {
  10082. inputId.value && formItemContext.removeInputId(inputId.value);
  10083. if (!disableIdManagement?.value && !disableIdGeneration && newId) formItemContext.addInputId(newId);
  10084. }
  10085. inputId.value = newId;
  10086. }
  10087. }, { immediate: true });
  10088. });
  10089. onUnmounted(() => {
  10090. idUnwatch && idUnwatch();
  10091. if (formItemContext?.removeInputId) inputId.value && formItemContext.removeInputId(inputId.value);
  10092. });
  10093. return {
  10094. isLabeledByFormItem,
  10095. inputId
  10096. };
  10097. };
  10098. //#endregion
  10099. //#region node_modules/element-plus/es/components/form/src/form-item.mjs
  10100. var formItemValidateStates = [
  10101. "",
  10102. "error",
  10103. "validating",
  10104. "success"
  10105. ];
  10106. /**
  10107. * @deprecated Removed after 3.0.0, Use `FormItemProps` instead.
  10108. */
  10109. var formItemProps = buildProps({
  10110. label: String,
  10111. labelWidth: { type: [String, Number] },
  10112. labelPosition: {
  10113. type: String,
  10114. values: [
  10115. "left",
  10116. "right",
  10117. "top",
  10118. ""
  10119. ],
  10120. default: ""
  10121. },
  10122. prop: { type: definePropType([String, Array]) },
  10123. required: {
  10124. type: Boolean,
  10125. default: void 0
  10126. },
  10127. rules: { type: definePropType([Object, Array]) },
  10128. error: String,
  10129. validateStatus: {
  10130. type: String,
  10131. values: formItemValidateStates
  10132. },
  10133. for: String,
  10134. inlineMessage: {
  10135. type: Boolean,
  10136. default: void 0
  10137. },
  10138. showMessage: {
  10139. type: Boolean,
  10140. default: true
  10141. },
  10142. size: {
  10143. type: String,
  10144. values: componentSizes
  10145. }
  10146. });
  10147. //#endregion
  10148. //#region node_modules/element-plus/es/utils/arrays.mjs
  10149. var unique = (arr) => [...new Set(arr)];
  10150. var extractFirst = (arr) => {
  10151. return isArray$1(arr) ? arr[0] : arr;
  10152. };
  10153. /** like `_.castArray`, except falsy value returns empty array. */
  10154. var castArray = (arr) => {
  10155. if (!arr && arr !== 0) return [];
  10156. return isArray$1(arr) ? arr : [arr];
  10157. };
  10158. //#endregion
  10159. //#region node_modules/element-plus/es/components/form/src/utils.mjs
  10160. var SCOPE$10 = "ElForm";
  10161. function useFormLabelWidth() {
  10162. const potentialLabelWidthArr = ref([]);
  10163. const autoLabelWidth = computed(() => {
  10164. if (!potentialLabelWidthArr.value.length) return "0";
  10165. const max = Math.max(...potentialLabelWidthArr.value);
  10166. return max ? `${max}px` : "";
  10167. });
  10168. function getLabelWidthIndex(width) {
  10169. const index = potentialLabelWidthArr.value.indexOf(width);
  10170. if (index === -1 && autoLabelWidth.value === "0") debugWarn(SCOPE$10, `unexpected width ${width}`);
  10171. return index;
  10172. }
  10173. function registerLabelWidth(val, oldVal) {
  10174. if (val && oldVal) {
  10175. const index = getLabelWidthIndex(oldVal);
  10176. potentialLabelWidthArr.value.splice(index, 1, val);
  10177. } else if (val) potentialLabelWidthArr.value.push(val);
  10178. }
  10179. function deregisterLabelWidth(val) {
  10180. const index = getLabelWidthIndex(val);
  10181. if (index > -1) potentialLabelWidthArr.value.splice(index, 1);
  10182. }
  10183. return {
  10184. autoLabelWidth,
  10185. registerLabelWidth,
  10186. deregisterLabelWidth
  10187. };
  10188. }
  10189. var filterFields = (fields, props) => {
  10190. const normalized = castArray$1(props).map((prop) => isArray$1(prop) ? prop.join(".") : prop);
  10191. return normalized.length > 0 ? fields.filter((field) => field.propString && normalized.includes(field.propString)) : fields;
  10192. };
  10193. //#endregion
  10194. //#region node_modules/element-plus/es/components/form/src/form.vue_vue_type_script_setup_true_lang.mjs
  10195. var COMPONENT_NAME$21 = "ElForm";
  10196. //#endregion
  10197. //#region node_modules/element-plus/es/components/form/src/form2.mjs
  10198. var form_default = /* @__PURE__ */ defineComponent({
  10199. name: COMPONENT_NAME$21,
  10200. __name: "form",
  10201. props: formProps,
  10202. emits: formEmits,
  10203. setup(__props, { expose: __expose, emit: __emit }) {
  10204. const props = __props;
  10205. const emit = __emit;
  10206. const formRef = ref();
  10207. const fields = reactive([]);
  10208. const initialValues = /* @__PURE__ */ new Map();
  10209. const formSize = useFormSize();
  10210. const ns = useNamespace("form");
  10211. const formClasses = computed(() => {
  10212. const { labelPosition, inline } = props;
  10213. return [
  10214. ns.b(),
  10215. ns.m(formSize.value || "default"),
  10216. {
  10217. [ns.m(`label-${labelPosition}`)]: labelPosition,
  10218. [ns.m("inline")]: inline
  10219. }
  10220. ];
  10221. });
  10222. const getField = (prop) => {
  10223. return filterFields(fields, [prop])[0];
  10224. };
  10225. const addField = (field) => {
  10226. fields.push(field);
  10227. if (field.propString) if (initialValues.has(field.propString)) field.setInitialValue(initialValues.get(field.propString));
  10228. else initialValues.set(field.propString, cloneDeep(field.fieldValue));
  10229. };
  10230. const removeField = (field) => {
  10231. if (field.prop) fields.splice(fields.indexOf(field), 1);
  10232. };
  10233. const setInitialValues = (initModel) => {
  10234. if (!props.model) {
  10235. debugWarn(COMPONENT_NAME$21, "model is required for setInitialValues to work.");
  10236. return;
  10237. }
  10238. if (!initModel) {
  10239. debugWarn(COMPONENT_NAME$21, "initModel is required for setInitialValues to work.");
  10240. return;
  10241. }
  10242. for (const key of initialValues.keys()) initialValues.set(key, cloneDeep(getProp(initModel, key).value));
  10243. fields.forEach((field) => {
  10244. if (field.prop) field.setInitialValue(getProp(initModel, field.prop).value);
  10245. });
  10246. };
  10247. const resetFields = (properties = []) => {
  10248. if (!props.model) {
  10249. debugWarn(COMPONENT_NAME$21, "model is required for resetFields to work.");
  10250. return;
  10251. }
  10252. filterFields(fields, properties).forEach((field) => field.resetField());
  10253. const activePropStrings = new Set(fields.map((f) => f.propString).filter(Boolean));
  10254. const propsToCheck = properties.length > 0 ? castArray$1(properties).map((p) => isArray$1(p) ? p.join(".") : p) : [...initialValues.keys()];
  10255. for (const propString of propsToCheck) if (!activePropStrings.has(propString) && initialValues.has(propString)) getProp(props.model, propString).value = cloneDeep(initialValues.get(propString));
  10256. };
  10257. const clearValidate = (props = []) => {
  10258. filterFields(fields, props).forEach((field) => field.clearValidate());
  10259. };
  10260. const isValidatable = computed(() => {
  10261. const hasModel = !!props.model;
  10262. if (!hasModel) debugWarn(COMPONENT_NAME$21, "model is required for validate to work.");
  10263. return hasModel;
  10264. });
  10265. const obtainValidateFields = (props) => {
  10266. if (fields.length === 0) return [];
  10267. const filteredFields = filterFields(fields, props);
  10268. if (!filteredFields.length) {
  10269. debugWarn(COMPONENT_NAME$21, "please pass correct props!");
  10270. return [];
  10271. }
  10272. return filteredFields;
  10273. };
  10274. const validate = async (callback) => validateField(void 0, callback);
  10275. const doValidateField = async (props = []) => {
  10276. if (!isValidatable.value) return false;
  10277. const fields = obtainValidateFields(props);
  10278. if (fields.length === 0) return true;
  10279. let validationErrors = {};
  10280. for (const field of fields) try {
  10281. await field.validate("");
  10282. if (field.validateState === "error" && !field.error) field.resetField();
  10283. } catch (fields) {
  10284. validationErrors = {
  10285. ...validationErrors,
  10286. ...fields
  10287. };
  10288. }
  10289. if (Object.keys(validationErrors).length === 0) return true;
  10290. return Promise.reject(validationErrors);
  10291. };
  10292. const validateField = async (modelProps = [], callback) => {
  10293. let result = false;
  10294. const shouldThrow = !isFunction$1(callback);
  10295. try {
  10296. result = await doValidateField(modelProps);
  10297. if (result === true) await callback?.(result);
  10298. return result;
  10299. } catch (e) {
  10300. if (e instanceof Error) throw e;
  10301. const invalidFields = e;
  10302. if (props.scrollToError) {
  10303. if (formRef.value) formRef.value.querySelector(`.${ns.b()}-item.is-error`)?.scrollIntoView(props.scrollIntoViewOptions);
  10304. }
  10305. !result && await callback?.(false, invalidFields);
  10306. return shouldThrow && Promise.reject(invalidFields);
  10307. }
  10308. };
  10309. const scrollToField = (prop) => {
  10310. const field = getField(prop);
  10311. if (field) field.$el?.scrollIntoView(props.scrollIntoViewOptions);
  10312. };
  10313. watch(() => props.rules, () => {
  10314. if (props.validateOnRuleChange) validate().catch((err) => debugWarn(err));
  10315. }, {
  10316. deep: true,
  10317. flush: "post"
  10318. });
  10319. provide(formContextKey, reactive({
  10320. ...toRefs(props),
  10321. emit,
  10322. resetFields,
  10323. clearValidate,
  10324. validateField,
  10325. getField,
  10326. addField,
  10327. removeField,
  10328. setInitialValues,
  10329. ...useFormLabelWidth()
  10330. }));
  10331. __expose({
  10332. validate,
  10333. validateField,
  10334. resetFields,
  10335. clearValidate,
  10336. scrollToField,
  10337. getField,
  10338. fields,
  10339. setInitialValues
  10340. });
  10341. return (_ctx, _cache) => {
  10342. return openBlock(), createElementBlock("form", {
  10343. ref_key: "formRef",
  10344. ref: formRef,
  10345. class: normalizeClass(formClasses.value)
  10346. }, [renderSlot(_ctx.$slots, "default")], 2);
  10347. };
  10348. }
  10349. });
  10350. //#endregion
  10351. //#region node_modules/element-plus/es/components/form/src/form-label-wrap.mjs
  10352. var COMPONENT_NAME$20 = "ElLabelWrap";
  10353. var form_label_wrap_default = /* @__PURE__ */ defineComponent({
  10354. name: COMPONENT_NAME$20,
  10355. props: {
  10356. isAutoWidth: Boolean,
  10357. updateAll: Boolean
  10358. },
  10359. setup(props, { slots }) {
  10360. const formContext = inject(formContextKey, void 0);
  10361. const formItemContext = inject(formItemContextKey);
  10362. if (!formItemContext) throwError(COMPONENT_NAME$20, "usage: <el-form-item><label-wrap /></el-form-item>");
  10363. const ns = useNamespace("form");
  10364. const el = ref();
  10365. const computedWidth = ref(0);
  10366. const getLabelWidth = () => {
  10367. if (el.value?.firstElementChild) {
  10368. const width = window.getComputedStyle(el.value.firstElementChild).width;
  10369. return Math.ceil(Number.parseFloat(width));
  10370. } else return 0;
  10371. };
  10372. const updateLabelWidth = (action = "update") => {
  10373. nextTick(() => {
  10374. if (slots.default && props.isAutoWidth) {
  10375. if (action === "update") computedWidth.value = getLabelWidth();
  10376. else if (action === "remove") formContext?.deregisterLabelWidth(computedWidth.value);
  10377. }
  10378. });
  10379. };
  10380. const updateLabelWidthFn = () => updateLabelWidth("update");
  10381. onMounted(() => {
  10382. updateLabelWidthFn();
  10383. });
  10384. onBeforeUnmount(() => {
  10385. updateLabelWidth("remove");
  10386. });
  10387. onUpdated(() => updateLabelWidthFn());
  10388. watch(computedWidth, (val, oldVal) => {
  10389. if (props.updateAll) formContext?.registerLabelWidth(val, oldVal);
  10390. });
  10391. useResizeObserver(computed(() => el.value?.firstElementChild ?? null), updateLabelWidthFn);
  10392. return () => {
  10393. if (!slots) return null;
  10394. const { isAutoWidth } = props;
  10395. if (isAutoWidth) {
  10396. const autoLabelWidth = formContext?.autoLabelWidth;
  10397. const hasLabel = formItemContext?.hasLabel;
  10398. const style = {};
  10399. if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
  10400. const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
  10401. const marginPosition = (formItemContext.labelPosition || formContext.labelPosition) === "left" ? "marginRight" : "marginLeft";
  10402. if (marginWidth) style[marginPosition] = `${marginWidth}px`;
  10403. }
  10404. return createVNode("div", {
  10405. "ref": el,
  10406. "class": [ns.be("item", "label-wrap")],
  10407. "style": style
  10408. }, [slots.default?.()]);
  10409. } else return createVNode(Fragment, { "ref": el }, [slots.default?.()]);
  10410. };
  10411. }
  10412. });
  10413. //#endregion
  10414. //#region node_modules/async-validator/dist-web/index.js
  10415. function _extends() {
  10416. _extends = Object.assign ? Object.assign.bind() : function(target) {
  10417. for (var i = 1; i < arguments.length; i++) {
  10418. var source = arguments[i];
  10419. for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
  10420. }
  10421. return target;
  10422. };
  10423. return _extends.apply(this, arguments);
  10424. }
  10425. function _inheritsLoose(subClass, superClass) {
  10426. subClass.prototype = Object.create(superClass.prototype);
  10427. subClass.prototype.constructor = subClass;
  10428. _setPrototypeOf(subClass, superClass);
  10429. }
  10430. function _getPrototypeOf(o) {
  10431. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  10432. return o.__proto__ || Object.getPrototypeOf(o);
  10433. };
  10434. return _getPrototypeOf(o);
  10435. }
  10436. function _setPrototypeOf(o, p) {
  10437. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  10438. o.__proto__ = p;
  10439. return o;
  10440. };
  10441. return _setPrototypeOf(o, p);
  10442. }
  10443. function _isNativeReflectConstruct() {
  10444. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  10445. if (Reflect.construct.sham) return false;
  10446. if (typeof Proxy === "function") return true;
  10447. try {
  10448. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  10449. return true;
  10450. } catch (e) {
  10451. return false;
  10452. }
  10453. }
  10454. function _construct(Parent, args, Class) {
  10455. if (_isNativeReflectConstruct()) _construct = Reflect.construct.bind();
  10456. else _construct = function _construct(Parent, args, Class) {
  10457. var a = [null];
  10458. a.push.apply(a, args);
  10459. var instance = new (Function.bind.apply(Parent, a))();
  10460. if (Class) _setPrototypeOf(instance, Class.prototype);
  10461. return instance;
  10462. };
  10463. return _construct.apply(null, arguments);
  10464. }
  10465. function _isNativeFunction(fn) {
  10466. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  10467. }
  10468. function _wrapNativeSuper(Class) {
  10469. var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
  10470. _wrapNativeSuper = function _wrapNativeSuper(Class) {
  10471. if (Class === null || !_isNativeFunction(Class)) return Class;
  10472. if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
  10473. if (typeof _cache !== "undefined") {
  10474. if (_cache.has(Class)) return _cache.get(Class);
  10475. _cache.set(Class, Wrapper);
  10476. }
  10477. function Wrapper() {
  10478. return _construct(Class, arguments, _getPrototypeOf(this).constructor);
  10479. }
  10480. Wrapper.prototype = Object.create(Class.prototype, { constructor: {
  10481. value: Wrapper,
  10482. enumerable: false,
  10483. writable: true,
  10484. configurable: true
  10485. } });
  10486. return _setPrototypeOf(Wrapper, Class);
  10487. };
  10488. return _wrapNativeSuper(Class);
  10489. }
  10490. var formatRegExp = /%[sdj%]/g;
  10491. var warning = function warning() {};
  10492. if (typeof process !== "undefined" && process.env && typeof window !== "undefined" && typeof document !== "undefined") warning = function warning(type, errors) {
  10493. if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
  10494. if (errors.every(function(e) {
  10495. return typeof e === "string";
  10496. })) console.warn(type, errors);
  10497. }
  10498. };
  10499. function convertFieldsError(errors) {
  10500. if (!errors || !errors.length) return null;
  10501. var fields = {};
  10502. errors.forEach(function(error) {
  10503. var field = error.field;
  10504. fields[field] = fields[field] || [];
  10505. fields[field].push(error);
  10506. });
  10507. return fields;
  10508. }
  10509. function format(template) {
  10510. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
  10511. var i = 0;
  10512. var len = args.length;
  10513. if (typeof template === "function") return template.apply(null, args);
  10514. if (typeof template === "string") return template.replace(formatRegExp, function(x) {
  10515. if (x === "%%") return "%";
  10516. if (i >= len) return x;
  10517. switch (x) {
  10518. case "%s": return String(args[i++]);
  10519. case "%d": return Number(args[i++]);
  10520. case "%j":
  10521. try {
  10522. return JSON.stringify(args[i++]);
  10523. } catch (_) {
  10524. return "[Circular]";
  10525. }
  10526. break;
  10527. default: return x;
  10528. }
  10529. });
  10530. return template;
  10531. }
  10532. function isNativeStringType(type) {
  10533. return type === "string" || type === "url" || type === "hex" || type === "email" || type === "date" || type === "pattern";
  10534. }
  10535. function isEmptyValue(value, type) {
  10536. if (value === void 0 || value === null) return true;
  10537. if (type === "array" && Array.isArray(value) && !value.length) return true;
  10538. if (isNativeStringType(type) && typeof value === "string" && !value) return true;
  10539. return false;
  10540. }
  10541. function asyncParallelArray(arr, func, callback) {
  10542. var results = [];
  10543. var total = 0;
  10544. var arrLength = arr.length;
  10545. function count(errors) {
  10546. results.push.apply(results, errors || []);
  10547. total++;
  10548. if (total === arrLength) callback(results);
  10549. }
  10550. arr.forEach(function(a) {
  10551. func(a, count);
  10552. });
  10553. }
  10554. function asyncSerialArray(arr, func, callback) {
  10555. var index = 0;
  10556. var arrLength = arr.length;
  10557. function next(errors) {
  10558. if (errors && errors.length) {
  10559. callback(errors);
  10560. return;
  10561. }
  10562. var original = index;
  10563. index = index + 1;
  10564. if (original < arrLength) func(arr[original], next);
  10565. else callback([]);
  10566. }
  10567. next([]);
  10568. }
  10569. function flattenObjArr(objArr) {
  10570. var ret = [];
  10571. Object.keys(objArr).forEach(function(k) {
  10572. ret.push.apply(ret, objArr[k] || []);
  10573. });
  10574. return ret;
  10575. }
  10576. var AsyncValidationError = /* @__PURE__ */ function(_Error) {
  10577. _inheritsLoose(AsyncValidationError, _Error);
  10578. function AsyncValidationError(errors, fields) {
  10579. var _this = _Error.call(this, "Async Validation Error") || this;
  10580. _this.errors = errors;
  10581. _this.fields = fields;
  10582. return _this;
  10583. }
  10584. return AsyncValidationError;
  10585. }(/* @__PURE__ */ _wrapNativeSuper(Error));
  10586. function asyncMap(objArr, option, func, callback, source) {
  10587. if (option.first) {
  10588. var _pending = new Promise(function(resolve, reject) {
  10589. asyncSerialArray(flattenObjArr(objArr), func, function next(errors) {
  10590. callback(errors);
  10591. return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
  10592. });
  10593. });
  10594. _pending["catch"](function(e) {
  10595. return e;
  10596. });
  10597. return _pending;
  10598. }
  10599. var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
  10600. var objArrKeys = Object.keys(objArr);
  10601. var objArrLength = objArrKeys.length;
  10602. var total = 0;
  10603. var results = [];
  10604. var pending = new Promise(function(resolve, reject) {
  10605. var next = function next(errors) {
  10606. results.push.apply(results, errors);
  10607. total++;
  10608. if (total === objArrLength) {
  10609. callback(results);
  10610. return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
  10611. }
  10612. };
  10613. if (!objArrKeys.length) {
  10614. callback(results);
  10615. resolve(source);
  10616. }
  10617. objArrKeys.forEach(function(key) {
  10618. var arr = objArr[key];
  10619. if (firstFields.indexOf(key) !== -1) asyncSerialArray(arr, func, next);
  10620. else asyncParallelArray(arr, func, next);
  10621. });
  10622. });
  10623. pending["catch"](function(e) {
  10624. return e;
  10625. });
  10626. return pending;
  10627. }
  10628. function isErrorObj(obj) {
  10629. return !!(obj && obj.message !== void 0);
  10630. }
  10631. function getValue(value, path) {
  10632. var v = value;
  10633. for (var i = 0; i < path.length; i++) {
  10634. if (v == void 0) return v;
  10635. v = v[path[i]];
  10636. }
  10637. return v;
  10638. }
  10639. function complementError(rule, source) {
  10640. return function(oe) {
  10641. var fieldValue;
  10642. if (rule.fullFields) fieldValue = getValue(source, rule.fullFields);
  10643. else fieldValue = source[oe.field || rule.fullField];
  10644. if (isErrorObj(oe)) {
  10645. oe.field = oe.field || rule.fullField;
  10646. oe.fieldValue = fieldValue;
  10647. return oe;
  10648. }
  10649. return {
  10650. message: typeof oe === "function" ? oe() : oe,
  10651. fieldValue,
  10652. field: oe.field || rule.fullField
  10653. };
  10654. };
  10655. }
  10656. function deepMerge(target, source) {
  10657. if (source) {
  10658. for (var s in source) if (source.hasOwnProperty(s)) {
  10659. var value = source[s];
  10660. if (typeof value === "object" && typeof target[s] === "object") target[s] = _extends({}, target[s], value);
  10661. else target[s] = value;
  10662. }
  10663. }
  10664. return target;
  10665. }
  10666. var required$1 = function required(rule, value, source, errors, options, type) {
  10667. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) errors.push(format(options.messages.required, rule.fullField));
  10668. };
  10669. /**
  10670. * Rule for validating whitespace.
  10671. *
  10672. * @param rule The validation rule.
  10673. * @param value The value of the field on the source object.
  10674. * @param source The source object being validated.
  10675. * @param errors An array of errors that this rule may add
  10676. * validation errors to.
  10677. * @param options The validation options.
  10678. * @param options.messages The validation messages.
  10679. */
  10680. var whitespace = function whitespace(rule, value, source, errors, options) {
  10681. if (/^\s+$/.test(value) || value === "") errors.push(format(options.messages.whitespace, rule.fullField));
  10682. };
  10683. var urlReg;
  10684. var getUrlRegex = (function() {
  10685. if (urlReg) return urlReg;
  10686. var word = "[a-fA-F\\d:]";
  10687. var b = function b(options) {
  10688. return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
  10689. };
  10690. 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}";
  10691. var v6seg = "[a-fA-F\\d]{1,4}";
  10692. 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();
  10693. var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
  10694. var v4exact = new RegExp("^" + v4 + "$");
  10695. var v6exact = new RegExp("^" + v6 + "$");
  10696. var ip = function ip(options) {
  10697. return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
  10698. };
  10699. ip.v4 = function(options) {
  10700. return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
  10701. };
  10702. ip.v6 = function(options) {
  10703. return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
  10704. };
  10705. var protocol = "(?:(?:[a-z]+:)?//)";
  10706. var auth = "(?:\\S+(?::\\S*)?@)?";
  10707. var ipv4 = ip.v4().source;
  10708. var ipv6 = ip.v6().source;
  10709. var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s\"]*)?";
  10710. urlReg = new RegExp("(?:^" + regex + "$)", "i");
  10711. return urlReg;
  10712. });
  10713. var pattern$2 = {
  10714. 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,}))$/,
  10715. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  10716. };
  10717. var types = {
  10718. integer: function integer(value) {
  10719. return types.number(value) && parseInt(value, 10) === value;
  10720. },
  10721. "float": function float(value) {
  10722. return types.number(value) && !types.integer(value);
  10723. },
  10724. array: function array(value) {
  10725. return Array.isArray(value);
  10726. },
  10727. regexp: function regexp(value) {
  10728. if (value instanceof RegExp) return true;
  10729. try {
  10730. return !!new RegExp(value);
  10731. } catch (e) {
  10732. return false;
  10733. }
  10734. },
  10735. date: function date(value) {
  10736. return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
  10737. },
  10738. number: function number(value) {
  10739. if (isNaN(value)) return false;
  10740. return typeof value === "number";
  10741. },
  10742. object: function object(value) {
  10743. return typeof value === "object" && !types.array(value);
  10744. },
  10745. method: function method(value) {
  10746. return typeof value === "function";
  10747. },
  10748. email: function email(value) {
  10749. return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
  10750. },
  10751. url: function url(value) {
  10752. return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
  10753. },
  10754. hex: function hex(value) {
  10755. return typeof value === "string" && !!value.match(pattern$2.hex);
  10756. }
  10757. };
  10758. var type$1 = function type(rule, value, source, errors, options) {
  10759. if (rule.required && value === void 0) {
  10760. required$1(rule, value, source, errors, options);
  10761. return;
  10762. }
  10763. var custom = [
  10764. "integer",
  10765. "float",
  10766. "array",
  10767. "regexp",
  10768. "object",
  10769. "method",
  10770. "email",
  10771. "number",
  10772. "date",
  10773. "url",
  10774. "hex"
  10775. ];
  10776. var ruleType = rule.type;
  10777. if (custom.indexOf(ruleType) > -1) {
  10778. if (!types[ruleType](value)) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  10779. } else if (ruleType && typeof value !== rule.type) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  10780. };
  10781. var range = function range(rule, value, source, errors, options) {
  10782. var len = typeof rule.len === "number";
  10783. var min = typeof rule.min === "number";
  10784. var max = typeof rule.max === "number";
  10785. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  10786. var val = value;
  10787. var key = null;
  10788. var num = typeof value === "number";
  10789. var str = typeof value === "string";
  10790. var arr = Array.isArray(value);
  10791. if (num) key = "number";
  10792. else if (str) key = "string";
  10793. else if (arr) key = "array";
  10794. if (!key) return false;
  10795. if (arr) val = value.length;
  10796. if (str) val = value.replace(spRegexp, "_").length;
  10797. if (len) {
  10798. if (val !== rule.len) errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  10799. } else if (min && !max && val < rule.min) errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  10800. else if (max && !min && val > rule.max) errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  10801. else if (min && max && (val < rule.min || val > rule.max)) errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  10802. };
  10803. var ENUM$1 = "enum";
  10804. var enumerable$1 = function enumerable(rule, value, source, errors, options) {
  10805. rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
  10806. if (rule[ENUM$1].indexOf(value) === -1) errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
  10807. };
  10808. var pattern$1 = function pattern(rule, value, source, errors, options) {
  10809. if (rule.pattern) {
  10810. if (rule.pattern instanceof RegExp) {
  10811. rule.pattern.lastIndex = 0;
  10812. if (!rule.pattern.test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10813. } else if (typeof rule.pattern === "string") {
  10814. if (!new RegExp(rule.pattern).test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  10815. }
  10816. }
  10817. };
  10818. var rules = {
  10819. required: required$1,
  10820. whitespace,
  10821. type: type$1,
  10822. range,
  10823. "enum": enumerable$1,
  10824. pattern: pattern$1
  10825. };
  10826. var string = function string(rule, value, callback, source, options) {
  10827. var errors = [];
  10828. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10829. if (isEmptyValue(value, "string") && !rule.required) return callback();
  10830. rules.required(rule, value, source, errors, options, "string");
  10831. if (!isEmptyValue(value, "string")) {
  10832. rules.type(rule, value, source, errors, options);
  10833. rules.range(rule, value, source, errors, options);
  10834. rules.pattern(rule, value, source, errors, options);
  10835. if (rule.whitespace === true) rules.whitespace(rule, value, source, errors, options);
  10836. }
  10837. }
  10838. callback(errors);
  10839. };
  10840. var method = function method(rule, value, callback, source, options) {
  10841. var errors = [];
  10842. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10843. if (isEmptyValue(value) && !rule.required) return callback();
  10844. rules.required(rule, value, source, errors, options);
  10845. if (value !== void 0) rules.type(rule, value, source, errors, options);
  10846. }
  10847. callback(errors);
  10848. };
  10849. var number = function number(rule, value, callback, source, options) {
  10850. var errors = [];
  10851. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10852. if (value === "") value = void 0;
  10853. if (isEmptyValue(value) && !rule.required) return callback();
  10854. rules.required(rule, value, source, errors, options);
  10855. if (value !== void 0) {
  10856. rules.type(rule, value, source, errors, options);
  10857. rules.range(rule, value, source, errors, options);
  10858. }
  10859. }
  10860. callback(errors);
  10861. };
  10862. var _boolean = function _boolean(rule, value, callback, source, options) {
  10863. var errors = [];
  10864. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10865. if (isEmptyValue(value) && !rule.required) return callback();
  10866. rules.required(rule, value, source, errors, options);
  10867. if (value !== void 0) rules.type(rule, value, source, errors, options);
  10868. }
  10869. callback(errors);
  10870. };
  10871. var regexp = function regexp(rule, value, callback, source, options) {
  10872. var errors = [];
  10873. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10874. if (isEmptyValue(value) && !rule.required) return callback();
  10875. rules.required(rule, value, source, errors, options);
  10876. if (!isEmptyValue(value)) rules.type(rule, value, source, errors, options);
  10877. }
  10878. callback(errors);
  10879. };
  10880. var integer = function integer(rule, value, callback, source, options) {
  10881. var errors = [];
  10882. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10883. if (isEmptyValue(value) && !rule.required) return callback();
  10884. rules.required(rule, value, source, errors, options);
  10885. if (value !== void 0) {
  10886. rules.type(rule, value, source, errors, options);
  10887. rules.range(rule, value, source, errors, options);
  10888. }
  10889. }
  10890. callback(errors);
  10891. };
  10892. var floatFn = function floatFn(rule, value, callback, source, options) {
  10893. var errors = [];
  10894. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10895. if (isEmptyValue(value) && !rule.required) return callback();
  10896. rules.required(rule, value, source, errors, options);
  10897. if (value !== void 0) {
  10898. rules.type(rule, value, source, errors, options);
  10899. rules.range(rule, value, source, errors, options);
  10900. }
  10901. }
  10902. callback(errors);
  10903. };
  10904. var array = function array(rule, value, callback, source, options) {
  10905. var errors = [];
  10906. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10907. if ((value === void 0 || value === null) && !rule.required) return callback();
  10908. rules.required(rule, value, source, errors, options, "array");
  10909. if (value !== void 0 && value !== null) {
  10910. rules.type(rule, value, source, errors, options);
  10911. rules.range(rule, value, source, errors, options);
  10912. }
  10913. }
  10914. callback(errors);
  10915. };
  10916. var object = function object(rule, value, callback, source, options) {
  10917. var errors = [];
  10918. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10919. if (isEmptyValue(value) && !rule.required) return callback();
  10920. rules.required(rule, value, source, errors, options);
  10921. if (value !== void 0) rules.type(rule, value, source, errors, options);
  10922. }
  10923. callback(errors);
  10924. };
  10925. var ENUM = "enum";
  10926. var enumerable = function enumerable(rule, value, callback, source, options) {
  10927. var errors = [];
  10928. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10929. if (isEmptyValue(value) && !rule.required) return callback();
  10930. rules.required(rule, value, source, errors, options);
  10931. if (value !== void 0) rules[ENUM](rule, value, source, errors, options);
  10932. }
  10933. callback(errors);
  10934. };
  10935. var pattern = function pattern(rule, value, callback, source, options) {
  10936. var errors = [];
  10937. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10938. if (isEmptyValue(value, "string") && !rule.required) return callback();
  10939. rules.required(rule, value, source, errors, options);
  10940. if (!isEmptyValue(value, "string")) rules.pattern(rule, value, source, errors, options);
  10941. }
  10942. callback(errors);
  10943. };
  10944. var date = function date(rule, value, callback, source, options) {
  10945. var errors = [];
  10946. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10947. if (isEmptyValue(value, "date") && !rule.required) return callback();
  10948. rules.required(rule, value, source, errors, options);
  10949. if (!isEmptyValue(value, "date")) {
  10950. var dateObject;
  10951. if (value instanceof Date) dateObject = value;
  10952. else dateObject = new Date(value);
  10953. rules.type(rule, dateObject, source, errors, options);
  10954. if (dateObject) rules.range(rule, dateObject.getTime(), source, errors, options);
  10955. }
  10956. }
  10957. callback(errors);
  10958. };
  10959. var required = function required(rule, value, callback, source, options) {
  10960. var errors = [];
  10961. var type = Array.isArray(value) ? "array" : typeof value;
  10962. rules.required(rule, value, source, errors, options, type);
  10963. callback(errors);
  10964. };
  10965. var type = function type(rule, value, callback, source, options) {
  10966. var ruleType = rule.type;
  10967. var errors = [];
  10968. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10969. if (isEmptyValue(value, ruleType) && !rule.required) return callback();
  10970. rules.required(rule, value, source, errors, options, ruleType);
  10971. if (!isEmptyValue(value, ruleType)) rules.type(rule, value, source, errors, options);
  10972. }
  10973. callback(errors);
  10974. };
  10975. var any = function any(rule, value, callback, source, options) {
  10976. var errors = [];
  10977. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  10978. if (isEmptyValue(value) && !rule.required) return callback();
  10979. rules.required(rule, value, source, errors, options);
  10980. }
  10981. callback(errors);
  10982. };
  10983. var validators = {
  10984. string,
  10985. method,
  10986. number,
  10987. "boolean": _boolean,
  10988. regexp,
  10989. integer,
  10990. "float": floatFn,
  10991. array,
  10992. object,
  10993. "enum": enumerable,
  10994. pattern,
  10995. date,
  10996. url: type,
  10997. hex: type,
  10998. email: type,
  10999. required,
  11000. any
  11001. };
  11002. function newMessages() {
  11003. return {
  11004. "default": "Validation error on field %s",
  11005. required: "%s is required",
  11006. "enum": "%s must be one of %s",
  11007. whitespace: "%s cannot be empty",
  11008. date: {
  11009. format: "%s date %s is invalid for format %s",
  11010. parse: "%s date could not be parsed, %s is invalid ",
  11011. invalid: "%s date %s is invalid"
  11012. },
  11013. types: {
  11014. string: "%s is not a %s",
  11015. method: "%s is not a %s (function)",
  11016. array: "%s is not an %s",
  11017. object: "%s is not an %s",
  11018. number: "%s is not a %s",
  11019. date: "%s is not a %s",
  11020. "boolean": "%s is not a %s",
  11021. integer: "%s is not an %s",
  11022. "float": "%s is not a %s",
  11023. regexp: "%s is not a valid %s",
  11024. email: "%s is not a valid %s",
  11025. url: "%s is not a valid %s",
  11026. hex: "%s is not a valid %s"
  11027. },
  11028. string: {
  11029. len: "%s must be exactly %s characters",
  11030. min: "%s must be at least %s characters",
  11031. max: "%s cannot be longer than %s characters",
  11032. range: "%s must be between %s and %s characters"
  11033. },
  11034. number: {
  11035. len: "%s must equal %s",
  11036. min: "%s cannot be less than %s",
  11037. max: "%s cannot be greater than %s",
  11038. range: "%s must be between %s and %s"
  11039. },
  11040. array: {
  11041. len: "%s must be exactly %s in length",
  11042. min: "%s cannot be less than %s in length",
  11043. max: "%s cannot be greater than %s in length",
  11044. range: "%s must be between %s and %s in length"
  11045. },
  11046. pattern: { mismatch: "%s value %s does not match pattern %s" },
  11047. clone: function clone() {
  11048. var cloned = JSON.parse(JSON.stringify(this));
  11049. cloned.clone = this.clone;
  11050. return cloned;
  11051. }
  11052. };
  11053. }
  11054. var messages = newMessages();
  11055. /**
  11056. * Encapsulates a validation schema.
  11057. *
  11058. * @param descriptor An object declaring validation rules
  11059. * for this schema.
  11060. */
  11061. var Schema = /* @__PURE__ */ function() {
  11062. function Schema(descriptor) {
  11063. this.rules = null;
  11064. this._messages = messages;
  11065. this.define(descriptor);
  11066. }
  11067. var _proto = Schema.prototype;
  11068. _proto.define = function define(rules) {
  11069. var _this = this;
  11070. if (!rules) throw new Error("Cannot configure a schema with no rules");
  11071. if (typeof rules !== "object" || Array.isArray(rules)) throw new Error("Rules must be an object");
  11072. this.rules = {};
  11073. Object.keys(rules).forEach(function(name) {
  11074. var item = rules[name];
  11075. _this.rules[name] = Array.isArray(item) ? item : [item];
  11076. });
  11077. };
  11078. _proto.messages = function messages(_messages) {
  11079. if (_messages) this._messages = deepMerge(newMessages(), _messages);
  11080. return this._messages;
  11081. };
  11082. _proto.validate = function validate(source_, o, oc) {
  11083. var _this2 = this;
  11084. if (o === void 0) o = {};
  11085. if (oc === void 0) oc = function oc() {};
  11086. var source = source_;
  11087. var options = o;
  11088. var callback = oc;
  11089. if (typeof options === "function") {
  11090. callback = options;
  11091. options = {};
  11092. }
  11093. if (!this.rules || Object.keys(this.rules).length === 0) {
  11094. if (callback) callback(null, source);
  11095. return Promise.resolve(source);
  11096. }
  11097. function complete(results) {
  11098. var errors = [];
  11099. var fields = {};
  11100. function add(e) {
  11101. if (Array.isArray(e)) {
  11102. var _errors;
  11103. errors = (_errors = errors).concat.apply(_errors, e);
  11104. } else errors.push(e);
  11105. }
  11106. for (var i = 0; i < results.length; i++) add(results[i]);
  11107. if (!errors.length) callback(null, source);
  11108. else {
  11109. fields = convertFieldsError(errors);
  11110. callback(errors, fields);
  11111. }
  11112. }
  11113. if (options.messages) {
  11114. var messages$1 = this.messages();
  11115. if (messages$1 === messages) messages$1 = newMessages();
  11116. deepMerge(messages$1, options.messages);
  11117. options.messages = messages$1;
  11118. } else options.messages = this.messages();
  11119. var series = {};
  11120. (options.keys || Object.keys(this.rules)).forEach(function(z) {
  11121. var arr = _this2.rules[z];
  11122. var value = source[z];
  11123. arr.forEach(function(r) {
  11124. var rule = r;
  11125. if (typeof rule.transform === "function") {
  11126. if (source === source_) source = _extends({}, source);
  11127. value = source[z] = rule.transform(value);
  11128. }
  11129. if (typeof rule === "function") rule = { validator: rule };
  11130. else rule = _extends({}, rule);
  11131. rule.validator = _this2.getValidationMethod(rule);
  11132. if (!rule.validator) return;
  11133. rule.field = z;
  11134. rule.fullField = rule.fullField || z;
  11135. rule.type = _this2.getType(rule);
  11136. series[z] = series[z] || [];
  11137. series[z].push({
  11138. rule,
  11139. value,
  11140. source,
  11141. field: z
  11142. });
  11143. });
  11144. });
  11145. var errorFields = {};
  11146. return asyncMap(series, options, function(data, doIt) {
  11147. var rule = data.rule;
  11148. var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  11149. deep = deep && (rule.required || !rule.required && data.value);
  11150. rule.field = data.field;
  11151. function addFullField(key, schema) {
  11152. return _extends({}, schema, {
  11153. fullField: rule.fullField + "." + key,
  11154. fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
  11155. });
  11156. }
  11157. function cb(e) {
  11158. if (e === void 0) e = [];
  11159. var errorList = Array.isArray(e) ? e : [e];
  11160. if (!options.suppressWarning && errorList.length) Schema.warning("async-validator:", errorList);
  11161. if (errorList.length && rule.message !== void 0) errorList = [].concat(rule.message);
  11162. var filledErrors = errorList.map(complementError(rule, source));
  11163. if (options.first && filledErrors.length) {
  11164. errorFields[rule.field] = 1;
  11165. return doIt(filledErrors);
  11166. }
  11167. if (!deep) doIt(filledErrors);
  11168. else {
  11169. if (rule.required && !data.value) {
  11170. if (rule.message !== void 0) filledErrors = [].concat(rule.message).map(complementError(rule, source));
  11171. else if (options.error) filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
  11172. return doIt(filledErrors);
  11173. }
  11174. var fieldsSchema = {};
  11175. if (rule.defaultField) Object.keys(data.value).map(function(key) {
  11176. fieldsSchema[key] = rule.defaultField;
  11177. });
  11178. fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
  11179. var paredFieldsSchema = {};
  11180. Object.keys(fieldsSchema).forEach(function(field) {
  11181. var fieldSchema = fieldsSchema[field];
  11182. paredFieldsSchema[field] = (Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema]).map(addFullField.bind(null, field));
  11183. });
  11184. var schema = new Schema(paredFieldsSchema);
  11185. schema.messages(options.messages);
  11186. if (data.rule.options) {
  11187. data.rule.options.messages = options.messages;
  11188. data.rule.options.error = options.error;
  11189. }
  11190. schema.validate(data.value, data.rule.options || options, function(errs) {
  11191. var finalErrors = [];
  11192. if (filledErrors && filledErrors.length) finalErrors.push.apply(finalErrors, filledErrors);
  11193. if (errs && errs.length) finalErrors.push.apply(finalErrors, errs);
  11194. doIt(finalErrors.length ? finalErrors : null);
  11195. });
  11196. }
  11197. }
  11198. var res;
  11199. if (rule.asyncValidator) res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  11200. else if (rule.validator) {
  11201. try {
  11202. res = rule.validator(rule, data.value, cb, data.source, options);
  11203. } catch (error) {
  11204. console.error == null || console.error(error);
  11205. if (!options.suppressValidatorError) setTimeout(function() {
  11206. throw error;
  11207. }, 0);
  11208. cb(error.message);
  11209. }
  11210. if (res === true) cb();
  11211. else if (res === false) cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
  11212. else if (res instanceof Array) cb(res);
  11213. else if (res instanceof Error) cb(res.message);
  11214. }
  11215. if (res && res.then) res.then(function() {
  11216. return cb();
  11217. }, function(e) {
  11218. return cb(e);
  11219. });
  11220. }, function(results) {
  11221. complete(results);
  11222. }, source);
  11223. };
  11224. _proto.getType = function getType(rule) {
  11225. if (rule.type === void 0 && rule.pattern instanceof RegExp) rule.type = "pattern";
  11226. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) throw new Error(format("Unknown rule type %s", rule.type));
  11227. return rule.type || "string";
  11228. };
  11229. _proto.getValidationMethod = function getValidationMethod(rule) {
  11230. if (typeof rule.validator === "function") return rule.validator;
  11231. var keys = Object.keys(rule);
  11232. var messageIndex = keys.indexOf("message");
  11233. if (messageIndex !== -1) keys.splice(messageIndex, 1);
  11234. if (keys.length === 1 && keys[0] === "required") return validators.required;
  11235. return validators[this.getType(rule)] || void 0;
  11236. };
  11237. return Schema;
  11238. }();
  11239. Schema.register = function register(type, validator) {
  11240. if (typeof validator !== "function") throw new Error("Cannot register a validator by type, validator is not a function");
  11241. validators[type] = validator;
  11242. };
  11243. Schema.warning = warning;
  11244. Schema.messages = messages;
  11245. Schema.validators = validators;
  11246. //#endregion
  11247. //#region node_modules/element-plus/es/components/form/src/form-item.vue_vue_type_script_setup_true_lang.mjs
  11248. var _hoisted_1$78 = ["role", "aria-labelledby"];
  11249. //#endregion
  11250. //#region node_modules/element-plus/es/components/form/src/form-item2.mjs
  11251. var form_item_default = /* @__PURE__ */ defineComponent({
  11252. name: "ElFormItem",
  11253. __name: "form-item",
  11254. props: formItemProps,
  11255. setup(__props, { expose: __expose }) {
  11256. const props = __props;
  11257. const slots = useSlots();
  11258. const formContext = inject(formContextKey, void 0);
  11259. const parentFormItemContext = inject(formItemContextKey, void 0);
  11260. const _size = useFormSize(void 0, { formItem: false });
  11261. const ns = useNamespace("form-item");
  11262. const labelId = useId().value;
  11263. const inputIds = ref([]);
  11264. const validateState = ref("");
  11265. const validateStateDebounced = refDebounced(validateState, 100);
  11266. const validateMessage = ref("");
  11267. const formItemRef = ref();
  11268. let initialValue = void 0;
  11269. let isResettingField = false;
  11270. const labelPosition = computed(() => props.labelPosition || formContext?.labelPosition);
  11271. const labelStyle = computed(() => {
  11272. if (labelPosition.value === "top") return {};
  11273. return { width: addUnit(props.labelWidth ?? formContext?.labelWidth) };
  11274. });
  11275. const contentStyle = computed(() => {
  11276. if (labelPosition.value === "top" || formContext?.inline) return {};
  11277. if (!props.label && !props.labelWidth && isNested) return {};
  11278. const labelWidth = addUnit(props.labelWidth ?? formContext?.labelWidth);
  11279. if (!props.label && !slots.label) return { marginLeft: labelWidth };
  11280. return {};
  11281. });
  11282. const formItemClasses = computed(() => [
  11283. ns.b(),
  11284. ns.m(_size.value),
  11285. ns.is("error", validateState.value === "error"),
  11286. ns.is("validating", validateState.value === "validating"),
  11287. ns.is("success", validateState.value === "success"),
  11288. ns.is("required", isRequired.value || props.required),
  11289. ns.is("no-asterisk", formContext?.hideRequiredAsterisk),
  11290. formContext?.requireAsteriskPosition === "right" ? "asterisk-right" : "asterisk-left",
  11291. {
  11292. [ns.m("feedback")]: formContext?.statusIcon,
  11293. [ns.m(`label-${labelPosition.value}`)]: labelPosition.value
  11294. }
  11295. ]);
  11296. const _inlineMessage = computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : formContext?.inlineMessage || false);
  11297. const validateClasses = computed(() => [ns.e("error"), { [ns.em("error", "inline")]: _inlineMessage.value }]);
  11298. const propString = computed(() => {
  11299. if (!props.prop) return "";
  11300. return isArray$1(props.prop) ? props.prop.join(".") : props.prop;
  11301. });
  11302. const hasLabel = computed(() => {
  11303. return !!(props.label || slots.label);
  11304. });
  11305. const labelFor = computed(() => {
  11306. return props.for ?? (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
  11307. });
  11308. const isGroup = computed(() => {
  11309. return !labelFor.value && hasLabel.value;
  11310. });
  11311. const isNested = !!parentFormItemContext;
  11312. const fieldValue = computed(() => {
  11313. const model = formContext?.model;
  11314. if (!model || !props.prop) return;
  11315. return getProp(model, props.prop).value;
  11316. });
  11317. const normalizedRules = computed(() => {
  11318. const { required } = props;
  11319. const rules = [];
  11320. if (props.rules) rules.push(...castArray$1(props.rules));
  11321. const formRules = formContext?.rules;
  11322. if (formRules && props.prop) {
  11323. const _rules = getProp(formRules, props.prop).value;
  11324. if (_rules) rules.push(...castArray$1(_rules));
  11325. }
  11326. if (required !== void 0) {
  11327. const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => "required" in rule);
  11328. if (requiredRules.length > 0) for (const [rule, i] of requiredRules) {
  11329. if (rule.required === required) continue;
  11330. rules[i] = {
  11331. ...rule,
  11332. required
  11333. };
  11334. }
  11335. else rules.push({ required });
  11336. }
  11337. return rules;
  11338. });
  11339. const validateEnabled = computed(() => normalizedRules.value.length > 0);
  11340. const getFilteredRule = (trigger) => {
  11341. return normalizedRules.value.filter((rule) => {
  11342. if (!rule.trigger || !trigger) return true;
  11343. if (isArray$1(rule.trigger)) return rule.trigger.includes(trigger);
  11344. else return rule.trigger === trigger;
  11345. }).map(({ trigger, ...rule }) => rule);
  11346. };
  11347. const isRequired = computed(() => normalizedRules.value.some((rule) => rule.required));
  11348. const shouldShowError = computed(() => validateStateDebounced.value === "error" && props.showMessage && (formContext?.showMessage ?? true));
  11349. const currentLabel = computed(() => `${props.label || ""}${formContext?.labelSuffix || ""}`);
  11350. const setValidationState = (state) => {
  11351. validateState.value = state;
  11352. };
  11353. const onValidationFailed = (error) => {
  11354. const { errors, fields } = error;
  11355. if (!errors || !fields) console.error(error);
  11356. setValidationState("error");
  11357. validateMessage.value = errors ? errors?.[0]?.message ?? `${props.prop} is required` : "";
  11358. formContext?.emit("validate", props.prop, false, validateMessage.value);
  11359. };
  11360. const onValidationSucceeded = () => {
  11361. setValidationState("success");
  11362. formContext?.emit("validate", props.prop, true, "");
  11363. };
  11364. const doValidate = async (rules) => {
  11365. const modelName = propString.value;
  11366. return new Schema({ [modelName]: rules }).validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
  11367. onValidationSucceeded();
  11368. return true;
  11369. }).catch((err) => {
  11370. onValidationFailed(err);
  11371. return Promise.reject(err);
  11372. });
  11373. };
  11374. const validate = async (trigger, callback) => {
  11375. if (isResettingField || !props.prop) return false;
  11376. const hasCallback = isFunction$1(callback);
  11377. if (!validateEnabled.value) {
  11378. callback?.(false);
  11379. return false;
  11380. }
  11381. const rules = getFilteredRule(trigger);
  11382. if (rules.length === 0) {
  11383. callback?.(true);
  11384. return true;
  11385. }
  11386. setValidationState("validating");
  11387. return doValidate(rules).then(() => {
  11388. callback?.(true);
  11389. return true;
  11390. }).catch((err) => {
  11391. const { fields } = err;
  11392. callback?.(false, fields);
  11393. return hasCallback ? false : Promise.reject(fields);
  11394. });
  11395. };
  11396. const clearValidate = () => {
  11397. setValidationState("");
  11398. validateMessage.value = "";
  11399. isResettingField = false;
  11400. };
  11401. const resetField = async () => {
  11402. const model = formContext?.model;
  11403. if (!model || !props.prop) return;
  11404. const computedValue = getProp(model, props.prop);
  11405. isResettingField = true;
  11406. computedValue.value = cloneDeep(initialValue);
  11407. await nextTick();
  11408. clearValidate();
  11409. isResettingField = false;
  11410. };
  11411. const addInputId = (id) => {
  11412. if (!inputIds.value.includes(id)) inputIds.value.push(id);
  11413. };
  11414. const removeInputId = (id) => {
  11415. inputIds.value = inputIds.value.filter((listId) => listId !== id);
  11416. };
  11417. const setInitialValue = (value) => {
  11418. initialValue = cloneDeep(value);
  11419. };
  11420. watch(() => props.error, (val) => {
  11421. validateMessage.value = val || "";
  11422. setValidationState(val ? "error" : "");
  11423. }, { immediate: true });
  11424. watch(() => props.validateStatus, (val) => setValidationState(val || ""));
  11425. const context = reactive({
  11426. ...toRefs(props),
  11427. $el: formItemRef,
  11428. size: _size,
  11429. validateMessage,
  11430. validateState,
  11431. labelId,
  11432. inputIds,
  11433. isGroup,
  11434. hasLabel,
  11435. fieldValue,
  11436. addInputId,
  11437. removeInputId,
  11438. resetField,
  11439. clearValidate,
  11440. validate,
  11441. propString,
  11442. setInitialValue
  11443. });
  11444. provide(formItemContextKey, context);
  11445. onMounted(() => {
  11446. if (props.prop) {
  11447. setInitialValue(fieldValue.value);
  11448. formContext?.addField(context);
  11449. }
  11450. });
  11451. onBeforeUnmount(() => {
  11452. formContext?.removeField(context);
  11453. });
  11454. __expose({
  11455. size: _size,
  11456. validateMessage,
  11457. validateState,
  11458. validate,
  11459. clearValidate,
  11460. resetField,
  11461. setInitialValue
  11462. });
  11463. return (_ctx, _cache) => {
  11464. return openBlock(), createElementBlock("div", {
  11465. ref_key: "formItemRef",
  11466. ref: formItemRef,
  11467. class: normalizeClass(formItemClasses.value),
  11468. role: isGroup.value ? "group" : void 0,
  11469. "aria-labelledby": isGroup.value ? unref(labelId) : void 0
  11470. }, [createVNode(unref(form_label_wrap_default), {
  11471. "is-auto-width": labelStyle.value.width === "auto",
  11472. "update-all": unref(formContext)?.labelWidth === "auto"
  11473. }, {
  11474. default: withCtx(() => [!!(__props.label || _ctx.$slots.label) ? (openBlock(), createBlock(resolveDynamicComponent(labelFor.value ? "label" : "div"), {
  11475. key: 0,
  11476. id: unref(labelId),
  11477. for: labelFor.value,
  11478. class: normalizeClass(unref(ns).e("label")),
  11479. style: normalizeStyle(labelStyle.value)
  11480. }, {
  11481. default: withCtx(() => [renderSlot(_ctx.$slots, "label", { label: currentLabel.value }, () => [createTextVNode(toDisplayString(currentLabel.value), 1)])]),
  11482. _: 3
  11483. }, 8, [
  11484. "id",
  11485. "for",
  11486. "class",
  11487. "style"
  11488. ])) : createCommentVNode("v-if", true)]),
  11489. _: 3
  11490. }, 8, ["is-auto-width", "update-all"]), createBaseVNode("div", {
  11491. class: normalizeClass(unref(ns).e("content")),
  11492. style: normalizeStyle(contentStyle.value)
  11493. }, [renderSlot(_ctx.$slots, "default"), createVNode(TransitionGroup, { name: `${unref(ns).namespace.value}-zoom-in-top` }, {
  11494. default: withCtx(() => [shouldShowError.value ? renderSlot(_ctx.$slots, "error", {
  11495. key: 0,
  11496. error: validateMessage.value
  11497. }, () => [createBaseVNode("div", { class: normalizeClass(validateClasses.value) }, toDisplayString(validateMessage.value), 3)]) : createCommentVNode("v-if", true)]),
  11498. _: 3
  11499. }, 8, ["name"])], 6)], 10, _hoisted_1$78);
  11500. };
  11501. }
  11502. });
  11503. //#endregion
  11504. //#region node_modules/element-plus/es/components/form/index.mjs
  11505. var ElForm = withInstall(form_default, { FormItem: form_item_default });
  11506. var ElFormItem = withNoopInstall(form_item_default);
  11507. //#endregion
  11508. //#region node_modules/element-plus/es/components/focus-trap/src/tokens.mjs
  11509. var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
  11510. var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
  11511. var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
  11512. var FOCUS_AFTER_TRAPPED_OPTS = {
  11513. cancelable: true,
  11514. bubbles: false
  11515. };
  11516. var FOCUSOUT_PREVENTED_OPTS = {
  11517. cancelable: true,
  11518. bubbles: false
  11519. };
  11520. var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
  11521. var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
  11522. var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
  11523. //#endregion
  11524. //#region node_modules/element-plus/es/components/focus-trap/src/utils.mjs
  11525. var focusReason = ref();
  11526. var lastUserFocusTimestamp = ref(0);
  11527. var lastAutomatedFocusTimestamp = ref(0);
  11528. var focusReasonUserCount = 0;
  11529. var obtainAllFocusableElements = (element) => {
  11530. const nodes = [];
  11531. const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
  11532. const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
  11533. if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
  11534. return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  11535. } });
  11536. while (walker.nextNode()) nodes.push(walker.currentNode);
  11537. return nodes;
  11538. };
  11539. var getVisibleElement = (elements, container) => {
  11540. for (const element of elements) if (!isHidden(element, container)) return element;
  11541. };
  11542. var isHidden = (element, container) => {
  11543. if (getComputedStyle(element).visibility === "hidden") return true;
  11544. while (element) {
  11545. if (container && element === container) return false;
  11546. if (getComputedStyle(element).display === "none") return true;
  11547. element = element.parentElement;
  11548. }
  11549. return false;
  11550. };
  11551. var getEdges = (container) => {
  11552. const focusable = obtainAllFocusableElements(container);
  11553. return [getVisibleElement(focusable, container), getVisibleElement(focusable.reverse(), container)];
  11554. };
  11555. var isSelectable = (element) => {
  11556. return element instanceof HTMLInputElement && "select" in element;
  11557. };
  11558. var tryFocus = (element, shouldSelect) => {
  11559. if (element) {
  11560. const prevFocusedElement = document.activeElement;
  11561. focusElement(element, { preventScroll: true });
  11562. lastAutomatedFocusTimestamp.value = window.performance.now();
  11563. if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) element.select();
  11564. }
  11565. };
  11566. function removeFromStack(list, item) {
  11567. const copy = [...list];
  11568. const idx = list.indexOf(item);
  11569. if (idx !== -1) copy.splice(idx, 1);
  11570. return copy;
  11571. }
  11572. var createFocusableStack = () => {
  11573. let stack = [];
  11574. const push = (layer) => {
  11575. const currentLayer = stack[0];
  11576. if (currentLayer && layer !== currentLayer) currentLayer.pause();
  11577. stack = removeFromStack(stack, layer);
  11578. stack.unshift(layer);
  11579. };
  11580. const remove = (layer) => {
  11581. stack = removeFromStack(stack, layer);
  11582. stack[0]?.resume?.();
  11583. };
  11584. return {
  11585. push,
  11586. remove
  11587. };
  11588. };
  11589. var focusFirstDescendant = (elements, shouldSelect = false) => {
  11590. const prevFocusedElement = document.activeElement;
  11591. for (const element of elements) {
  11592. tryFocus(element, shouldSelect);
  11593. if (document.activeElement !== prevFocusedElement) return;
  11594. }
  11595. };
  11596. var focusableStack = createFocusableStack();
  11597. var isFocusCausedByUserEvent = () => {
  11598. return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
  11599. };
  11600. var notifyFocusReasonPointer = () => {
  11601. focusReason.value = "pointer";
  11602. lastUserFocusTimestamp.value = window.performance.now();
  11603. };
  11604. var notifyFocusReasonKeydown = () => {
  11605. focusReason.value = "keyboard";
  11606. lastUserFocusTimestamp.value = window.performance.now();
  11607. };
  11608. var useFocusReason = () => {
  11609. onMounted(() => {
  11610. if (focusReasonUserCount === 0) {
  11611. document.addEventListener("mousedown", notifyFocusReasonPointer);
  11612. document.addEventListener("touchstart", notifyFocusReasonPointer);
  11613. document.addEventListener("keydown", notifyFocusReasonKeydown);
  11614. }
  11615. focusReasonUserCount++;
  11616. });
  11617. onBeforeUnmount(() => {
  11618. focusReasonUserCount--;
  11619. if (focusReasonUserCount <= 0) {
  11620. document.removeEventListener("mousedown", notifyFocusReasonPointer);
  11621. document.removeEventListener("touchstart", notifyFocusReasonPointer);
  11622. document.removeEventListener("keydown", notifyFocusReasonKeydown);
  11623. }
  11624. });
  11625. return {
  11626. focusReason,
  11627. lastUserFocusTimestamp,
  11628. lastAutomatedFocusTimestamp
  11629. };
  11630. };
  11631. var createFocusOutPreventedEvent = (detail) => {
  11632. return new CustomEvent(FOCUSOUT_PREVENTED, {
  11633. ...FOCUSOUT_PREVENTED_OPTS,
  11634. detail
  11635. });
  11636. };
  11637. //#endregion
  11638. //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs
  11639. var focus_trap_vue_vue_type_script_lang_default = defineComponent({
  11640. name: "ElFocusTrap",
  11641. inheritAttrs: false,
  11642. props: {
  11643. loop: Boolean,
  11644. trapped: Boolean,
  11645. focusTrapEl: Object,
  11646. focusStartEl: {
  11647. type: [Object, String],
  11648. default: "first"
  11649. }
  11650. },
  11651. emits: [
  11652. ON_TRAP_FOCUS_EVT,
  11653. ON_RELEASE_FOCUS_EVT,
  11654. "focusin",
  11655. "focusout",
  11656. "focusout-prevented",
  11657. "release-requested"
  11658. ],
  11659. setup(props, { emit }) {
  11660. const forwardRef = ref();
  11661. let lastFocusBeforeTrapped;
  11662. let lastFocusAfterTrapped;
  11663. const { focusReason } = useFocusReason();
  11664. useEscapeKeydown((event) => {
  11665. if (props.trapped && !focusLayer.paused) emit("release-requested", event);
  11666. });
  11667. const focusLayer = {
  11668. paused: false,
  11669. pause() {
  11670. this.paused = true;
  11671. },
  11672. resume() {
  11673. this.paused = false;
  11674. }
  11675. };
  11676. const onKeydown = (e) => {
  11677. if (!props.loop && !props.trapped) return;
  11678. if (focusLayer.paused) return;
  11679. const { altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
  11680. const { loop } = props;
  11681. const isTabbing = getEventCode(e) === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
  11682. const currentFocusingEl = document.activeElement;
  11683. if (isTabbing && currentFocusingEl) {
  11684. const container = currentTarget;
  11685. const [first, last] = getEdges(container);
  11686. if (!(first && last)) {
  11687. if (currentFocusingEl === container) {
  11688. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  11689. emit("focusout-prevented", focusoutPreventedEvent);
  11690. if (!focusoutPreventedEvent.defaultPrevented) e.preventDefault();
  11691. }
  11692. } else if (!shiftKey && currentFocusingEl === last) {
  11693. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  11694. emit("focusout-prevented", focusoutPreventedEvent);
  11695. if (!focusoutPreventedEvent.defaultPrevented) {
  11696. e.preventDefault();
  11697. if (loop) tryFocus(first, true);
  11698. }
  11699. } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
  11700. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  11701. emit("focusout-prevented", focusoutPreventedEvent);
  11702. if (!focusoutPreventedEvent.defaultPrevented) {
  11703. e.preventDefault();
  11704. if (loop) tryFocus(last, true);
  11705. }
  11706. }
  11707. }
  11708. };
  11709. provide(FOCUS_TRAP_INJECTION_KEY, {
  11710. focusTrapRef: forwardRef,
  11711. onKeydown
  11712. });
  11713. watch(() => props.focusTrapEl, (focusTrapEl) => {
  11714. if (focusTrapEl) forwardRef.value = focusTrapEl;
  11715. }, { immediate: true });
  11716. watch([forwardRef], ([forwardRef], [oldForwardRef]) => {
  11717. if (forwardRef) {
  11718. forwardRef.addEventListener("keydown", onKeydown);
  11719. forwardRef.addEventListener("focusin", onFocusIn);
  11720. forwardRef.addEventListener("focusout", onFocusOut);
  11721. }
  11722. if (oldForwardRef) {
  11723. oldForwardRef.removeEventListener("keydown", onKeydown);
  11724. oldForwardRef.removeEventListener("focusin", onFocusIn);
  11725. oldForwardRef.removeEventListener("focusout", onFocusOut);
  11726. }
  11727. });
  11728. const trapOnFocus = (e) => {
  11729. emit(ON_TRAP_FOCUS_EVT, e);
  11730. };
  11731. const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
  11732. const onFocusIn = (e) => {
  11733. const trapContainer = unref(forwardRef);
  11734. if (!trapContainer) return;
  11735. const target = e.target;
  11736. const relatedTarget = e.relatedTarget;
  11737. const isFocusedInTrap = target && trapContainer.contains(target);
  11738. if (!props.trapped) {
  11739. if (!(relatedTarget && trapContainer.contains(relatedTarget))) lastFocusBeforeTrapped = relatedTarget;
  11740. }
  11741. if (isFocusedInTrap) emit("focusin", e);
  11742. if (focusLayer.paused) return;
  11743. if (props.trapped) if (isFocusedInTrap) lastFocusAfterTrapped = target;
  11744. else tryFocus(lastFocusAfterTrapped, true);
  11745. };
  11746. const onFocusOut = (e) => {
  11747. const trapContainer = unref(forwardRef);
  11748. if (focusLayer.paused || !trapContainer) return;
  11749. if (props.trapped) {
  11750. const relatedTarget = e.relatedTarget;
  11751. if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) setTimeout(() => {
  11752. if (!focusLayer.paused && props.trapped) {
  11753. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  11754. emit("focusout-prevented", focusoutPreventedEvent);
  11755. if (!focusoutPreventedEvent.defaultPrevented) tryFocus(lastFocusAfterTrapped, true);
  11756. }
  11757. }, 0);
  11758. } else {
  11759. const target = e.target;
  11760. if (!(target && trapContainer.contains(target))) emit("focusout", e);
  11761. }
  11762. };
  11763. async function startTrap() {
  11764. await nextTick();
  11765. const trapContainer = unref(forwardRef);
  11766. if (trapContainer) {
  11767. focusableStack.push(focusLayer);
  11768. const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
  11769. lastFocusBeforeTrapped = prevFocusedElement;
  11770. if (!trapContainer.contains(prevFocusedElement)) {
  11771. const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
  11772. trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  11773. trapContainer.dispatchEvent(focusEvent);
  11774. if (!focusEvent.defaultPrevented) nextTick(() => {
  11775. let focusStartEl = props.focusStartEl;
  11776. if (!isString(focusStartEl)) {
  11777. tryFocus(focusStartEl);
  11778. if (document.activeElement !== focusStartEl) focusStartEl = "first";
  11779. }
  11780. if (focusStartEl === "first") focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
  11781. if (document.activeElement === prevFocusedElement || focusStartEl === "container") tryFocus(trapContainer);
  11782. });
  11783. }
  11784. }
  11785. }
  11786. function stopTrap() {
  11787. const trapContainer = unref(forwardRef);
  11788. if (trapContainer) {
  11789. trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  11790. const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
  11791. ...FOCUS_AFTER_TRAPPED_OPTS,
  11792. detail: { focusReason: focusReason.value }
  11793. });
  11794. trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
  11795. trapContainer.dispatchEvent(releasedEvent);
  11796. if (!releasedEvent.defaultPrevented && (focusReason.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) tryFocus(lastFocusBeforeTrapped ?? document.body);
  11797. trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
  11798. focusableStack.remove(focusLayer);
  11799. lastFocusBeforeTrapped = null;
  11800. lastFocusAfterTrapped = null;
  11801. }
  11802. }
  11803. onMounted(() => {
  11804. if (props.trapped) startTrap();
  11805. watch(() => props.trapped, (trapped) => {
  11806. if (trapped) startTrap();
  11807. else stopTrap();
  11808. });
  11809. });
  11810. onBeforeUnmount(() => {
  11811. if (props.trapped) stopTrap();
  11812. if (forwardRef.value) {
  11813. forwardRef.value.removeEventListener("keydown", onKeydown);
  11814. forwardRef.value.removeEventListener("focusin", onFocusIn);
  11815. forwardRef.value.removeEventListener("focusout", onFocusOut);
  11816. forwardRef.value = void 0;
  11817. }
  11818. lastFocusBeforeTrapped = null;
  11819. lastFocusAfterTrapped = null;
  11820. });
  11821. return { onKeydown };
  11822. }
  11823. });
  11824. //#endregion
  11825. //#region node_modules/element-plus/es/_virtual/_plugin-vue_export-helper.mjs
  11826. var _plugin_vue_export_helper_default = (sfc, props) => {
  11827. const target = sfc.__vccOpts || sfc;
  11828. for (const [key, val] of props) target[key] = val;
  11829. return target;
  11830. };
  11831. //#endregion
  11832. //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs
  11833. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  11834. return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
  11835. }
  11836. //#endregion
  11837. //#region node_modules/element-plus/es/components/focus-trap/index.mjs
  11838. var focus_trap_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(focus_trap_vue_vue_type_script_lang_default, [["render", _sfc_render$21]]);
  11839. //#endregion
  11840. //#region node_modules/element-plus/es/components/popper/src/utils.mjs
  11841. var buildPopperOptions = (props, modifiers = []) => {
  11842. const { placement, strategy, popperOptions } = props;
  11843. const options = {
  11844. placement,
  11845. strategy,
  11846. ...popperOptions,
  11847. modifiers: [...genModifiers(props), ...modifiers]
  11848. };
  11849. deriveExtraModifiers(options, popperOptions?.modifiers);
  11850. return options;
  11851. };
  11852. var unwrapMeasurableEl = ($el) => {
  11853. if (!isClient) return;
  11854. return unrefElement($el);
  11855. };
  11856. function genModifiers(options) {
  11857. const { offset, gpuAcceleration, fallbackPlacements } = options;
  11858. return [
  11859. {
  11860. name: "offset",
  11861. options: { offset: [0, offset ?? 12] }
  11862. },
  11863. {
  11864. name: "preventOverflow",
  11865. options: { padding: {
  11866. top: 0,
  11867. bottom: 0,
  11868. left: 0,
  11869. right: 0
  11870. } }
  11871. },
  11872. {
  11873. name: "flip",
  11874. options: {
  11875. padding: 5,
  11876. fallbackPlacements
  11877. }
  11878. },
  11879. {
  11880. name: "computeStyles",
  11881. options: { gpuAcceleration }
  11882. }
  11883. ];
  11884. }
  11885. function deriveExtraModifiers(options, modifiers) {
  11886. if (modifiers) options.modifiers = [...options.modifiers, ...modifiers ?? []];
  11887. }
  11888. //#endregion
  11889. //#region node_modules/element-plus/es/components/popper/src/composables/use-content.mjs
  11890. var DEFAULT_ARROW_OFFSET = 0;
  11891. var usePopperContent = (props) => {
  11892. const { popperInstanceRef, contentRef, triggerRef, role } = inject(POPPER_INJECTION_KEY, void 0);
  11893. const arrowRef = ref();
  11894. const arrowOffset = computed(() => props.arrowOffset);
  11895. const eventListenerModifier = computed(() => {
  11896. return {
  11897. name: "eventListeners",
  11898. enabled: !!props.visible
  11899. };
  11900. });
  11901. const arrowModifier = computed(() => {
  11902. const arrowEl = unref(arrowRef);
  11903. const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET;
  11904. return {
  11905. name: "arrow",
  11906. enabled: !isUndefined$1(arrowEl),
  11907. options: {
  11908. element: arrowEl,
  11909. padding: offset
  11910. }
  11911. };
  11912. });
  11913. const options = computed(() => {
  11914. return {
  11915. onFirstUpdate: () => {
  11916. update();
  11917. },
  11918. ...buildPopperOptions(props, [unref(arrowModifier), unref(eventListenerModifier)])
  11919. };
  11920. });
  11921. const computedReference = computed(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef));
  11922. const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options);
  11923. watch(instanceRef, (instance) => popperInstanceRef.value = instance, { flush: "sync" });
  11924. onMounted(() => {
  11925. watch(() => unref(computedReference)?.getBoundingClientRect?.(), () => {
  11926. update();
  11927. });
  11928. });
  11929. onBeforeUnmount(() => {
  11930. popperInstanceRef.value = void 0;
  11931. });
  11932. return {
  11933. attributes,
  11934. arrowRef,
  11935. contentRef,
  11936. instanceRef,
  11937. state,
  11938. styles,
  11939. role,
  11940. forceUpdate,
  11941. update
  11942. };
  11943. };
  11944. //#endregion
  11945. //#region node_modules/element-plus/es/components/popper/src/composables/use-content-dom.mjs
  11946. var usePopperContentDOM = (props, { attributes, styles, role }) => {
  11947. const { nextZIndex } = useZIndex();
  11948. const ns = useNamespace("popper");
  11949. const contentAttrs = computed(() => unref(attributes).popper);
  11950. const contentZIndex = ref(isNumber(props.zIndex) ? props.zIndex : nextZIndex());
  11951. const contentClass = computed(() => [
  11952. ns.b(),
  11953. ns.is("pure", props.pure),
  11954. ns.is(props.effect),
  11955. props.popperClass
  11956. ]);
  11957. const contentStyle = computed(() => {
  11958. return [
  11959. { zIndex: unref(contentZIndex) },
  11960. unref(styles).popper,
  11961. props.popperStyle || {}
  11962. ];
  11963. });
  11964. const ariaModal = computed(() => role.value === "dialog" ? "false" : void 0);
  11965. const arrowStyle = computed(() => unref(styles).arrow || {});
  11966. const updateZIndex = () => {
  11967. contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex();
  11968. };
  11969. return {
  11970. ariaModal,
  11971. arrowStyle,
  11972. contentAttrs,
  11973. contentClass,
  11974. contentStyle,
  11975. contentZIndex,
  11976. updateZIndex
  11977. };
  11978. };
  11979. //#endregion
  11980. //#region node_modules/element-plus/es/components/popper/src/composables/use-focus-trap.mjs
  11981. var usePopperContentFocusTrap = (props, emit) => {
  11982. const trapped = ref(false);
  11983. const focusStartRef = ref();
  11984. const onFocusAfterTrapped = () => {
  11985. emit("focus");
  11986. };
  11987. const onFocusAfterReleased = (event) => {
  11988. if (event.detail?.focusReason !== "pointer") {
  11989. focusStartRef.value = "first";
  11990. emit("blur");
  11991. }
  11992. };
  11993. const onFocusInTrap = (event) => {
  11994. if (props.visible && !trapped.value) {
  11995. if (event.target) focusStartRef.value = event.target;
  11996. trapped.value = true;
  11997. }
  11998. };
  11999. const onFocusoutPrevented = (event) => {
  12000. if (!props.trapping) {
  12001. if (event.detail.focusReason === "pointer") event.preventDefault();
  12002. trapped.value = false;
  12003. }
  12004. };
  12005. const onReleaseRequested = () => {
  12006. trapped.value = false;
  12007. emit("close");
  12008. };
  12009. onBeforeUnmount(() => {
  12010. focusStartRef.value = void 0;
  12011. });
  12012. return {
  12013. focusStartRef,
  12014. trapped,
  12015. onFocusAfterReleased,
  12016. onFocusAfterTrapped,
  12017. onFocusInTrap,
  12018. onFocusoutPrevented,
  12019. onReleaseRequested
  12020. };
  12021. };
  12022. //#endregion
  12023. //#region node_modules/element-plus/es/components/popper/src/content2.mjs
  12024. var content_default = /* @__PURE__ */ defineComponent({
  12025. name: "ElPopperContent",
  12026. __name: "content",
  12027. props: popperContentProps,
  12028. emits: popperContentEmits,
  12029. setup(__props, { expose: __expose, emit: __emit }) {
  12030. const emit = __emit;
  12031. const props = __props;
  12032. const { focusStartRef, trapped, onFocusAfterReleased, onFocusAfterTrapped, onFocusInTrap, onFocusoutPrevented, onReleaseRequested } = usePopperContentFocusTrap(props, emit);
  12033. const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
  12034. const { ariaModal, arrowStyle, contentAttrs, contentClass, contentStyle, updateZIndex } = usePopperContentDOM(props, {
  12035. styles,
  12036. attributes,
  12037. role
  12038. });
  12039. const formItemContext = inject(formItemContextKey, void 0);
  12040. provide(POPPER_CONTENT_INJECTION_KEY, {
  12041. arrowStyle,
  12042. arrowRef
  12043. });
  12044. if (formItemContext) provide(formItemContextKey, {
  12045. ...formItemContext,
  12046. addInputId: NOOP,
  12047. removeInputId: NOOP
  12048. });
  12049. let triggerTargetAriaStopWatch = void 0;
  12050. const updatePopper = (shouldUpdateZIndex = true) => {
  12051. update();
  12052. shouldUpdateZIndex && updateZIndex();
  12053. };
  12054. const togglePopperAlive = () => {
  12055. updatePopper(false);
  12056. if (props.visible && props.focusOnShow) trapped.value = true;
  12057. else if (props.visible === false) trapped.value = false;
  12058. };
  12059. onMounted(() => {
  12060. watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
  12061. triggerTargetAriaStopWatch?.();
  12062. triggerTargetAriaStopWatch = void 0;
  12063. const el = unref(triggerTargetEl || contentRef.value);
  12064. const prevEl = unref(prevTriggerTargetEl || contentRef.value);
  12065. if (isElement$1(el)) triggerTargetAriaStopWatch = watch([
  12066. role,
  12067. () => props.ariaLabel,
  12068. ariaModal,
  12069. () => props.id
  12070. ], (watches) => {
  12071. [
  12072. "role",
  12073. "aria-label",
  12074. "aria-modal",
  12075. "id"
  12076. ].forEach((key, idx) => {
  12077. isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  12078. });
  12079. }, { immediate: true });
  12080. if (prevEl !== el && isElement$1(prevEl)) [
  12081. "role",
  12082. "aria-label",
  12083. "aria-modal",
  12084. "id"
  12085. ].forEach((key) => {
  12086. prevEl.removeAttribute(key);
  12087. });
  12088. }, { immediate: true });
  12089. watch(() => props.visible, togglePopperAlive, { immediate: true });
  12090. });
  12091. onBeforeUnmount(() => {
  12092. triggerTargetAriaStopWatch?.();
  12093. triggerTargetAriaStopWatch = void 0;
  12094. contentRef.value = void 0;
  12095. });
  12096. __expose({
  12097. popperContentRef: contentRef,
  12098. popperInstanceRef: instanceRef,
  12099. updatePopper,
  12100. contentStyle
  12101. });
  12102. return (_ctx, _cache) => {
  12103. return openBlock(), createElementBlock("div", mergeProps({
  12104. ref_key: "contentRef",
  12105. ref: contentRef
  12106. }, unref(contentAttrs), {
  12107. style: unref(contentStyle),
  12108. class: unref(contentClass),
  12109. tabindex: "-1",
  12110. onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
  12111. onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
  12112. }), [createVNode(unref(focus_trap_default$1), {
  12113. loop: __props.loop,
  12114. trapped: unref(trapped),
  12115. "trap-on-focus-in": true,
  12116. "focus-trap-el": unref(contentRef),
  12117. "focus-start-el": unref(focusStartRef),
  12118. onFocusAfterTrapped: unref(onFocusAfterTrapped),
  12119. onFocusAfterReleased: unref(onFocusAfterReleased),
  12120. onFocusin: unref(onFocusInTrap),
  12121. onFocusoutPrevented: unref(onFocusoutPrevented),
  12122. onReleaseRequested: unref(onReleaseRequested)
  12123. }, {
  12124. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  12125. _: 3
  12126. }, 8, [
  12127. "loop",
  12128. "trapped",
  12129. "focus-trap-el",
  12130. "focus-start-el",
  12131. "onFocusAfterTrapped",
  12132. "onFocusAfterReleased",
  12133. "onFocusin",
  12134. "onFocusoutPrevented",
  12135. "onReleaseRequested"
  12136. ])], 16);
  12137. };
  12138. }
  12139. });
  12140. //#endregion
  12141. //#region node_modules/element-plus/es/components/popper/index.mjs
  12142. var ElPopper = withInstall(/* @__PURE__ */ defineComponent({
  12143. name: "ElPopper",
  12144. inheritAttrs: false,
  12145. __name: "popper",
  12146. props: popperProps,
  12147. setup(__props, { expose: __expose }) {
  12148. const props = __props;
  12149. const popperProvides = {
  12150. triggerRef: ref(),
  12151. popperInstanceRef: ref(),
  12152. contentRef: ref(),
  12153. referenceRef: ref(),
  12154. role: computed(() => props.role)
  12155. };
  12156. __expose(popperProvides);
  12157. provide(POPPER_INJECTION_KEY, popperProvides);
  12158. return (_ctx, _cache) => {
  12159. return renderSlot(_ctx.$slots, "default");
  12160. };
  12161. }
  12162. }));
  12163. //#endregion
  12164. //#region node_modules/element-plus/es/components/tooltip/src/content.mjs
  12165. var useTooltipContentPropsDefaults = {
  12166. ...useDelayedTogglePropsDefaults,
  12167. ...popperContentPropsDefaults,
  12168. content: "",
  12169. visible: null,
  12170. teleported: true
  12171. };
  12172. /**
  12173. * @deprecated Removed after 3.0.0, Use `ElTooltipContentProps` instead.
  12174. */
  12175. var useTooltipContentProps = buildProps({
  12176. ...useDelayedToggleProps,
  12177. ...popperContentProps,
  12178. appendTo: { type: teleportProps.to.type },
  12179. content: {
  12180. type: String,
  12181. default: ""
  12182. },
  12183. rawContent: Boolean,
  12184. persistent: Boolean,
  12185. visible: {
  12186. type: definePropType(Boolean),
  12187. default: null
  12188. },
  12189. transition: String,
  12190. teleported: {
  12191. type: Boolean,
  12192. default: true
  12193. },
  12194. disabled: Boolean,
  12195. ...useAriaProps(["ariaLabel"])
  12196. });
  12197. //#endregion
  12198. //#region node_modules/element-plus/es/components/tooltip/src/trigger.mjs
  12199. var useTooltipTriggerPropsDefaults = {
  12200. trigger: "hover",
  12201. triggerKeys: () => [
  12202. EVENT_CODE.enter,
  12203. EVENT_CODE.numpadEnter,
  12204. EVENT_CODE.space
  12205. ]
  12206. };
  12207. /**
  12208. * @deprecated Removed after 3.0.0, Use `UseTooltipTriggerProps` instead.
  12209. */
  12210. var useTooltipTriggerProps = buildProps({
  12211. ...popperTriggerProps,
  12212. disabled: Boolean,
  12213. trigger: {
  12214. type: definePropType([String, Array]),
  12215. default: "hover"
  12216. },
  12217. triggerKeys: {
  12218. type: definePropType(Array),
  12219. default: () => [
  12220. EVENT_CODE.enter,
  12221. EVENT_CODE.numpadEnter,
  12222. EVENT_CODE.space
  12223. ]
  12224. },
  12225. focusOnTarget: Boolean
  12226. });
  12227. //#endregion
  12228. //#region node_modules/element-plus/es/components/tooltip/src/tooltip.mjs
  12229. var { useModelToggleProps: useTooltipModelToggleProps, useModelToggleEmits: useTooltipModelToggleEmits, useModelToggle: useTooltipModelToggle } = createModelToggleComposable("visible");
  12230. /**
  12231. * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.
  12232. */
  12233. var useTooltipProps = buildProps({
  12234. ...popperProps,
  12235. ...useTooltipModelToggleProps,
  12236. ...useTooltipContentProps,
  12237. ...useTooltipTriggerProps,
  12238. ...popperArrowProps,
  12239. showArrow: {
  12240. type: Boolean,
  12241. default: true
  12242. }
  12243. });
  12244. var tooltipEmits = [
  12245. ...useTooltipModelToggleEmits,
  12246. "before-show",
  12247. "before-hide",
  12248. "show",
  12249. "hide",
  12250. "open",
  12251. "close"
  12252. ];
  12253. //#endregion
  12254. //#region node_modules/element-plus/es/components/tooltip/src/constants.mjs
  12255. var TOOLTIP_INJECTION_KEY = Symbol("elTooltip");
  12256. //#endregion
  12257. //#region node_modules/element-plus/es/components/tooltip/src/utils.mjs
  12258. var isTriggerType = (trigger, type) => {
  12259. if (isArray$1(trigger)) return trigger.includes(type);
  12260. return trigger === type;
  12261. };
  12262. var whenTrigger = (trigger, type, handler) => {
  12263. return (e) => {
  12264. isTriggerType(unref(trigger), type) && handler(e);
  12265. };
  12266. };
  12267. //#endregion
  12268. //#region node_modules/element-plus/es/components/tooltip/src/trigger2.mjs
  12269. var trigger_default$1 = /* @__PURE__ */ defineComponent({
  12270. name: "ElTooltipTrigger",
  12271. __name: "trigger",
  12272. props: useTooltipTriggerProps,
  12273. setup(__props, { expose: __expose }) {
  12274. const props = __props;
  12275. const ns = useNamespace("tooltip");
  12276. const { controlled, id, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
  12277. const triggerRef = ref(null);
  12278. const stopWhenControlledOrDisabled = () => {
  12279. if (unref(controlled) || props.disabled) return true;
  12280. };
  12281. const trigger = toRef(props, "trigger");
  12282. const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", (e) => {
  12283. onOpen(e);
  12284. if (props.focusOnTarget && e.target) nextTick(() => {
  12285. focusElement(e.target, { preventScroll: true });
  12286. });
  12287. }));
  12288. const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
  12289. const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
  12290. if (e.button === 0) onToggle(e);
  12291. }));
  12292. const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
  12293. const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
  12294. const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
  12295. e.preventDefault();
  12296. onToggle(e);
  12297. }));
  12298. const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
  12299. const code = getEventCode(e);
  12300. if (props.triggerKeys.includes(code)) {
  12301. e.preventDefault();
  12302. onToggle(e);
  12303. }
  12304. });
  12305. __expose({ triggerRef });
  12306. return (_ctx, _cache) => {
  12307. return openBlock(), createBlock(unref(trigger_default), {
  12308. id: unref(id),
  12309. "virtual-ref": __props.virtualRef,
  12310. open: unref(open),
  12311. "virtual-triggering": __props.virtualTriggering,
  12312. class: normalizeClass(unref(ns).e("trigger")),
  12313. onBlur: unref(onBlur),
  12314. onClick: unref(onClick),
  12315. onContextmenu: unref(onContextMenu),
  12316. onFocus: unref(onFocus),
  12317. onMouseenter: unref(onMouseenter),
  12318. onMouseleave: unref(onMouseleave),
  12319. onKeydown: unref(onKeydown)
  12320. }, {
  12321. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  12322. _: 3
  12323. }, 8, [
  12324. "id",
  12325. "virtual-ref",
  12326. "open",
  12327. "virtual-triggering",
  12328. "class",
  12329. "onBlur",
  12330. "onClick",
  12331. "onContextmenu",
  12332. "onFocus",
  12333. "onMouseenter",
  12334. "onMouseleave",
  12335. "onKeydown"
  12336. ]);
  12337. };
  12338. }
  12339. });
  12340. //#endregion
  12341. //#region node_modules/element-plus/es/components/tooltip/src/content2.mjs
  12342. var content_default$2 = /* @__PURE__ */ defineComponent({
  12343. name: "ElTooltipContent",
  12344. inheritAttrs: false,
  12345. __name: "content",
  12346. props: useTooltipContentProps,
  12347. setup(__props, { expose: __expose }) {
  12348. const props = __props;
  12349. const { selector } = usePopperContainerId();
  12350. const ns = useNamespace("tooltip");
  12351. const contentRef = ref();
  12352. const popperContentRef = computedEager(() => contentRef.value?.popperContentRef);
  12353. let stopHandle;
  12354. const { controlled, id, open, trigger, onClose, onOpen, onShow, onHide, onBeforeShow, onBeforeHide } = inject(TOOLTIP_INJECTION_KEY, void 0);
  12355. const transitionClass = computed(() => {
  12356. return props.transition || `${ns.namespace.value}-fade-in-linear`;
  12357. });
  12358. const persistentRef = computed(() => {
  12359. return props.persistent;
  12360. });
  12361. onBeforeUnmount(() => {
  12362. stopHandle?.();
  12363. });
  12364. const shouldRender = computed(() => {
  12365. return unref(persistentRef) ? true : unref(open);
  12366. });
  12367. const shouldShow = computed(() => {
  12368. return props.disabled ? false : unref(open);
  12369. });
  12370. const appendTo = computed(() => {
  12371. return props.appendTo || selector.value;
  12372. });
  12373. const contentStyle = computed(() => props.style ?? {});
  12374. const ariaHidden = ref(true);
  12375. const onTransitionLeave = () => {
  12376. onHide();
  12377. isFocusInsideContent() && focusElement(document.body, { preventScroll: true });
  12378. ariaHidden.value = true;
  12379. };
  12380. const stopWhenControlled = () => {
  12381. if (unref(controlled)) return true;
  12382. };
  12383. const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
  12384. if (props.enterable && isTriggerType(unref(trigger), "hover")) onOpen();
  12385. });
  12386. const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
  12387. if (isTriggerType(unref(trigger), "hover")) onClose();
  12388. });
  12389. const onBeforeEnter = () => {
  12390. contentRef.value?.updatePopper?.();
  12391. onBeforeShow?.();
  12392. };
  12393. const onBeforeLeave = () => {
  12394. onBeforeHide?.();
  12395. };
  12396. const onAfterShow = () => {
  12397. onShow();
  12398. };
  12399. const onBlur = () => {
  12400. if (!props.virtualTriggering) onClose();
  12401. };
  12402. const isFocusInsideContent = (event) => {
  12403. const popperContent = contentRef.value?.popperContentRef;
  12404. const activeElement = event?.relatedTarget || document.activeElement;
  12405. return popperContent?.contains(activeElement);
  12406. };
  12407. watch(() => unref(open), (val) => {
  12408. if (!val) stopHandle?.();
  12409. else {
  12410. ariaHidden.value = false;
  12411. stopHandle = onClickOutside(popperContentRef, () => {
  12412. if (unref(controlled)) return;
  12413. if (castArray(unref(trigger)).every((item) => {
  12414. return item !== "hover" && item !== "focus";
  12415. })) onClose();
  12416. }, { detectIframe: true });
  12417. }
  12418. }, { flush: "post" });
  12419. watch(() => props.content, () => {
  12420. contentRef.value?.updatePopper?.();
  12421. });
  12422. __expose({
  12423. contentRef,
  12424. isFocusInsideContent
  12425. });
  12426. return (_ctx, _cache) => {
  12427. return openBlock(), createBlock(unref(ElTeleport), {
  12428. disabled: !__props.teleported,
  12429. to: appendTo.value
  12430. }, {
  12431. default: withCtx(() => [shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
  12432. key: 0,
  12433. name: transitionClass.value,
  12434. appear: !persistentRef.value,
  12435. onAfterLeave: onTransitionLeave,
  12436. onBeforeEnter,
  12437. onAfterEnter: onAfterShow,
  12438. onBeforeLeave,
  12439. persisted: ""
  12440. }, {
  12441. default: withCtx(() => [withDirectives(createVNode(unref(content_default), mergeProps({
  12442. id: unref(id),
  12443. ref_key: "contentRef",
  12444. ref: contentRef
  12445. }, _ctx.$attrs, {
  12446. "aria-label": __props.ariaLabel,
  12447. "aria-hidden": ariaHidden.value,
  12448. "boundaries-padding": __props.boundariesPadding,
  12449. "fallback-placements": __props.fallbackPlacements,
  12450. "gpu-acceleration": __props.gpuAcceleration,
  12451. offset: __props.offset,
  12452. placement: __props.placement,
  12453. "popper-options": __props.popperOptions,
  12454. "arrow-offset": __props.arrowOffset,
  12455. strategy: __props.strategy,
  12456. effect: __props.effect,
  12457. enterable: __props.enterable,
  12458. pure: __props.pure,
  12459. "popper-class": __props.popperClass,
  12460. "popper-style": [__props.popperStyle, contentStyle.value],
  12461. "reference-el": __props.referenceEl,
  12462. "trigger-target-el": __props.triggerTargetEl,
  12463. visible: shouldShow.value,
  12464. "z-index": __props.zIndex,
  12465. loop: __props.loop,
  12466. onMouseenter: unref(onContentEnter),
  12467. onMouseleave: unref(onContentLeave),
  12468. onBlur,
  12469. onClose: unref(onClose)
  12470. }), {
  12471. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  12472. _: 3
  12473. }, 16, [
  12474. "id",
  12475. "aria-label",
  12476. "aria-hidden",
  12477. "boundaries-padding",
  12478. "fallback-placements",
  12479. "gpu-acceleration",
  12480. "offset",
  12481. "placement",
  12482. "popper-options",
  12483. "arrow-offset",
  12484. "strategy",
  12485. "effect",
  12486. "enterable",
  12487. "pure",
  12488. "popper-class",
  12489. "popper-style",
  12490. "reference-el",
  12491. "trigger-target-el",
  12492. "visible",
  12493. "z-index",
  12494. "loop",
  12495. "onMouseenter",
  12496. "onMouseleave",
  12497. "onClose"
  12498. ]), [[vShow, shouldShow.value]])]),
  12499. _: 3
  12500. }, 8, ["name", "appear"])) : createCommentVNode("v-if", true)]),
  12501. _: 3
  12502. }, 8, ["disabled", "to"]);
  12503. };
  12504. }
  12505. });
  12506. //#endregion
  12507. //#region node_modules/element-plus/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs
  12508. var _hoisted_1$77 = ["innerHTML"];
  12509. var _hoisted_2$43 = { key: 1 };
  12510. //#endregion
  12511. //#region node_modules/element-plus/es/components/tooltip/index.mjs
  12512. var ElTooltip = withInstall(/* @__PURE__ */ defineComponent({
  12513. name: "ElTooltip",
  12514. __name: "tooltip",
  12515. props: useTooltipProps,
  12516. emits: tooltipEmits,
  12517. setup(__props, { expose: __expose, emit: __emit }) {
  12518. const props = __props;
  12519. const emit = __emit;
  12520. usePopperContainer();
  12521. const ns = useNamespace("tooltip");
  12522. const id = useId();
  12523. const popperRef = ref();
  12524. const contentRef = ref();
  12525. const updatePopper = () => {
  12526. const popperComponent = unref(popperRef);
  12527. if (popperComponent) popperComponent.popperInstanceRef?.update();
  12528. };
  12529. const open = ref(false);
  12530. const toggleReason = ref();
  12531. const { show, hide, hasUpdateHandler } = useTooltipModelToggle({
  12532. indicator: open,
  12533. toggleReason
  12534. });
  12535. const { onOpen, onClose } = useDelayedToggle({
  12536. showAfter: toRef(props, "showAfter"),
  12537. hideAfter: toRef(props, "hideAfter"),
  12538. autoClose: toRef(props, "autoClose"),
  12539. open: show,
  12540. close: hide
  12541. });
  12542. const controlled = computed(() => isBoolean(props.visible) && !hasUpdateHandler.value);
  12543. const kls = computed(() => {
  12544. return [ns.b(), props.popperClass];
  12545. });
  12546. provide(TOOLTIP_INJECTION_KEY, {
  12547. controlled,
  12548. id,
  12549. open: readonly(open),
  12550. trigger: toRef(props, "trigger"),
  12551. onOpen,
  12552. onClose,
  12553. onToggle: (event) => {
  12554. if (unref(open)) onClose(event);
  12555. else onOpen(event);
  12556. },
  12557. onShow: () => {
  12558. emit("show", toggleReason.value);
  12559. },
  12560. onHide: () => {
  12561. emit("hide", toggleReason.value);
  12562. },
  12563. onBeforeShow: () => {
  12564. emit("before-show", toggleReason.value);
  12565. },
  12566. onBeforeHide: () => {
  12567. emit("before-hide", toggleReason.value);
  12568. },
  12569. updatePopper
  12570. });
  12571. watch(() => props.disabled, (disabled) => {
  12572. if (disabled && open.value) open.value = false;
  12573. });
  12574. const isFocusInsideContent = (event) => {
  12575. return contentRef.value?.isFocusInsideContent(event);
  12576. };
  12577. onDeactivated(() => open.value && hide());
  12578. onBeforeUnmount(() => {
  12579. toggleReason.value = void 0;
  12580. });
  12581. __expose({
  12582. popperRef,
  12583. contentRef,
  12584. isFocusInsideContent,
  12585. updatePopper,
  12586. onOpen,
  12587. onClose,
  12588. hide
  12589. });
  12590. return (_ctx, _cache) => {
  12591. return openBlock(), createBlock(unref(ElPopper), {
  12592. ref_key: "popperRef",
  12593. ref: popperRef,
  12594. role: __props.role
  12595. }, {
  12596. default: withCtx(() => [createVNode(trigger_default$1, {
  12597. disabled: __props.disabled,
  12598. trigger: __props.trigger,
  12599. "trigger-keys": __props.triggerKeys,
  12600. "virtual-ref": __props.virtualRef,
  12601. "virtual-triggering": __props.virtualTriggering,
  12602. "focus-on-target": __props.focusOnTarget
  12603. }, {
  12604. default: withCtx(() => [_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)]),
  12605. _: 3
  12606. }, 8, [
  12607. "disabled",
  12608. "trigger",
  12609. "trigger-keys",
  12610. "virtual-ref",
  12611. "virtual-triggering",
  12612. "focus-on-target"
  12613. ]), createVNode(content_default$2, {
  12614. ref_key: "contentRef",
  12615. ref: contentRef,
  12616. "aria-label": __props.ariaLabel,
  12617. "boundaries-padding": __props.boundariesPadding,
  12618. content: __props.content,
  12619. disabled: __props.disabled,
  12620. effect: __props.effect,
  12621. enterable: __props.enterable,
  12622. "fallback-placements": __props.fallbackPlacements,
  12623. "hide-after": __props.hideAfter,
  12624. "gpu-acceleration": __props.gpuAcceleration,
  12625. offset: __props.offset,
  12626. persistent: __props.persistent,
  12627. "popper-class": kls.value,
  12628. "popper-style": __props.popperStyle,
  12629. placement: __props.placement,
  12630. "popper-options": __props.popperOptions,
  12631. "arrow-offset": __props.arrowOffset,
  12632. pure: __props.pure,
  12633. "raw-content": __props.rawContent,
  12634. "reference-el": __props.referenceEl,
  12635. "trigger-target-el": __props.triggerTargetEl,
  12636. "show-after": __props.showAfter,
  12637. strategy: __props.strategy,
  12638. teleported: __props.teleported,
  12639. transition: __props.transition,
  12640. "virtual-triggering": __props.virtualTriggering,
  12641. "z-index": __props.zIndex,
  12642. "append-to": __props.appendTo,
  12643. loop: __props.loop
  12644. }, {
  12645. default: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [__props.rawContent ? (openBlock(), createElementBlock("span", {
  12646. key: 0,
  12647. innerHTML: __props.content
  12648. }, null, 8, _hoisted_1$77)) : (openBlock(), createElementBlock("span", _hoisted_2$43, toDisplayString(__props.content), 1))]), __props.showArrow ? (openBlock(), createBlock(unref(arrow_default), { key: 0 })) : createCommentVNode("v-if", true)]),
  12649. _: 3
  12650. }, 8, [
  12651. "aria-label",
  12652. "boundaries-padding",
  12653. "content",
  12654. "disabled",
  12655. "effect",
  12656. "enterable",
  12657. "fallback-placements",
  12658. "hide-after",
  12659. "gpu-acceleration",
  12660. "offset",
  12661. "persistent",
  12662. "popper-class",
  12663. "popper-style",
  12664. "placement",
  12665. "popper-options",
  12666. "arrow-offset",
  12667. "pure",
  12668. "raw-content",
  12669. "reference-el",
  12670. "trigger-target-el",
  12671. "show-after",
  12672. "strategy",
  12673. "teleported",
  12674. "transition",
  12675. "virtual-triggering",
  12676. "z-index",
  12677. "append-to",
  12678. "loop"
  12679. ])]),
  12680. _: 3
  12681. }, 8, ["role"]);
  12682. };
  12683. }
  12684. }));
  12685. //#endregion
  12686. //#region node_modules/element-plus/es/utils/typescript.mjs
  12687. var mutable = (val) => val;
  12688. //#endregion
  12689. //#region node_modules/element-plus/es/components/input/src/input.mjs
  12690. /**
  12691. * @deprecated Removed after 3.0.0, Use `InputProps` instead.
  12692. */
  12693. var inputProps = buildProps({
  12694. id: {
  12695. type: String,
  12696. default: void 0
  12697. },
  12698. size: useSizeProp,
  12699. disabled: {
  12700. type: Boolean,
  12701. default: void 0
  12702. },
  12703. modelValue: {
  12704. type: definePropType([
  12705. String,
  12706. Number,
  12707. Object
  12708. ]),
  12709. default: ""
  12710. },
  12711. modelModifiers: {
  12712. type: definePropType(Object),
  12713. default: () => ({})
  12714. },
  12715. maxlength: { type: [String, Number] },
  12716. minlength: { type: [String, Number] },
  12717. type: {
  12718. type: definePropType(String),
  12719. default: "text"
  12720. },
  12721. resize: {
  12722. type: String,
  12723. values: [
  12724. "none",
  12725. "both",
  12726. "horizontal",
  12727. "vertical"
  12728. ]
  12729. },
  12730. autosize: {
  12731. type: definePropType([Boolean, Object]),
  12732. default: false
  12733. },
  12734. autocomplete: {
  12735. type: definePropType(String),
  12736. default: "off"
  12737. },
  12738. formatter: { type: Function },
  12739. parser: { type: Function },
  12740. placeholder: { type: String },
  12741. form: { type: String },
  12742. readonly: Boolean,
  12743. clearable: Boolean,
  12744. clearIcon: {
  12745. type: iconPropType,
  12746. default: circle_close_default
  12747. },
  12748. showPassword: Boolean,
  12749. showWordLimit: Boolean,
  12750. wordLimitPosition: {
  12751. type: String,
  12752. values: ["inside", "outside"],
  12753. default: "inside"
  12754. },
  12755. suffixIcon: { type: iconPropType },
  12756. prefixIcon: { type: iconPropType },
  12757. containerRole: {
  12758. type: String,
  12759. default: void 0
  12760. },
  12761. tabindex: {
  12762. type: [String, Number],
  12763. default: 0
  12764. },
  12765. validateEvent: {
  12766. type: Boolean,
  12767. default: true
  12768. },
  12769. inputStyle: {
  12770. type: definePropType([
  12771. Object,
  12772. Array,
  12773. String
  12774. ]),
  12775. default: () => mutable({})
  12776. },
  12777. autofocus: Boolean,
  12778. rows: {
  12779. type: Number,
  12780. default: 2
  12781. },
  12782. ...useAriaProps(["ariaLabel"]),
  12783. inputmode: {
  12784. type: definePropType(String),
  12785. default: void 0
  12786. },
  12787. name: String
  12788. });
  12789. var inputEmits = {
  12790. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  12791. input: (value) => isString(value),
  12792. change: (value, evt) => isString(value) && (evt instanceof Event || evt === void 0),
  12793. focus: (evt) => evt instanceof FocusEvent,
  12794. blur: (evt) => evt instanceof FocusEvent,
  12795. clear: (evt) => evt === void 0 || evt instanceof MouseEvent,
  12796. mouseleave: (evt) => evt instanceof MouseEvent,
  12797. mouseenter: (evt) => evt instanceof MouseEvent,
  12798. keydown: (evt) => evt instanceof Event,
  12799. compositionstart: (evt) => evt instanceof CompositionEvent,
  12800. compositionupdate: (evt) => evt instanceof CompositionEvent,
  12801. compositionend: (evt) => evt instanceof CompositionEvent
  12802. };
  12803. /**
  12804. * @description default values for InputProps, used in components that extend InputProps like Autocomplete
  12805. */
  12806. var inputPropsDefaults = {
  12807. disabled: void 0,
  12808. modelValue: "",
  12809. modelModifiers: () => ({}),
  12810. type: "text",
  12811. autocomplete: "off",
  12812. clearIcon: markRaw(circle_close_default),
  12813. wordLimitPosition: "inside",
  12814. tabindex: 0,
  12815. validateEvent: true,
  12816. inputStyle: () => ({}),
  12817. rows: 2
  12818. };
  12819. //#endregion
  12820. //#region node_modules/element-plus/es/components/input/src/utils.mjs
  12821. var hiddenTextarea = void 0;
  12822. var HIDDEN_STYLE = {
  12823. height: "0",
  12824. visibility: "hidden",
  12825. overflow: isFirefox() ? "" : "hidden",
  12826. position: "absolute",
  12827. "z-index": "-1000",
  12828. top: "0",
  12829. right: "0"
  12830. };
  12831. var CONTEXT_STYLE = [
  12832. "letter-spacing",
  12833. "line-height",
  12834. "padding-top",
  12835. "padding-bottom",
  12836. "font-family",
  12837. "font-weight",
  12838. "font-size",
  12839. "text-rendering",
  12840. "text-transform",
  12841. "width",
  12842. "text-indent",
  12843. "padding-left",
  12844. "padding-right",
  12845. "border-width",
  12846. "box-sizing",
  12847. "word-break"
  12848. ];
  12849. var looseToNumber = (val) => {
  12850. const n = Number.parseFloat(val);
  12851. return Number.isNaN(n) ? val : n;
  12852. };
  12853. function calculateNodeStyling(targetElement) {
  12854. const style = window.getComputedStyle(targetElement);
  12855. const boxSizing = style.getPropertyValue("box-sizing");
  12856. const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
  12857. const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
  12858. return {
  12859. contextStyle: CONTEXT_STYLE.map((name) => [name, style.getPropertyValue(name)]),
  12860. paddingSize,
  12861. borderSize,
  12862. boxSizing
  12863. };
  12864. }
  12865. function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
  12866. if (!hiddenTextarea) {
  12867. hiddenTextarea = document.createElement("textarea");
  12868. let hostNode = document.body;
  12869. if (!isFirefox() && targetElement.parentNode) hostNode = targetElement.parentNode;
  12870. hostNode.appendChild(hiddenTextarea);
  12871. }
  12872. const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
  12873. contextStyle.forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value));
  12874. Object.entries(HIDDEN_STYLE).forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value, "important"));
  12875. hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
  12876. let height = hiddenTextarea.scrollHeight;
  12877. const result = {};
  12878. if (boxSizing === "border-box") height = height + borderSize;
  12879. else if (boxSizing === "content-box") height = height - paddingSize;
  12880. hiddenTextarea.value = "";
  12881. const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  12882. if (isNumber(minRows)) {
  12883. let minHeight = singleRowHeight * minRows;
  12884. if (boxSizing === "border-box") minHeight = minHeight + paddingSize + borderSize;
  12885. height = Math.max(minHeight, height);
  12886. result.minHeight = `${minHeight}px`;
  12887. }
  12888. if (isNumber(maxRows)) {
  12889. let maxHeight = singleRowHeight * maxRows;
  12890. if (boxSizing === "border-box") maxHeight = maxHeight + paddingSize + borderSize;
  12891. height = Math.min(maxHeight, height);
  12892. }
  12893. result.height = `${height}px`;
  12894. hiddenTextarea.parentNode?.removeChild(hiddenTextarea);
  12895. hiddenTextarea = void 0;
  12896. return result;
  12897. }
  12898. //#endregion
  12899. //#region node_modules/element-plus/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs
  12900. var _hoisted_1$76 = [
  12901. "id",
  12902. "name",
  12903. "minlength",
  12904. "maxlength",
  12905. "type",
  12906. "disabled",
  12907. "readonly",
  12908. "autocomplete",
  12909. "tabindex",
  12910. "aria-label",
  12911. "placeholder",
  12912. "form",
  12913. "autofocus",
  12914. "role",
  12915. "inputmode"
  12916. ];
  12917. var _hoisted_2$42 = [
  12918. "id",
  12919. "name",
  12920. "minlength",
  12921. "maxlength",
  12922. "tabindex",
  12923. "disabled",
  12924. "readonly",
  12925. "autocomplete",
  12926. "aria-label",
  12927. "placeholder",
  12928. "form",
  12929. "autofocus",
  12930. "rows",
  12931. "role"
  12932. ];
  12933. var COMPONENT_NAME$19 = "ElInput";
  12934. //#endregion
  12935. //#region node_modules/element-plus/es/components/input/index.mjs
  12936. var ElInput = withInstall(/* @__PURE__ */ defineComponent({
  12937. name: COMPONENT_NAME$19,
  12938. inheritAttrs: false,
  12939. __name: "input",
  12940. props: inputProps,
  12941. emits: inputEmits,
  12942. setup(__props, { expose: __expose, emit: __emit }) {
  12943. const props = __props;
  12944. const emit = __emit;
  12945. const rawAttrs = useAttrs$1();
  12946. const attrs = useAttrs();
  12947. const slots = useSlots();
  12948. const containerKls = computed(() => [
  12949. props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
  12950. nsInput.m(inputSize.value),
  12951. nsInput.is("disabled", inputDisabled.value),
  12952. nsInput.is("exceed", inputExceed.value),
  12953. {
  12954. [nsInput.b("group")]: slots.prepend || slots.append,
  12955. [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
  12956. [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
  12957. [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
  12958. [nsInput.b("hidden")]: props.type === "hidden"
  12959. },
  12960. rawAttrs.class
  12961. ]);
  12962. const wrapperKls = computed(() => [nsInput.e("wrapper"), nsInput.is("focus", isFocused.value)]);
  12963. const { form: elForm, formItem: elFormItem } = useFormItem();
  12964. const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
  12965. const inputSize = useFormSize();
  12966. const inputDisabled = useFormDisabled();
  12967. const nsInput = useNamespace("input");
  12968. const nsTextarea = useNamespace("textarea");
  12969. const input = shallowRef();
  12970. const textarea = shallowRef();
  12971. const hovering = ref(false);
  12972. const passwordVisible = ref(false);
  12973. const countStyle = ref();
  12974. const textareaCalcStyle = shallowRef(props.inputStyle);
  12975. const _ref = computed(() => input.value || textarea.value);
  12976. const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
  12977. disabled: inputDisabled,
  12978. afterBlur() {
  12979. if (props.validateEvent) elFormItem?.validate?.("blur").catch((err) => debugWarn(err));
  12980. }
  12981. });
  12982. const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
  12983. const validateState = computed(() => elFormItem?.validateState || "");
  12984. const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
  12985. const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
  12986. const containerStyle = computed(() => [rawAttrs.style]);
  12987. const textareaStyle = computed(() => [
  12988. props.inputStyle,
  12989. textareaCalcStyle.value,
  12990. { resize: props.resize }
  12991. ]);
  12992. const nativeInputValue = computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
  12993. const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
  12994. const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !!nativeInputValue.value);
  12995. const isWordLimitVisible = computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
  12996. const textLength = computed(() => nativeInputValue.value.length);
  12997. const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
  12998. const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
  12999. const hasModelModifiers = computed(() => !!Object.keys(props.modelModifiers).length);
  13000. const [recordCursor, setCursor] = useCursor(input);
  13001. useResizeObserver(textarea, (entries) => {
  13002. onceInitSizeTextarea();
  13003. if (!isWordLimitVisible.value || props.resize !== "both" && props.resize !== "horizontal") return;
  13004. const { width } = entries[0].contentRect;
  13005. countStyle.value = { right: `calc(100% - ${width + 22 - 10}px)` };
  13006. });
  13007. const resizeTextarea = () => {
  13008. const { type, autosize } = props;
  13009. if (!isClient || type !== "textarea" || !textarea.value) return;
  13010. if (autosize) {
  13011. const minRows = isObject$2(autosize) ? autosize.minRows : void 0;
  13012. const maxRows = isObject$2(autosize) ? autosize.maxRows : void 0;
  13013. const textareaStyle = calcTextareaHeight(textarea.value, minRows, maxRows);
  13014. textareaCalcStyle.value = {
  13015. overflowY: "hidden",
  13016. ...textareaStyle
  13017. };
  13018. nextTick(() => {
  13019. textarea.value.offsetHeight;
  13020. textareaCalcStyle.value = textareaStyle;
  13021. });
  13022. } else textareaCalcStyle.value = { minHeight: calcTextareaHeight(textarea.value).minHeight };
  13023. };
  13024. const createOnceInitResize = (resizeTextarea) => {
  13025. let isInit = false;
  13026. return () => {
  13027. if (isInit || !props.autosize) return;
  13028. if (!(textarea.value?.offsetParent === null)) {
  13029. setTimeout(resizeTextarea);
  13030. isInit = true;
  13031. }
  13032. };
  13033. };
  13034. const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
  13035. const setNativeInputValue = () => {
  13036. const input = _ref.value;
  13037. const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
  13038. if (!input || input.value === formatterValue || props.type === "file") return;
  13039. input.value = formatterValue;
  13040. };
  13041. const formatValue = (value) => {
  13042. const { trim, number } = props.modelModifiers;
  13043. if (trim) value = value.trim();
  13044. if (number) value = `${looseToNumber(value)}`;
  13045. if (props.formatter && props.parser) value = props.parser(value);
  13046. return value;
  13047. };
  13048. const handleInput = async (event) => {
  13049. if (isComposing.value) return;
  13050. const { lazy } = props.modelModifiers;
  13051. let { value } = event.target;
  13052. if (lazy) {
  13053. emit(INPUT_EVENT, value);
  13054. return;
  13055. }
  13056. value = formatValue(value);
  13057. if (String(value) === nativeInputValue.value) {
  13058. if (props.formatter) setNativeInputValue();
  13059. return;
  13060. }
  13061. recordCursor();
  13062. emit(UPDATE_MODEL_EVENT, value);
  13063. emit(INPUT_EVENT, value);
  13064. await nextTick();
  13065. if (props.formatter && props.parser || !hasModelModifiers.value) setNativeInputValue();
  13066. setCursor();
  13067. };
  13068. const handleChange = async (event) => {
  13069. let { value } = event.target;
  13070. value = formatValue(value);
  13071. if (props.modelModifiers.lazy) emit(UPDATE_MODEL_EVENT, value);
  13072. emit(CHANGE_EVENT, value, event);
  13073. await nextTick();
  13074. setNativeInputValue();
  13075. };
  13076. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({
  13077. emit,
  13078. afterComposition: handleInput
  13079. });
  13080. const handlePasswordVisible = () => {
  13081. passwordVisible.value = !passwordVisible.value;
  13082. };
  13083. const focus = () => _ref.value?.focus();
  13084. const blur = () => _ref.value?.blur();
  13085. const handleMouseLeave = (evt) => {
  13086. hovering.value = false;
  13087. emit("mouseleave", evt);
  13088. };
  13089. const handleMouseEnter = (evt) => {
  13090. hovering.value = true;
  13091. emit("mouseenter", evt);
  13092. };
  13093. const handleKeydown = (evt) => {
  13094. emit("keydown", evt);
  13095. };
  13096. const select = () => {
  13097. _ref.value?.select();
  13098. };
  13099. const clear = (evt) => {
  13100. emit(UPDATE_MODEL_EVENT, "");
  13101. emit(CHANGE_EVENT, "");
  13102. emit("clear", evt);
  13103. emit(INPUT_EVENT, "");
  13104. };
  13105. watch(() => props.modelValue, () => {
  13106. nextTick(() => resizeTextarea());
  13107. if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
  13108. });
  13109. watch(nativeInputValue, (newValue) => {
  13110. if (!_ref.value) return;
  13111. const { trim, number } = props.modelModifiers;
  13112. const elValue = _ref.value.value;
  13113. const displayValue = (number || props.type === "number") && !/^0\d/.test(elValue) ? `${looseToNumber(elValue)}` : elValue;
  13114. if (displayValue === newValue) return;
  13115. if (document.activeElement === _ref.value && _ref.value.type !== "range") {
  13116. if (trim && displayValue.trim() === newValue) return;
  13117. }
  13118. setNativeInputValue();
  13119. });
  13120. watch(() => props.type, async () => {
  13121. await nextTick();
  13122. setNativeInputValue();
  13123. resizeTextarea();
  13124. });
  13125. onMounted(() => {
  13126. if (!props.formatter && props.parser) debugWarn(COMPONENT_NAME$19, "If you set the parser, you also need to set the formatter.");
  13127. setNativeInputValue();
  13128. nextTick(resizeTextarea);
  13129. });
  13130. __expose({
  13131. input,
  13132. textarea,
  13133. ref: _ref,
  13134. textareaStyle,
  13135. autosize: toRef(props, "autosize"),
  13136. isComposing,
  13137. focus,
  13138. blur,
  13139. select,
  13140. clear,
  13141. resizeTextarea
  13142. });
  13143. return (_ctx, _cache) => {
  13144. return openBlock(), createElementBlock("div", {
  13145. class: normalizeClass([containerKls.value, {
  13146. [unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
  13147. [unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend
  13148. }]),
  13149. style: normalizeStyle(containerStyle.value),
  13150. onMouseenter: handleMouseEnter,
  13151. onMouseleave: handleMouseLeave
  13152. }, [createCommentVNode(" input "), __props.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  13153. createCommentVNode(" prepend slot "),
  13154. _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
  13155. key: 0,
  13156. class: normalizeClass(unref(nsInput).be("group", "prepend"))
  13157. }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("v-if", true),
  13158. createBaseVNode("div", {
  13159. ref_key: "wrapperRef",
  13160. ref: wrapperRef,
  13161. class: normalizeClass(wrapperKls.value)
  13162. }, [
  13163. createCommentVNode(" prefix slot "),
  13164. _ctx.$slots.prefix || __props.prefixIcon ? (openBlock(), createElementBlock("span", {
  13165. key: 0,
  13166. class: normalizeClass(unref(nsInput).e("prefix"))
  13167. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("prefix-inner")) }, [renderSlot(_ctx.$slots, "prefix"), __props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  13168. key: 0,
  13169. class: normalizeClass(unref(nsInput).e("icon"))
  13170. }, {
  13171. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
  13172. _: 1
  13173. }, 8, ["class"])) : createCommentVNode("v-if", true)], 2)], 2)) : createCommentVNode("v-if", true),
  13174. createBaseVNode("input", mergeProps({
  13175. id: unref(inputId),
  13176. ref_key: "input",
  13177. ref: input,
  13178. class: unref(nsInput).e("inner")
  13179. }, unref(attrs), {
  13180. name: __props.name,
  13181. minlength: __props.minlength,
  13182. maxlength: __props.maxlength,
  13183. type: __props.showPassword ? passwordVisible.value ? "text" : "password" : __props.type,
  13184. disabled: unref(inputDisabled),
  13185. readonly: __props.readonly,
  13186. autocomplete: __props.autocomplete,
  13187. tabindex: __props.tabindex,
  13188. "aria-label": __props.ariaLabel,
  13189. placeholder: __props.placeholder,
  13190. style: __props.inputStyle,
  13191. form: __props.form,
  13192. autofocus: __props.autofocus,
  13193. role: __props.containerRole,
  13194. inputmode: __props.inputmode,
  13195. onCompositionstart: _cache[0] || (_cache[0] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  13196. onCompositionupdate: _cache[1] || (_cache[1] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  13197. onCompositionend: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  13198. onInput: handleInput,
  13199. onChange: handleChange,
  13200. onKeydown: handleKeydown
  13201. }), null, 16, _hoisted_1$76),
  13202. createCommentVNode(" suffix slot "),
  13203. suffixVisible.value ? (openBlock(), createElementBlock("span", {
  13204. key: 1,
  13205. class: normalizeClass(unref(nsInput).e("suffix"))
  13206. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("suffix-inner")) }, [
  13207. !showClear.value || !showPwdVisible.value || !isWordLimitVisible.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "suffix"), __props.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  13208. key: 0,
  13209. class: normalizeClass(unref(nsInput).e("icon"))
  13210. }, {
  13211. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.suffixIcon)))]),
  13212. _: 1
  13213. }, 8, ["class"])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true),
  13214. showClear.value ? (openBlock(), createBlock(unref(ElIcon), {
  13215. key: 1,
  13216. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
  13217. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  13218. onClick: clear
  13219. }, {
  13220. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  13221. _: 1
  13222. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
  13223. showPwdVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
  13224. key: 2,
  13225. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
  13226. onClick: handlePasswordVisible,
  13227. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  13228. onMouseup: withModifiers(unref(NOOP), ["prevent"])
  13229. }, {
  13230. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(passwordIcon.value)))]),
  13231. _: 1
  13232. }, 8, [
  13233. "class",
  13234. "onMousedown",
  13235. "onMouseup"
  13236. ])) : createCommentVNode("v-if", true),
  13237. isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
  13238. key: 3,
  13239. class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
  13240. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("count-inner")) }, toDisplayString(textLength.value) + " / " + toDisplayString(__props.maxlength), 3)], 2)) : createCommentVNode("v-if", true),
  13241. validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  13242. key: 4,
  13243. class: normalizeClass([
  13244. unref(nsInput).e("icon"),
  13245. unref(nsInput).e("validateIcon"),
  13246. unref(nsInput).is("loading", validateState.value === "validating")
  13247. ])
  13248. }, {
  13249. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
  13250. _: 1
  13251. }, 8, ["class"])) : createCommentVNode("v-if", true)
  13252. ], 2)], 2)) : createCommentVNode("v-if", true)
  13253. ], 2),
  13254. createCommentVNode(" append slot "),
  13255. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  13256. key: 1,
  13257. class: normalizeClass(unref(nsInput).be("group", "append"))
  13258. }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
  13259. ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  13260. createCommentVNode(" textarea "),
  13261. createBaseVNode("textarea", mergeProps({
  13262. id: unref(inputId),
  13263. ref_key: "textarea",
  13264. ref: textarea,
  13265. class: [
  13266. unref(nsTextarea).e("inner"),
  13267. unref(nsInput).is("focus", unref(isFocused)),
  13268. unref(nsTextarea).is("clearable", __props.clearable)
  13269. ]
  13270. }, unref(attrs), {
  13271. name: __props.name,
  13272. minlength: __props.minlength,
  13273. maxlength: __props.maxlength,
  13274. tabindex: __props.tabindex,
  13275. disabled: unref(inputDisabled),
  13276. readonly: __props.readonly,
  13277. autocomplete: __props.autocomplete,
  13278. style: textareaStyle.value,
  13279. "aria-label": __props.ariaLabel,
  13280. placeholder: __props.placeholder,
  13281. form: __props.form,
  13282. autofocus: __props.autofocus,
  13283. rows: __props.rows,
  13284. role: __props.containerRole,
  13285. onCompositionstart: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  13286. onCompositionupdate: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  13287. onCompositionend: _cache[5] || (_cache[5] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  13288. onInput: handleInput,
  13289. onFocus: _cache[6] || (_cache[6] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  13290. onBlur: _cache[7] || (_cache[7] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
  13291. onChange: handleChange,
  13292. onKeydown: handleKeydown
  13293. }), null, 16, _hoisted_2$42),
  13294. showClear.value ? (openBlock(), createBlock(unref(ElIcon), {
  13295. key: 0,
  13296. class: normalizeClass([unref(nsTextarea).e("icon"), unref(nsTextarea).e("clear")]),
  13297. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  13298. onClick: clear
  13299. }, {
  13300. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  13301. _: 1
  13302. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
  13303. isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
  13304. key: 1,
  13305. style: normalizeStyle(countStyle.value),
  13306. class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
  13307. }, toDisplayString(textLength.value) + " / " + toDisplayString(__props.maxlength), 7)) : createCommentVNode("v-if", true)
  13308. ], 64))], 38);
  13309. };
  13310. }
  13311. }));
  13312. //#endregion
  13313. //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs
  13314. /**
  13315. * @deprecated Removed after 3.0.0, Use `AutocompleteProps` instead.
  13316. */
  13317. var autocompleteProps = buildProps({
  13318. ...inputProps,
  13319. valueKey: {
  13320. type: String,
  13321. default: "value"
  13322. },
  13323. modelValue: {
  13324. type: [String, Number],
  13325. default: ""
  13326. },
  13327. debounce: {
  13328. type: Number,
  13329. default: 300
  13330. },
  13331. placement: {
  13332. type: definePropType(String),
  13333. values: [
  13334. "top",
  13335. "top-start",
  13336. "top-end",
  13337. "bottom",
  13338. "bottom-start",
  13339. "bottom-end"
  13340. ],
  13341. default: "bottom-start"
  13342. },
  13343. fetchSuggestions: {
  13344. type: definePropType([Function, Array]),
  13345. default: NOOP
  13346. },
  13347. popperClass: useTooltipContentProps.popperClass,
  13348. popperStyle: useTooltipContentProps.popperStyle,
  13349. triggerOnFocus: {
  13350. type: Boolean,
  13351. default: true
  13352. },
  13353. selectWhenUnmatched: Boolean,
  13354. hideLoading: Boolean,
  13355. teleported: useTooltipContentProps.teleported,
  13356. appendTo: useTooltipContentProps.appendTo,
  13357. highlightFirstItem: Boolean,
  13358. fitInputWidth: Boolean,
  13359. loopNavigation: {
  13360. type: Boolean,
  13361. default: true
  13362. }
  13363. });
  13364. var autocompleteEmits = {
  13365. [UPDATE_MODEL_EVENT]: (value) => isString(value) || isNumber(value),
  13366. [INPUT_EVENT]: (value) => isString(value) || isNumber(value),
  13367. [CHANGE_EVENT]: (value) => isString(value) || isNumber(value),
  13368. focus: (evt) => evt instanceof FocusEvent,
  13369. blur: (evt) => evt instanceof FocusEvent,
  13370. clear: () => true,
  13371. select: (item) => isObject$2(item)
  13372. };
  13373. //#endregion
  13374. //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs
  13375. /**
  13376. * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.
  13377. */
  13378. var scrollbarProps = buildProps({
  13379. distance: {
  13380. type: Number,
  13381. default: 0
  13382. },
  13383. height: {
  13384. type: [String, Number],
  13385. default: ""
  13386. },
  13387. maxHeight: {
  13388. type: [String, Number],
  13389. default: ""
  13390. },
  13391. native: Boolean,
  13392. wrapStyle: {
  13393. type: definePropType([
  13394. String,
  13395. Object,
  13396. Array
  13397. ]),
  13398. default: ""
  13399. },
  13400. wrapClass: {
  13401. type: [String, Array],
  13402. default: ""
  13403. },
  13404. viewClass: {
  13405. type: [String, Array],
  13406. default: ""
  13407. },
  13408. viewStyle: {
  13409. type: [
  13410. String,
  13411. Array,
  13412. Object
  13413. ],
  13414. default: ""
  13415. },
  13416. noresize: Boolean,
  13417. tag: {
  13418. type: String,
  13419. default: "div"
  13420. },
  13421. always: Boolean,
  13422. minSize: {
  13423. type: Number,
  13424. default: 20
  13425. },
  13426. tabindex: {
  13427. type: [String, Number],
  13428. default: void 0
  13429. },
  13430. id: String,
  13431. role: String,
  13432. ...useAriaProps(["ariaLabel", "ariaOrientation"])
  13433. });
  13434. var scrollbarEmits = {
  13435. "end-reached": (direction) => [
  13436. "left",
  13437. "right",
  13438. "top",
  13439. "bottom"
  13440. ].includes(direction),
  13441. scroll: ({ scrollTop, scrollLeft }) => [scrollTop, scrollLeft].every(isNumber)
  13442. };
  13443. //#endregion
  13444. //#region node_modules/element-plus/es/components/scrollbar/src/util.mjs
  13445. var GAP = 4;
  13446. var BAR_MAP = {
  13447. vertical: {
  13448. offset: "offsetHeight",
  13449. scroll: "scrollTop",
  13450. scrollSize: "scrollHeight",
  13451. size: "height",
  13452. key: "vertical",
  13453. axis: "Y",
  13454. client: "clientY",
  13455. direction: "top"
  13456. },
  13457. horizontal: {
  13458. offset: "offsetWidth",
  13459. scroll: "scrollLeft",
  13460. scrollSize: "scrollWidth",
  13461. size: "width",
  13462. key: "horizontal",
  13463. axis: "X",
  13464. client: "clientX",
  13465. direction: "left"
  13466. }
  13467. };
  13468. var renderThumbStyle = ({ move, size, bar }) => ({
  13469. [bar.size]: size,
  13470. transform: `translate${bar.axis}(${move}%)`
  13471. });
  13472. //#endregion
  13473. //#region node_modules/element-plus/es/components/scrollbar/src/thumb.mjs
  13474. /**
  13475. * @deprecated Removed after 3.0.0, Use `ThumbProps` instead.
  13476. */
  13477. var thumbProps = buildProps({
  13478. vertical: Boolean,
  13479. size: String,
  13480. move: Number,
  13481. ratio: {
  13482. type: Number,
  13483. required: true
  13484. },
  13485. always: Boolean
  13486. });
  13487. //#endregion
  13488. //#region node_modules/element-plus/es/components/scrollbar/src/constants.mjs
  13489. var scrollbarContextKey = Symbol("scrollbarContextKey");
  13490. //#endregion
  13491. //#region node_modules/element-plus/es/components/scrollbar/src/bar.mjs
  13492. /**
  13493. * @deprecated Removed after 3.0.0, Use `BarProps` instead.
  13494. */
  13495. var barProps = buildProps({
  13496. always: {
  13497. type: Boolean,
  13498. default: true
  13499. },
  13500. minSize: {
  13501. type: Number,
  13502. required: true
  13503. }
  13504. });
  13505. //#endregion
  13506. //#region node_modules/element-plus/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs
  13507. var COMPONENT_NAME$18 = "Thumb";
  13508. //#endregion
  13509. //#region node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs
  13510. var thumb_default = /* @__PURE__ */ defineComponent({
  13511. __name: "thumb",
  13512. props: thumbProps,
  13513. setup(__props) {
  13514. const props = __props;
  13515. const scrollbar = inject(scrollbarContextKey);
  13516. const ns = useNamespace("scrollbar");
  13517. if (!scrollbar) throwError(COMPONENT_NAME$18, "can not inject scrollbar context");
  13518. const instance = ref();
  13519. const thumb = ref();
  13520. const thumbState = ref({});
  13521. const visible = ref(false);
  13522. let cursorDown = false;
  13523. let cursorLeave = false;
  13524. let baseScrollHeight = 0;
  13525. let baseScrollWidth = 0;
  13526. let originalOnSelectStart = isClient ? document.onselectstart : null;
  13527. const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
  13528. const thumbStyle = computed(() => renderThumbStyle({
  13529. size: props.size,
  13530. move: props.move,
  13531. bar: bar.value
  13532. }));
  13533. const offsetRatio = computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
  13534. const clickThumbHandler = (e) => {
  13535. e.stopPropagation();
  13536. if (e.ctrlKey || [1, 2].includes(e.button)) return;
  13537. window.getSelection()?.removeAllRanges();
  13538. startDrag(e);
  13539. const el = e.currentTarget;
  13540. if (!el) return;
  13541. thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
  13542. };
  13543. const clickTrackHandler = (e) => {
  13544. if (!thumb.value || !instance.value || !scrollbar.wrapElement) return;
  13545. const thumbPositionPercentage = (Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumb.value[bar.value.offset] / 2) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  13546. scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
  13547. };
  13548. const startDrag = (e) => {
  13549. e.stopImmediatePropagation();
  13550. cursorDown = true;
  13551. baseScrollHeight = scrollbar.wrapElement.scrollHeight;
  13552. baseScrollWidth = scrollbar.wrapElement.scrollWidth;
  13553. document.addEventListener("mousemove", mouseMoveDocumentHandler);
  13554. document.addEventListener("mouseup", mouseUpDocumentHandler);
  13555. originalOnSelectStart = document.onselectstart;
  13556. document.onselectstart = () => false;
  13557. };
  13558. const mouseMoveDocumentHandler = (e) => {
  13559. if (!instance.value || !thumb.value) return;
  13560. if (cursorDown === false) return;
  13561. const prevPage = thumbState.value[bar.value.axis];
  13562. if (!prevPage) return;
  13563. const thumbPositionPercentage = ((instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumb.value[bar.value.offset] - prevPage)) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  13564. if (bar.value.scroll === "scrollLeft") scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollWidth / 100;
  13565. else scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollHeight / 100;
  13566. };
  13567. const mouseUpDocumentHandler = () => {
  13568. cursorDown = false;
  13569. thumbState.value[bar.value.axis] = 0;
  13570. document.removeEventListener("mousemove", mouseMoveDocumentHandler);
  13571. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  13572. restoreOnselectstart();
  13573. if (cursorLeave) visible.value = false;
  13574. };
  13575. const mouseMoveScrollbarHandler = () => {
  13576. cursorLeave = false;
  13577. visible.value = !!props.size;
  13578. };
  13579. const mouseLeaveScrollbarHandler = () => {
  13580. cursorLeave = true;
  13581. visible.value = cursorDown;
  13582. };
  13583. onBeforeUnmount(() => {
  13584. restoreOnselectstart();
  13585. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  13586. });
  13587. const restoreOnselectstart = () => {
  13588. if (document.onselectstart !== originalOnSelectStart) document.onselectstart = originalOnSelectStart;
  13589. };
  13590. useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
  13591. useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
  13592. return (_ctx, _cache) => {
  13593. return openBlock(), createBlock(Transition, {
  13594. name: unref(ns).b("fade"),
  13595. persisted: ""
  13596. }, {
  13597. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  13598. ref_key: "instance",
  13599. ref: instance,
  13600. class: normalizeClass([unref(ns).e("bar"), unref(ns).is(bar.value.key)]),
  13601. onMousedown: clickTrackHandler,
  13602. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  13603. }, [createBaseVNode("div", {
  13604. ref_key: "thumb",
  13605. ref: thumb,
  13606. class: normalizeClass(unref(ns).e("thumb")),
  13607. style: normalizeStyle(thumbStyle.value),
  13608. onMousedown: clickThumbHandler
  13609. }, null, 38)], 34), [[vShow, __props.always || visible.value]])]),
  13610. _: 1
  13611. }, 8, ["name"]);
  13612. };
  13613. }
  13614. });
  13615. //#endregion
  13616. //#region node_modules/element-plus/es/components/scrollbar/src/bar2.mjs
  13617. var bar_default = /* @__PURE__ */ defineComponent({
  13618. __name: "bar",
  13619. props: barProps,
  13620. setup(__props, { expose: __expose }) {
  13621. const props = __props;
  13622. const scrollbar = inject(scrollbarContextKey);
  13623. const moveX = ref(0);
  13624. const moveY = ref(0);
  13625. const sizeWidth = ref("");
  13626. const sizeHeight = ref("");
  13627. const ratioY = ref(1);
  13628. const ratioX = ref(1);
  13629. const handleScroll = (wrap) => {
  13630. if (wrap) {
  13631. const offsetHeight = wrap.offsetHeight - 4;
  13632. const offsetWidth = wrap.offsetWidth - 4;
  13633. moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
  13634. moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
  13635. }
  13636. };
  13637. const update = () => {
  13638. const wrap = scrollbar?.wrapElement;
  13639. if (!wrap) return;
  13640. const offsetHeight = wrap.offsetHeight - 4;
  13641. const offsetWidth = wrap.offsetWidth - 4;
  13642. const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
  13643. const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
  13644. const height = Math.max(originalHeight, props.minSize);
  13645. const width = Math.max(originalWidth, props.minSize);
  13646. ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
  13647. ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
  13648. sizeHeight.value = height + 4 < offsetHeight ? `${height}px` : "";
  13649. sizeWidth.value = width + 4 < offsetWidth ? `${width}px` : "";
  13650. };
  13651. __expose({
  13652. handleScroll,
  13653. update
  13654. });
  13655. return (_ctx, _cache) => {
  13656. return openBlock(), createElementBlock(Fragment, null, [createVNode(thumb_default, {
  13657. move: moveX.value,
  13658. ratio: ratioX.value,
  13659. size: sizeWidth.value,
  13660. always: __props.always
  13661. }, null, 8, [
  13662. "move",
  13663. "ratio",
  13664. "size",
  13665. "always"
  13666. ]), createVNode(thumb_default, {
  13667. move: moveY.value,
  13668. ratio: ratioY.value,
  13669. size: sizeHeight.value,
  13670. vertical: "",
  13671. always: __props.always
  13672. }, null, 8, [
  13673. "move",
  13674. "ratio",
  13675. "size",
  13676. "always"
  13677. ])], 64);
  13678. };
  13679. }
  13680. });
  13681. //#endregion
  13682. //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.mjs
  13683. var _hoisted_1$75 = ["tabindex"];
  13684. var COMPONENT_NAME$17 = "ElScrollbar";
  13685. //#endregion
  13686. //#region node_modules/element-plus/es/components/scrollbar/index.mjs
  13687. var ElScrollbar = withInstall(/* @__PURE__ */ defineComponent({
  13688. name: COMPONENT_NAME$17,
  13689. __name: "scrollbar",
  13690. props: scrollbarProps,
  13691. emits: scrollbarEmits,
  13692. setup(__props, { expose: __expose, emit: __emit }) {
  13693. const props = __props;
  13694. const emit = __emit;
  13695. const ns = useNamespace("scrollbar");
  13696. let stopResizeObserver = void 0;
  13697. let stopWrapResizeObserver = void 0;
  13698. let stopResizeListener = void 0;
  13699. let wrapScrollTop = 0;
  13700. let wrapScrollLeft = 0;
  13701. let direction = "";
  13702. const distanceScrollState = {
  13703. bottom: false,
  13704. top: false,
  13705. right: false,
  13706. left: false
  13707. };
  13708. const scrollbarRef = ref();
  13709. const wrapRef = ref();
  13710. const resizeRef = ref();
  13711. const barRef = ref();
  13712. const wrapStyle = computed(() => {
  13713. const style = {};
  13714. const height = addUnit(props.height);
  13715. const maxHeight = addUnit(props.maxHeight);
  13716. if (height) style.height = height;
  13717. if (maxHeight) style.maxHeight = maxHeight;
  13718. return [props.wrapStyle, style];
  13719. });
  13720. const wrapKls = computed(() => {
  13721. return [
  13722. props.wrapClass,
  13723. ns.e("wrap"),
  13724. { [ns.em("wrap", "hidden-default")]: !props.native }
  13725. ];
  13726. });
  13727. const resizeKls = computed(() => {
  13728. return [ns.e("view"), props.viewClass];
  13729. });
  13730. const shouldSkipDirection = (direction) => {
  13731. return distanceScrollState[direction] ?? false;
  13732. };
  13733. const DIRECTION_PAIRS = {
  13734. top: "bottom",
  13735. bottom: "top",
  13736. left: "right",
  13737. right: "left"
  13738. };
  13739. const updateTriggerStatus = (arrivedStates) => {
  13740. const oppositeDirection = DIRECTION_PAIRS[direction];
  13741. if (!oppositeDirection) return;
  13742. const arrived = arrivedStates[direction];
  13743. const oppositeArrived = arrivedStates[oppositeDirection];
  13744. if (arrived && !distanceScrollState[direction]) distanceScrollState[direction] = true;
  13745. if (!oppositeArrived && distanceScrollState[oppositeDirection]) distanceScrollState[oppositeDirection] = false;
  13746. };
  13747. const handleScroll = () => {
  13748. if (wrapRef.value) {
  13749. barRef.value?.handleScroll(wrapRef.value);
  13750. const prevTop = wrapScrollTop;
  13751. const prevLeft = wrapScrollLeft;
  13752. wrapScrollTop = wrapRef.value.scrollTop;
  13753. wrapScrollLeft = wrapRef.value.scrollLeft;
  13754. const arrivedStates = {
  13755. bottom: wrapScrollTop + wrapRef.value.clientHeight >= wrapRef.value.scrollHeight - props.distance,
  13756. top: wrapScrollTop <= props.distance && prevTop !== 0,
  13757. right: wrapScrollLeft + wrapRef.value.clientWidth >= wrapRef.value.scrollWidth - props.distance && prevLeft !== wrapScrollLeft,
  13758. left: wrapScrollLeft <= props.distance && prevLeft !== 0
  13759. };
  13760. emit("scroll", {
  13761. scrollTop: wrapScrollTop,
  13762. scrollLeft: wrapScrollLeft
  13763. });
  13764. if (prevTop !== wrapScrollTop) direction = wrapScrollTop > prevTop ? "bottom" : "top";
  13765. if (prevLeft !== wrapScrollLeft) direction = wrapScrollLeft > prevLeft ? "right" : "left";
  13766. if (props.distance > 0) {
  13767. if (shouldSkipDirection(direction)) return;
  13768. updateTriggerStatus(arrivedStates);
  13769. }
  13770. if (arrivedStates[direction]) emit("end-reached", direction);
  13771. }
  13772. };
  13773. function scrollTo(arg1, arg2) {
  13774. if (isObject$2(arg1)) wrapRef.value.scrollTo(arg1);
  13775. else if (isNumber(arg1) && isNumber(arg2)) wrapRef.value.scrollTo(arg1, arg2);
  13776. }
  13777. const setScrollTop = (value) => {
  13778. if (!isNumber(value)) {
  13779. debugWarn(COMPONENT_NAME$17, "value must be a number");
  13780. return;
  13781. }
  13782. wrapRef.value.scrollTop = value;
  13783. };
  13784. const setScrollLeft = (value) => {
  13785. if (!isNumber(value)) {
  13786. debugWarn(COMPONENT_NAME$17, "value must be a number");
  13787. return;
  13788. }
  13789. wrapRef.value.scrollLeft = value;
  13790. };
  13791. const update = () => {
  13792. barRef.value?.update();
  13793. distanceScrollState[direction] = false;
  13794. };
  13795. watch(() => props.noresize, (noresize) => {
  13796. if (noresize) {
  13797. stopResizeObserver?.();
  13798. stopWrapResizeObserver?.();
  13799. stopResizeListener?.();
  13800. } else {
  13801. ({stop: stopResizeObserver} = useResizeObserver(resizeRef, update));
  13802. ({stop: stopWrapResizeObserver} = useResizeObserver(wrapRef, update));
  13803. stopResizeListener = useEventListener("resize", update);
  13804. }
  13805. }, { immediate: true });
  13806. watch(() => [props.maxHeight, props.height], () => {
  13807. if (!props.native) nextTick(() => {
  13808. update();
  13809. if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value);
  13810. });
  13811. });
  13812. provide(scrollbarContextKey, reactive({
  13813. scrollbarElement: scrollbarRef,
  13814. wrapElement: wrapRef
  13815. }));
  13816. onActivated(() => {
  13817. if (wrapRef.value) {
  13818. wrapRef.value.scrollTop = wrapScrollTop;
  13819. wrapRef.value.scrollLeft = wrapScrollLeft;
  13820. }
  13821. });
  13822. onMounted(() => {
  13823. if (!props.native) nextTick(() => {
  13824. update();
  13825. });
  13826. });
  13827. onUpdated(() => update());
  13828. __expose({
  13829. wrapRef,
  13830. update,
  13831. scrollTo,
  13832. setScrollTop,
  13833. setScrollLeft,
  13834. handleScroll
  13835. });
  13836. return (_ctx, _cache) => {
  13837. return openBlock(), createElementBlock("div", {
  13838. ref_key: "scrollbarRef",
  13839. ref: scrollbarRef,
  13840. class: normalizeClass(unref(ns).b())
  13841. }, [createBaseVNode("div", {
  13842. ref_key: "wrapRef",
  13843. ref: wrapRef,
  13844. class: normalizeClass(wrapKls.value),
  13845. style: normalizeStyle(wrapStyle.value),
  13846. tabindex: __props.tabindex,
  13847. onScroll: handleScroll
  13848. }, [(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  13849. id: __props.id,
  13850. ref_key: "resizeRef",
  13851. ref: resizeRef,
  13852. class: normalizeClass(resizeKls.value),
  13853. style: normalizeStyle(__props.viewStyle),
  13854. role: __props.role,
  13855. "aria-label": __props.ariaLabel,
  13856. "aria-orientation": __props.ariaOrientation
  13857. }, {
  13858. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  13859. _: 3
  13860. }, 8, [
  13861. "id",
  13862. "class",
  13863. "style",
  13864. "role",
  13865. "aria-label",
  13866. "aria-orientation"
  13867. ]))], 46, _hoisted_1$75), !__props.native ? (openBlock(), createBlock(bar_default, {
  13868. key: 0,
  13869. ref_key: "barRef",
  13870. ref: barRef,
  13871. always: __props.always,
  13872. "min-size": __props.minSize
  13873. }, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)], 2);
  13874. };
  13875. }
  13876. }));
  13877. //#endregion
  13878. //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs
  13879. var _hoisted_1$74 = ["aria-expanded", "aria-owns"];
  13880. var _hoisted_2$41 = { key: 0 };
  13881. var _hoisted_3$18 = [
  13882. "id",
  13883. "aria-selected",
  13884. "onClick"
  13885. ];
  13886. var COMPONENT_NAME$16 = "ElAutocomplete";
  13887. //#endregion
  13888. //#region node_modules/element-plus/es/components/autocomplete/index.mjs
  13889. var ElAutocomplete = withInstall(/* @__PURE__ */ defineComponent({
  13890. name: COMPONENT_NAME$16,
  13891. inheritAttrs: false,
  13892. __name: "autocomplete",
  13893. props: autocompleteProps,
  13894. emits: autocompleteEmits,
  13895. setup(__props, { expose: __expose, emit: __emit }) {
  13896. const props = __props;
  13897. const emit = __emit;
  13898. const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
  13899. const rawAttrs = useAttrs$1();
  13900. const disabled = useFormDisabled();
  13901. const ns = useNamespace("autocomplete");
  13902. const inputRef = ref();
  13903. const regionRef = ref();
  13904. const popperRef = ref();
  13905. const listboxRef = ref();
  13906. let readonly = false;
  13907. let ignoreFocusEvent = false;
  13908. const suggestions = ref([]);
  13909. const highlightedIndex = ref(-1);
  13910. const dropdownWidth = ref("");
  13911. const activated = ref(false);
  13912. const suggestionDisabled = ref(false);
  13913. const loading = ref(false);
  13914. const listboxId = useId();
  13915. const styles = computed(() => rawAttrs.style);
  13916. const suggestionVisible = computed(() => {
  13917. return (suggestions.value.length > 0 || loading.value) && activated.value;
  13918. });
  13919. const suggestionLoading = computed(() => !props.hideLoading && loading.value);
  13920. const refInput = computed(() => {
  13921. if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
  13922. return [];
  13923. });
  13924. const onSuggestionShow = () => {
  13925. if (suggestionVisible.value) dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
  13926. };
  13927. const onHide = () => {
  13928. highlightedIndex.value = -1;
  13929. };
  13930. const getData = async (queryString) => {
  13931. if (suggestionDisabled.value) return;
  13932. const cb = (suggestionList) => {
  13933. loading.value = false;
  13934. if (suggestionDisabled.value) return;
  13935. if (isArray$1(suggestionList)) {
  13936. suggestions.value = suggestionList;
  13937. highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
  13938. } else throwError(COMPONENT_NAME$16, "autocomplete suggestions must be an array");
  13939. };
  13940. loading.value = true;
  13941. if (isArray$1(props.fetchSuggestions)) cb(props.fetchSuggestions);
  13942. else {
  13943. const result = await props.fetchSuggestions(queryString, cb);
  13944. if (isArray$1(result)) cb(result);
  13945. }
  13946. };
  13947. const debouncedGetData = useDebounceFn(getData, computed(() => props.debounce));
  13948. const handleInput = (value) => {
  13949. const valuePresented = !!value;
  13950. emit(INPUT_EVENT, value);
  13951. emit(UPDATE_MODEL_EVENT, value);
  13952. suggestionDisabled.value = false;
  13953. activated.value ||= valuePresented;
  13954. if (!props.triggerOnFocus && !value) {
  13955. suggestionDisabled.value = true;
  13956. suggestions.value = [];
  13957. return;
  13958. }
  13959. debouncedGetData(value);
  13960. };
  13961. const handleMouseDown = (event) => {
  13962. if (disabled.value) return;
  13963. if (event.target?.tagName !== "INPUT" || refInput.value.includes(document.activeElement)) activated.value = true;
  13964. };
  13965. const handleChange = (value) => {
  13966. emit(CHANGE_EVENT, value);
  13967. };
  13968. const handleFocus = (evt) => {
  13969. if (!ignoreFocusEvent) {
  13970. activated.value = true;
  13971. emit("focus", evt);
  13972. const queryString = props.modelValue ?? "";
  13973. if (props.triggerOnFocus && !readonly) debouncedGetData(String(queryString));
  13974. } else ignoreFocusEvent = false;
  13975. };
  13976. const handleBlur = (evt) => {
  13977. setTimeout(() => {
  13978. if (popperRef.value?.isFocusInsideContent()) {
  13979. ignoreFocusEvent = true;
  13980. return;
  13981. }
  13982. activated.value && close();
  13983. emit("blur", evt);
  13984. });
  13985. };
  13986. const handleClear = () => {
  13987. activated.value = false;
  13988. emit(UPDATE_MODEL_EVENT, "");
  13989. emit("clear");
  13990. };
  13991. const handleKeyEnter = async () => {
  13992. if (inputRef.value?.isComposing) return;
  13993. if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) handleSelect(suggestions.value[highlightedIndex.value]);
  13994. else {
  13995. if (props.selectWhenUnmatched) {
  13996. emit("select", { value: props.modelValue });
  13997. suggestions.value = [];
  13998. highlightedIndex.value = -1;
  13999. }
  14000. activated.value = true;
  14001. debouncedGetData(String(props.modelValue));
  14002. }
  14003. };
  14004. const handleKeyEscape = (evt) => {
  14005. if (suggestionVisible.value) {
  14006. evt.preventDefault();
  14007. evt.stopPropagation();
  14008. close();
  14009. }
  14010. };
  14011. const close = () => {
  14012. activated.value = false;
  14013. };
  14014. const focus = () => {
  14015. inputRef.value?.focus();
  14016. };
  14017. const blur = () => {
  14018. inputRef.value?.blur();
  14019. };
  14020. const handleSelect = async (item) => {
  14021. emit(INPUT_EVENT, item[props.valueKey]);
  14022. emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
  14023. emit("select", item);
  14024. suggestions.value = [];
  14025. highlightedIndex.value = -1;
  14026. };
  14027. const highlight = (index) => {
  14028. if (!suggestionVisible.value || loading.value) return;
  14029. if (index < 0) {
  14030. if (!props.loopNavigation) {
  14031. highlightedIndex.value = -1;
  14032. return;
  14033. }
  14034. index = suggestions.value.length - 1;
  14035. }
  14036. if (index >= suggestions.value.length) index = props.loopNavigation ? 0 : suggestions.value.length - 1;
  14037. const [suggestion, suggestionList] = getSuggestionContext();
  14038. const highlightItem = suggestionList[index];
  14039. const scrollTop = suggestion.scrollTop;
  14040. const { offsetTop, scrollHeight } = highlightItem;
  14041. if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) suggestion.scrollTop = offsetTop + scrollHeight - suggestion.clientHeight;
  14042. if (offsetTop < scrollTop) suggestion.scrollTop = offsetTop;
  14043. highlightedIndex.value = index;
  14044. inputRef.value?.ref?.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
  14045. };
  14046. const getSuggestionContext = () => {
  14047. const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
  14048. return [suggestion, suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`)];
  14049. };
  14050. const stopHandle = onClickOutside(listboxRef, (event) => {
  14051. if (popperRef.value?.isFocusInsideContent()) return;
  14052. const hadIgnoredFocus = ignoreFocusEvent;
  14053. ignoreFocusEvent = false;
  14054. if (!suggestionVisible.value) return;
  14055. if (hadIgnoredFocus) handleBlur(new FocusEvent("blur", event));
  14056. else close();
  14057. });
  14058. const handleKeydown = (e) => {
  14059. switch (getEventCode(e)) {
  14060. case EVENT_CODE.up:
  14061. e.preventDefault();
  14062. highlight(highlightedIndex.value - 1);
  14063. break;
  14064. case EVENT_CODE.down:
  14065. e.preventDefault();
  14066. highlight(highlightedIndex.value + 1);
  14067. break;
  14068. case EVENT_CODE.enter:
  14069. case EVENT_CODE.numpadEnter:
  14070. e.preventDefault();
  14071. handleKeyEnter();
  14072. break;
  14073. case EVENT_CODE.tab:
  14074. close();
  14075. break;
  14076. case EVENT_CODE.esc:
  14077. handleKeyEscape(e);
  14078. break;
  14079. case EVENT_CODE.home:
  14080. e.preventDefault();
  14081. highlight(0);
  14082. break;
  14083. case EVENT_CODE.end:
  14084. e.preventDefault();
  14085. highlight(suggestions.value.length - 1);
  14086. break;
  14087. case EVENT_CODE.pageUp:
  14088. e.preventDefault();
  14089. highlight(Math.max(0, highlightedIndex.value - 10));
  14090. break;
  14091. case EVENT_CODE.pageDown:
  14092. e.preventDefault();
  14093. highlight(Math.min(suggestions.value.length - 1, highlightedIndex.value + 10));
  14094. break;
  14095. }
  14096. };
  14097. onBeforeUnmount(() => {
  14098. stopHandle?.();
  14099. });
  14100. onMounted(() => {
  14101. const inputElement = inputRef.value?.ref;
  14102. if (!inputElement) return;
  14103. [
  14104. {
  14105. key: "role",
  14106. value: "textbox"
  14107. },
  14108. {
  14109. key: "aria-autocomplete",
  14110. value: "list"
  14111. },
  14112. {
  14113. key: "aria-controls",
  14114. value: listboxId.value
  14115. },
  14116. {
  14117. key: "aria-activedescendant",
  14118. value: `${listboxId.value}-item-${highlightedIndex.value}`
  14119. }
  14120. ].forEach(({ key, value }) => inputElement.setAttribute(key, value));
  14121. readonly = inputElement.hasAttribute("readonly");
  14122. });
  14123. __expose({
  14124. highlightedIndex,
  14125. activated,
  14126. loading,
  14127. inputRef,
  14128. popperRef,
  14129. suggestions,
  14130. handleSelect,
  14131. handleKeyEnter,
  14132. focus,
  14133. blur,
  14134. close,
  14135. highlight,
  14136. getData
  14137. });
  14138. return (_ctx, _cache) => {
  14139. return openBlock(), createBlock(unref(ElTooltip), {
  14140. ref_key: "popperRef",
  14141. ref: popperRef,
  14142. visible: suggestionVisible.value,
  14143. placement: __props.placement,
  14144. "fallback-placements": ["bottom-start", "top-start"],
  14145. "popper-class": [unref(ns).e("popper"), __props.popperClass],
  14146. "popper-style": __props.popperStyle,
  14147. teleported: __props.teleported,
  14148. "append-to": __props.appendTo,
  14149. "gpu-acceleration": false,
  14150. pure: "",
  14151. "manual-mode": "",
  14152. effect: "light",
  14153. trigger: "click",
  14154. transition: `${unref(ns).namespace.value}-zoom-in-top`,
  14155. persistent: "",
  14156. role: "listbox",
  14157. onBeforeShow: onSuggestionShow,
  14158. onHide
  14159. }, {
  14160. content: withCtx(() => [createBaseVNode("div", {
  14161. ref_key: "regionRef",
  14162. ref: regionRef,
  14163. class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", suggestionLoading.value)]),
  14164. style: normalizeStyle({
  14165. [__props.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
  14166. outline: "none"
  14167. }),
  14168. role: "region"
  14169. }, [
  14170. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  14171. key: 0,
  14172. class: normalizeClass(unref(ns).be("suggestion", "header")),
  14173. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  14174. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  14175. createVNode(unref(ElScrollbar), {
  14176. id: unref(listboxId),
  14177. tag: "ul",
  14178. "wrap-class": unref(ns).be("suggestion", "wrap"),
  14179. "view-class": unref(ns).be("suggestion", "list"),
  14180. role: "listbox"
  14181. }, {
  14182. default: withCtx(() => [suggestionLoading.value ? (openBlock(), createElementBlock("li", _hoisted_2$41, [renderSlot(_ctx.$slots, "loading", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).is("loading")) }, {
  14183. default: withCtx(() => [createVNode(unref(loading_default))]),
  14184. _: 1
  14185. }, 8, ["class"])])])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
  14186. return openBlock(), createElementBlock("li", {
  14187. id: `${unref(listboxId)}-item-${index}`,
  14188. key: index,
  14189. class: normalizeClass({ highlighted: highlightedIndex.value === index }),
  14190. role: "option",
  14191. "aria-selected": highlightedIndex.value === index,
  14192. onClick: ($event) => handleSelect(item)
  14193. }, [renderSlot(_ctx.$slots, "default", { item }, () => [createTextVNode(toDisplayString(item[__props.valueKey]), 1)])], 10, _hoisted_3$18);
  14194. }), 128))]),
  14195. _: 3
  14196. }, 8, [
  14197. "id",
  14198. "wrap-class",
  14199. "view-class"
  14200. ]),
  14201. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  14202. key: 1,
  14203. class: normalizeClass(unref(ns).be("suggestion", "footer")),
  14204. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  14205. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  14206. ], 6)]),
  14207. default: withCtx(() => [createBaseVNode("div", {
  14208. ref_key: "listboxRef",
  14209. ref: listboxRef,
  14210. class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
  14211. style: normalizeStyle(styles.value),
  14212. role: "combobox",
  14213. "aria-haspopup": "listbox",
  14214. "aria-expanded": suggestionVisible.value,
  14215. "aria-owns": unref(listboxId)
  14216. }, [createVNode(unref(ElInput), mergeProps({
  14217. ref_key: "inputRef",
  14218. ref: inputRef
  14219. }, mergeProps(passInputProps.value, _ctx.$attrs), {
  14220. "model-value": __props.modelValue,
  14221. disabled: unref(disabled),
  14222. onInput: handleInput,
  14223. onChange: handleChange,
  14224. onFocus: handleFocus,
  14225. onBlur: handleBlur,
  14226. onClear: handleClear,
  14227. onKeydown: handleKeydown,
  14228. onMousedown: handleMouseDown
  14229. }), createSlots({ _: 2 }, [
  14230. _ctx.$slots.prepend ? {
  14231. name: "prepend",
  14232. fn: withCtx(() => [renderSlot(_ctx.$slots, "prepend")]),
  14233. key: "0"
  14234. } : void 0,
  14235. _ctx.$slots.append ? {
  14236. name: "append",
  14237. fn: withCtx(() => [renderSlot(_ctx.$slots, "append")]),
  14238. key: "1"
  14239. } : void 0,
  14240. _ctx.$slots.prefix ? {
  14241. name: "prefix",
  14242. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  14243. key: "2"
  14244. } : void 0,
  14245. _ctx.$slots.suffix ? {
  14246. name: "suffix",
  14247. fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
  14248. key: "3"
  14249. } : void 0
  14250. ]), 1040, ["model-value", "disabled"])], 14, _hoisted_1$74)]),
  14251. _: 3
  14252. }, 8, [
  14253. "visible",
  14254. "placement",
  14255. "popper-class",
  14256. "popper-style",
  14257. "teleported",
  14258. "append-to",
  14259. "transition"
  14260. ]);
  14261. };
  14262. }
  14263. }));
  14264. //#endregion
  14265. //#region node_modules/element-plus/es/components/avatar/src/avatar.mjs
  14266. /**
  14267. * @deprecated Removed after 3.0.0, Use `AvatarProps` instead.
  14268. */
  14269. var avatarProps = buildProps({
  14270. size: {
  14271. type: [Number, String],
  14272. values: componentSizes,
  14273. validator: (val) => isNumber(val)
  14274. },
  14275. shape: {
  14276. type: String,
  14277. values: ["circle", "square"]
  14278. },
  14279. icon: { type: iconPropType },
  14280. src: {
  14281. type: String,
  14282. default: ""
  14283. },
  14284. alt: String,
  14285. srcSet: String,
  14286. fit: {
  14287. type: definePropType(String),
  14288. default: "cover"
  14289. }
  14290. });
  14291. var avatarEmits = { error: (evt) => evt instanceof Event };
  14292. //#endregion
  14293. //#region node_modules/element-plus/es/components/avatar/src/constants.mjs
  14294. var avatarGroupContextKey = Symbol("avatarGroupContextKey");
  14295. //#endregion
  14296. //#region node_modules/element-plus/es/components/avatar/src/avatar-group-props.mjs
  14297. var avatarGroupProps = {
  14298. size: {
  14299. type: definePropType([Number, String]),
  14300. values: componentSizes,
  14301. validator: (val) => isNumber(val)
  14302. },
  14303. shape: {
  14304. type: definePropType(String),
  14305. values: ["circle", "square"]
  14306. },
  14307. collapseAvatars: Boolean,
  14308. collapseAvatarsTooltip: Boolean,
  14309. maxCollapseAvatars: {
  14310. type: Number,
  14311. default: 1
  14312. },
  14313. effect: {
  14314. type: definePropType(String),
  14315. default: "light"
  14316. },
  14317. placement: {
  14318. type: definePropType(String),
  14319. values: Ee,
  14320. default: "top"
  14321. },
  14322. popperClass: useTooltipContentProps.popperClass,
  14323. popperStyle: useTooltipContentProps.popperStyle,
  14324. collapseClass: String,
  14325. collapseStyle: { type: definePropType([
  14326. String,
  14327. Array,
  14328. Object
  14329. ]) }
  14330. };
  14331. //#endregion
  14332. //#region node_modules/element-plus/es/components/avatar/src/avatar.vue_vue_type_script_setup_true_lang.mjs
  14333. var _hoisted_1$73 = [
  14334. "src",
  14335. "alt",
  14336. "srcset"
  14337. ];
  14338. //#endregion
  14339. //#region node_modules/element-plus/es/components/avatar/src/avatar2.mjs
  14340. var avatar_default = /* @__PURE__ */ defineComponent({
  14341. name: "ElAvatar",
  14342. __name: "avatar",
  14343. props: avatarProps,
  14344. emits: avatarEmits,
  14345. setup(__props, { emit: __emit }) {
  14346. const props = __props;
  14347. const emit = __emit;
  14348. const avatarGroupContext = inject(avatarGroupContextKey, void 0);
  14349. const ns = useNamespace("avatar");
  14350. const hasLoadError = ref(false);
  14351. const size = computed(() => props.size ?? avatarGroupContext?.size);
  14352. const shape = computed(() => props.shape ?? avatarGroupContext?.shape ?? "circle");
  14353. const avatarClass = computed(() => {
  14354. const { icon } = props;
  14355. const classList = [ns.b()];
  14356. if (isString(size.value)) classList.push(ns.m(size.value));
  14357. if (icon) classList.push(ns.m("icon"));
  14358. if (shape.value) classList.push(ns.m(shape.value));
  14359. return classList;
  14360. });
  14361. const sizeStyle = computed(() => {
  14362. return isNumber(size.value) ? ns.cssVarBlock({ size: addUnit(size.value) }) : void 0;
  14363. });
  14364. const fitStyle = computed(() => ({ objectFit: props.fit }));
  14365. watch(() => [props.src, props.srcSet], () => hasLoadError.value = false);
  14366. function handleError(e) {
  14367. hasLoadError.value = true;
  14368. emit("error", e);
  14369. }
  14370. return (_ctx, _cache) => {
  14371. return openBlock(), createElementBlock("span", {
  14372. class: normalizeClass(avatarClass.value),
  14373. style: normalizeStyle(sizeStyle.value)
  14374. }, [(__props.src || __props.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
  14375. key: 0,
  14376. src: __props.src,
  14377. alt: __props.alt,
  14378. srcset: __props.srcSet,
  14379. style: normalizeStyle(fitStyle.value),
  14380. onError: handleError
  14381. }, null, 44, _hoisted_1$73)) : __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  14382. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  14383. _: 1
  14384. })) : renderSlot(_ctx.$slots, "default", { key: 2 })], 6);
  14385. };
  14386. }
  14387. });
  14388. //#endregion
  14389. //#region node_modules/element-plus/es/components/avatar/src/avatar-group.mjs
  14390. var avatar_group_default = /* @__PURE__ */ defineComponent({
  14391. name: "ElAvatarGroup",
  14392. props: avatarGroupProps,
  14393. setup(props, { slots }) {
  14394. const ns = useNamespace("avatar-group");
  14395. provide(avatarGroupContextKey, reactive({
  14396. size: toRef(props, "size"),
  14397. shape: toRef(props, "shape")
  14398. }));
  14399. return () => {
  14400. const avatars = flattedChildren(slots.default?.() ?? []);
  14401. let visibleAvatars = avatars;
  14402. if (props.collapseAvatars && avatars.length > props.maxCollapseAvatars) {
  14403. visibleAvatars = avatars.slice(0, props.maxCollapseAvatars);
  14404. const hiddenAvatars = avatars.slice(props.maxCollapseAvatars);
  14405. visibleAvatars.push(createVNode(ElTooltip, {
  14406. "popperClass": props.popperClass,
  14407. "popperStyle": props.popperStyle,
  14408. "placement": props.placement,
  14409. "effect": props.effect,
  14410. "disabled": !props.collapseAvatarsTooltip
  14411. }, {
  14412. default: () => createVNode(avatar_default, {
  14413. "size": props.size,
  14414. "shape": props.shape,
  14415. "class": props.collapseClass,
  14416. "style": props.collapseStyle
  14417. }, { default: () => [createTextVNode("+ "), hiddenAvatars.length] }),
  14418. content: () => createVNode("div", { "class": ns.e("collapse-avatars") }, [hiddenAvatars.map((node, idx) => isVNode(node) ? cloneVNode(node, { key: node.key ?? idx }) : node)])
  14419. }));
  14420. }
  14421. return createVNode("div", { "class": ns.b() }, [visibleAvatars]);
  14422. };
  14423. }
  14424. });
  14425. //#endregion
  14426. //#region node_modules/element-plus/es/components/avatar/index.mjs
  14427. var ElAvatar = withInstall(avatar_default, { AvatarGroup: avatar_group_default });
  14428. var ElAvatarGroup = withNoopInstall(avatar_group_default);
  14429. //#endregion
  14430. //#region node_modules/element-plus/es/components/backtop/src/backtop.mjs
  14431. /**
  14432. * @deprecated Removed after 3.0.0, Use `BacktopProps` instead.
  14433. */
  14434. var backtopProps = {
  14435. visibilityHeight: {
  14436. type: Number,
  14437. default: 200
  14438. },
  14439. target: {
  14440. type: String,
  14441. default: ""
  14442. },
  14443. right: {
  14444. type: Number,
  14445. default: 40
  14446. },
  14447. bottom: {
  14448. type: Number,
  14449. default: 40
  14450. }
  14451. };
  14452. var backtopEmits = { click: (evt) => evt instanceof MouseEvent };
  14453. //#endregion
  14454. //#region node_modules/element-plus/es/components/backtop/src/use-backtop.mjs
  14455. var useBackTop = (props, emit, componentName) => {
  14456. const el = shallowRef();
  14457. const container = shallowRef();
  14458. const visible = ref(false);
  14459. const handleScroll = () => {
  14460. if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight;
  14461. };
  14462. const handleClick = (event) => {
  14463. el.value?.scrollTo({
  14464. top: 0,
  14465. behavior: "smooth"
  14466. });
  14467. emit("click", event);
  14468. };
  14469. useEventListener(container, "scroll", useThrottleFn(handleScroll, 300, true));
  14470. onMounted(() => {
  14471. container.value = document;
  14472. el.value = document.documentElement;
  14473. if (props.target) {
  14474. el.value = document.querySelector(props.target) ?? void 0;
  14475. if (!el.value) throwError(componentName, `target does not exist: ${props.target}`);
  14476. container.value = el.value;
  14477. }
  14478. handleScroll();
  14479. });
  14480. return {
  14481. visible,
  14482. handleClick
  14483. };
  14484. };
  14485. //#endregion
  14486. //#region node_modules/element-plus/es/components/backtop/src/backtop.vue_vue_type_script_setup_true_lang.mjs
  14487. var COMPONENT_NAME$15 = "ElBacktop";
  14488. //#endregion
  14489. //#region node_modules/element-plus/es/components/backtop/index.mjs
  14490. var ElBacktop = withInstall(/* @__PURE__ */ defineComponent({
  14491. name: COMPONENT_NAME$15,
  14492. __name: "backtop",
  14493. props: backtopProps,
  14494. emits: backtopEmits,
  14495. setup(__props, { emit: __emit }) {
  14496. const props = __props;
  14497. const emit = __emit;
  14498. const ns = useNamespace("backtop");
  14499. const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$15);
  14500. const backTopStyle = computed(() => ({
  14501. right: `${props.right}px`,
  14502. bottom: `${props.bottom}px`
  14503. }));
  14504. return (_ctx, _cache) => {
  14505. return openBlock(), createBlock(Transition, { name: `${unref(ns).namespace.value}-fade-in` }, {
  14506. default: withCtx(() => [unref(visible) ? (openBlock(), createElementBlock("div", {
  14507. key: 0,
  14508. style: normalizeStyle(backTopStyle.value),
  14509. class: normalizeClass(unref(ns).b()),
  14510. onClick: _cache[0] || (_cache[0] = withModifiers((...args) => unref(handleClick) && unref(handleClick)(...args), ["stop"]))
  14511. }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("icon")) }, {
  14512. default: withCtx(() => [createVNode(unref(caret_top_default))]),
  14513. _: 1
  14514. }, 8, ["class"])])], 6)) : createCommentVNode("v-if", true)]),
  14515. _: 3
  14516. }, 8, ["name"]);
  14517. };
  14518. }
  14519. }));
  14520. //#endregion
  14521. //#region node_modules/element-plus/es/components/badge/src/badge.mjs
  14522. /**
  14523. * @deprecated Removed after 3.0.0, Use `BadgeProps` instead.
  14524. */
  14525. var badgeProps = buildProps({
  14526. value: {
  14527. type: [String, Number],
  14528. default: ""
  14529. },
  14530. max: {
  14531. type: Number,
  14532. default: 99
  14533. },
  14534. isDot: Boolean,
  14535. hidden: Boolean,
  14536. type: {
  14537. type: String,
  14538. values: [
  14539. "primary",
  14540. "success",
  14541. "warning",
  14542. "info",
  14543. "danger"
  14544. ],
  14545. default: "danger"
  14546. },
  14547. showZero: {
  14548. type: Boolean,
  14549. default: true
  14550. },
  14551. color: String,
  14552. badgeStyle: { type: definePropType([
  14553. String,
  14554. Object,
  14555. Array
  14556. ]) },
  14557. offset: {
  14558. type: definePropType(Array),
  14559. default: () => [0, 0]
  14560. },
  14561. badgeClass: { type: String }
  14562. });
  14563. //#endregion
  14564. //#region node_modules/element-plus/es/components/badge/index.mjs
  14565. var ElBadge = withInstall(/* @__PURE__ */ defineComponent({
  14566. name: "ElBadge",
  14567. __name: "badge",
  14568. props: badgeProps,
  14569. setup(__props, { expose: __expose }) {
  14570. const props = __props;
  14571. const ns = useNamespace("badge");
  14572. const content = computed(() => {
  14573. if (props.isDot) return "";
  14574. if (isNumber(props.value) && isNumber(props.max)) return props.max < props.value ? `${props.max}+` : `${props.value}`;
  14575. return `${props.value}`;
  14576. });
  14577. const style = computed(() => {
  14578. return [{
  14579. backgroundColor: props.color,
  14580. marginRight: addUnit(-props.offset[0]),
  14581. marginTop: addUnit(props.offset[1])
  14582. }, props.badgeStyle ?? {}];
  14583. });
  14584. __expose({ content });
  14585. return (_ctx, _cache) => {
  14586. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default"), createVNode(Transition, { name: `${unref(ns).namespace.value}-zoom-in-center` }, {
  14587. default: withCtx(() => [!__props.hidden && (content.value || __props.isDot || _ctx.$slots.content) ? (openBlock(), createElementBlock("sup", {
  14588. key: 0,
  14589. class: normalizeClass([
  14590. unref(ns).e("content"),
  14591. unref(ns).em("content", __props.type),
  14592. unref(ns).is("fixed", !!_ctx.$slots.default),
  14593. unref(ns).is("dot", __props.isDot),
  14594. unref(ns).is("hide-zero", !__props.showZero && __props.value === 0),
  14595. __props.badgeClass
  14596. ]),
  14597. style: normalizeStyle(style.value)
  14598. }, [renderSlot(_ctx.$slots, "content", { value: content.value }, () => [createTextVNode(toDisplayString(content.value), 1)])], 6)) : createCommentVNode("v-if", true)]),
  14599. _: 3
  14600. }, 8, ["name"])], 2);
  14601. };
  14602. }
  14603. }));
  14604. //#endregion
  14605. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs
  14606. /**
  14607. * @deprecated Removed after 3.0.0, Use `BreadcrumbProps` instead.
  14608. */
  14609. var breadcrumbProps = buildProps({
  14610. separator: {
  14611. type: String,
  14612. default: "/"
  14613. },
  14614. separatorIcon: { type: iconPropType }
  14615. });
  14616. //#endregion
  14617. //#region node_modules/element-plus/es/components/breadcrumb/src/constants.mjs
  14618. var breadcrumbKey = Symbol("breadcrumbKey");
  14619. //#endregion
  14620. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs
  14621. /**
  14622. * @deprecated Removed after 3.0.0, Use `BreadcrumbItemProps` instead.
  14623. */
  14624. var breadcrumbItemProps = buildProps({
  14625. to: {
  14626. type: definePropType([String, Object]),
  14627. default: ""
  14628. },
  14629. replace: Boolean
  14630. });
  14631. //#endregion
  14632. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.vue_vue_type_script_setup_true_lang.mjs
  14633. var _hoisted_1$72 = ["aria-label"];
  14634. //#endregion
  14635. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs
  14636. var breadcrumb_default = /* @__PURE__ */ defineComponent({
  14637. name: "ElBreadcrumb",
  14638. __name: "breadcrumb",
  14639. props: breadcrumbProps,
  14640. setup(__props) {
  14641. const { t } = useLocale();
  14642. const props = __props;
  14643. const ns = useNamespace("breadcrumb");
  14644. const breadcrumb = ref();
  14645. provide(breadcrumbKey, props);
  14646. onMounted(() => {
  14647. const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`);
  14648. if (items.length) items[items.length - 1].setAttribute("aria-current", "page");
  14649. });
  14650. return (_ctx, _cache) => {
  14651. return openBlock(), createElementBlock("div", {
  14652. ref_key: "breadcrumb",
  14653. ref: breadcrumb,
  14654. class: normalizeClass(unref(ns).b()),
  14655. "aria-label": unref(t)("el.breadcrumb.label"),
  14656. role: "navigation"
  14657. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$72);
  14658. };
  14659. }
  14660. });
  14661. //#endregion
  14662. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs
  14663. var breadcrumb_item_default = /* @__PURE__ */ defineComponent({
  14664. name: "ElBreadcrumbItem",
  14665. __name: "breadcrumb-item",
  14666. props: breadcrumbItemProps,
  14667. setup(__props) {
  14668. const props = __props;
  14669. const instance = getCurrentInstance();
  14670. const breadcrumbContext = inject(breadcrumbKey, void 0);
  14671. const ns = useNamespace("breadcrumb");
  14672. const router = instance.appContext.config.globalProperties.$router;
  14673. const onClick = () => {
  14674. if (!props.to || !router) return;
  14675. props.replace ? router.replace(props.to) : router.push(props.to);
  14676. };
  14677. return (_ctx, _cache) => {
  14678. return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("span", {
  14679. class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!__props.to)]),
  14680. role: "link",
  14681. onClick
  14682. }, [renderSlot(_ctx.$slots, "default")], 2), unref(breadcrumbContext)?.separatorIcon ? (openBlock(), createBlock(unref(ElIcon), {
  14683. key: 0,
  14684. class: normalizeClass(unref(ns).e("separator"))
  14685. }, {
  14686. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))]),
  14687. _: 1
  14688. }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
  14689. key: 1,
  14690. class: normalizeClass(unref(ns).e("separator")),
  14691. role: "presentation"
  14692. }, toDisplayString(unref(breadcrumbContext)?.separator), 3))], 2);
  14693. };
  14694. }
  14695. });
  14696. //#endregion
  14697. //#region node_modules/element-plus/es/components/breadcrumb/index.mjs
  14698. var ElBreadcrumb = withInstall(breadcrumb_default, { BreadcrumbItem: breadcrumb_item_default });
  14699. var ElBreadcrumbItem = withNoopInstall(breadcrumb_item_default);
  14700. //#endregion
  14701. //#region node_modules/element-plus/es/components/button/src/button.mjs
  14702. var buttonTypes = [
  14703. "default",
  14704. "primary",
  14705. "success",
  14706. "warning",
  14707. "info",
  14708. "danger",
  14709. "text",
  14710. ""
  14711. ];
  14712. var buttonNativeTypes = [
  14713. "button",
  14714. "submit",
  14715. "reset"
  14716. ];
  14717. /**
  14718. * @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
  14719. */
  14720. var buttonProps = buildProps({
  14721. size: useSizeProp,
  14722. disabled: {
  14723. type: Boolean,
  14724. default: void 0
  14725. },
  14726. type: {
  14727. type: String,
  14728. values: buttonTypes,
  14729. default: ""
  14730. },
  14731. icon: { type: iconPropType },
  14732. nativeType: {
  14733. type: String,
  14734. values: buttonNativeTypes,
  14735. default: "button"
  14736. },
  14737. loading: Boolean,
  14738. loadingIcon: {
  14739. type: iconPropType,
  14740. default: () => loading_default
  14741. },
  14742. plain: {
  14743. type: Boolean,
  14744. default: void 0
  14745. },
  14746. text: {
  14747. type: Boolean,
  14748. default: void 0
  14749. },
  14750. link: Boolean,
  14751. bg: Boolean,
  14752. autofocus: Boolean,
  14753. round: {
  14754. type: Boolean,
  14755. default: void 0
  14756. },
  14757. circle: Boolean,
  14758. dashed: {
  14759. type: Boolean,
  14760. default: void 0
  14761. },
  14762. color: String,
  14763. dark: Boolean,
  14764. autoInsertSpace: {
  14765. type: Boolean,
  14766. default: void 0
  14767. },
  14768. tag: {
  14769. type: definePropType([String, Object]),
  14770. default: "button"
  14771. }
  14772. });
  14773. var buttonEmits = { click: (evt) => evt instanceof MouseEvent };
  14774. //#endregion
  14775. //#region node_modules/element-plus/es/components/config-provider/src/constants.mjs
  14776. var configProviderContextKey = Symbol();
  14777. //#endregion
  14778. //#region node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs
  14779. var globalConfig = ref();
  14780. function useGlobalConfig(key, defaultValue = void 0) {
  14781. const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
  14782. if (key) return computed(() => config.value?.[key] ?? defaultValue);
  14783. else return config;
  14784. }
  14785. function useGlobalComponentSettings(block, sizeFallback) {
  14786. const config = useGlobalConfig();
  14787. const ns = useNamespace(block, computed(() => config.value?.namespace || "el"));
  14788. const locale = useLocale(computed(() => config.value?.locale));
  14789. const zIndex = useZIndex(computed(() => config.value?.zIndex || 2e3));
  14790. const size = computed(() => unref(sizeFallback) || config.value?.size || "");
  14791. provideGlobalConfig(computed(() => unref(config) || {}));
  14792. return {
  14793. ns,
  14794. locale,
  14795. zIndex,
  14796. size
  14797. };
  14798. }
  14799. var provideGlobalConfig = (config, app, global = false) => {
  14800. const inSetup = !!getCurrentInstance();
  14801. const oldConfig = inSetup ? useGlobalConfig() : void 0;
  14802. const provideFn = app?.provide ?? (inSetup ? provide : void 0);
  14803. if (!provideFn) {
  14804. debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
  14805. return;
  14806. }
  14807. const context = computed(() => {
  14808. const cfg = unref(config);
  14809. if (!oldConfig?.value) return cfg;
  14810. return mergeConfig(oldConfig.value, cfg);
  14811. });
  14812. provideFn(configProviderContextKey, context);
  14813. provideFn(localeContextKey, computed(() => context.value.locale));
  14814. provideFn(namespaceContextKey, computed(() => context.value.namespace));
  14815. provideFn(zIndexContextKey, computed(() => context.value.zIndex));
  14816. provideFn(SIZE_INJECTION_KEY, { size: computed(() => context.value.size || "") });
  14817. provideFn(emptyValuesContextKey, computed(() => ({
  14818. emptyValues: context.value.emptyValues,
  14819. valueOnClear: context.value.valueOnClear
  14820. })));
  14821. if (global || !globalConfig.value) globalConfig.value = context.value;
  14822. return context;
  14823. };
  14824. var mergeConfig = (a, b) => {
  14825. const keys = [...new Set([...keysOf(a), ...keysOf(b)])];
  14826. const obj = {};
  14827. for (const key of keys) obj[key] = b[key] !== void 0 ? b[key] : a[key];
  14828. return obj;
  14829. };
  14830. //#endregion
  14831. //#region node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs
  14832. var configProviderProps = buildProps({
  14833. a11y: {
  14834. type: Boolean,
  14835. default: true
  14836. },
  14837. locale: { type: definePropType(Object) },
  14838. size: useSizeProp,
  14839. button: { type: definePropType(Object) },
  14840. card: { type: definePropType(Object) },
  14841. dialog: { type: definePropType(Object) },
  14842. link: { type: definePropType(Object) },
  14843. experimentalFeatures: { type: definePropType(Object) },
  14844. keyboardNavigation: {
  14845. type: Boolean,
  14846. default: true
  14847. },
  14848. message: { type: definePropType(Object) },
  14849. zIndex: Number,
  14850. namespace: {
  14851. type: String,
  14852. default: "el"
  14853. },
  14854. table: { type: definePropType(Object) },
  14855. ...useEmptyValuesProps
  14856. });
  14857. //#endregion
  14858. //#region node_modules/element-plus/es/components/config-provider/src/config-provider.mjs
  14859. var messageConfig = { placement: "top" };
  14860. //#endregion
  14861. //#region node_modules/element-plus/es/components/config-provider/index.mjs
  14862. var ElConfigProvider = withInstall(defineComponent({
  14863. name: "ElConfigProvider",
  14864. props: configProviderProps,
  14865. setup(props, { slots }) {
  14866. const config = provideGlobalConfig(props);
  14867. watch(() => props.message, (val) => {
  14868. Object.assign(messageConfig, config?.value?.message ?? {}, val ?? {});
  14869. }, {
  14870. immediate: true,
  14871. deep: true
  14872. });
  14873. return () => renderSlot(slots, "default", { config: config?.value });
  14874. }
  14875. }));
  14876. //#endregion
  14877. //#region node_modules/element-plus/es/components/button/src/constants.mjs
  14878. var buttonGroupContextKey = Symbol("buttonGroupContextKey");
  14879. //#endregion
  14880. //#region node_modules/element-plus/es/components/button/src/use-button.mjs
  14881. var useButton = (props, emit) => {
  14882. useDeprecated({
  14883. from: "type.text",
  14884. replacement: "link",
  14885. version: "3.0.0",
  14886. scope: "props",
  14887. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  14888. }, computed(() => props.type === "text"));
  14889. const buttonGroupContext = inject(buttonGroupContextKey, void 0);
  14890. const globalConfig = useGlobalConfig("button");
  14891. const { form } = useFormItem();
  14892. const _size = useFormSize(computed(() => buttonGroupContext?.size));
  14893. const _disabled = useFormDisabled();
  14894. const _ref = ref();
  14895. const slots = useSlots();
  14896. const _type = computed(() => props.type || buttonGroupContext?.type || globalConfig.value?.type || "");
  14897. const autoInsertSpace = computed(() => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false);
  14898. const _plain = computed(() => props.plain ?? globalConfig.value?.plain ?? false);
  14899. const _round = computed(() => props.round ?? globalConfig.value?.round ?? false);
  14900. const _text = computed(() => props.text ?? globalConfig.value?.text ?? false);
  14901. const _dashed = computed(() => props.dashed ?? globalConfig.value?.dashed ?? false);
  14902. const _props = computed(() => {
  14903. if (props.tag === "button") return {
  14904. ariaDisabled: _disabled.value || props.loading,
  14905. disabled: _disabled.value || props.loading,
  14906. autofocus: props.autofocus,
  14907. type: props.nativeType
  14908. };
  14909. return {};
  14910. });
  14911. const shouldAddSpace = computed(() => {
  14912. const defaultSlot = slots.default?.();
  14913. if (autoInsertSpace.value && defaultSlot?.length === 1) {
  14914. const slot = defaultSlot[0];
  14915. if (slot?.type === Text) {
  14916. const text = slot.children;
  14917. return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
  14918. }
  14919. }
  14920. return false;
  14921. });
  14922. const handleClick = (evt) => {
  14923. if (_disabled.value || props.loading) {
  14924. evt.stopPropagation();
  14925. return;
  14926. }
  14927. if (props.nativeType === "reset") form?.resetFields();
  14928. emit("click", evt);
  14929. };
  14930. return {
  14931. _disabled,
  14932. _size,
  14933. _type,
  14934. _ref,
  14935. _props,
  14936. _plain,
  14937. _round,
  14938. _text,
  14939. _dashed,
  14940. shouldAddSpace,
  14941. handleClick
  14942. };
  14943. };
  14944. //#endregion
  14945. //#region node_modules/@ctrl/tinycolor/dist/module/util.js
  14946. /**
  14947. * Take input from [0, n] and return it as [0, 1]
  14948. * @hidden
  14949. */
  14950. function bound01(n, max) {
  14951. if (isOnePointZero(n)) n = "100%";
  14952. const isPercent = isPercentage(n);
  14953. n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
  14954. if (isPercent) n = parseInt(String(n * max), 10) / 100;
  14955. if (Math.abs(n - max) < 1e-6) return 1;
  14956. if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
  14957. else n = n % max / parseFloat(String(max));
  14958. return n;
  14959. }
  14960. /**
  14961. * Force a number between 0 and 1
  14962. * @hidden
  14963. */
  14964. function clamp01(val) {
  14965. return Math.min(1, Math.max(0, val));
  14966. }
  14967. /**
  14968. * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  14969. * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  14970. * @hidden
  14971. */
  14972. function isOnePointZero(n) {
  14973. return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
  14974. }
  14975. /**
  14976. * Check to see if string passed in is a percentage
  14977. * @hidden
  14978. */
  14979. function isPercentage(n) {
  14980. return typeof n === "string" && n.indexOf("%") !== -1;
  14981. }
  14982. /**
  14983. * Return a valid alpha value [0,1] with all invalid values being set to 1
  14984. * @hidden
  14985. */
  14986. function boundAlpha(a) {
  14987. a = parseFloat(a);
  14988. if (isNaN(a) || a < 0 || a > 1) a = 1;
  14989. return a;
  14990. }
  14991. /**
  14992. * Replace a decimal with it's percentage value
  14993. * @hidden
  14994. */
  14995. function convertToPercentage(n) {
  14996. if (Number(n) <= 1) return `${Number(n) * 100}%`;
  14997. return n;
  14998. }
  14999. /**
  15000. * Force a hex value to have 2 characters
  15001. * @hidden
  15002. */
  15003. function pad2(c) {
  15004. return c.length === 1 ? "0" + c : String(c);
  15005. }
  15006. //#endregion
  15007. //#region node_modules/@ctrl/tinycolor/dist/module/conversion.js
  15008. /**
  15009. * Handle bounds / percentage checking to conform to CSS color spec
  15010. * <http://www.w3.org/TR/css3-color/>
  15011. * *Assumes:* r, g, b in [0, 255] or [0, 1]
  15012. * *Returns:* { r, g, b } in [0, 255]
  15013. */
  15014. function rgbToRgb(r, g, b) {
  15015. return {
  15016. r: bound01(r, 255) * 255,
  15017. g: bound01(g, 255) * 255,
  15018. b: bound01(b, 255) * 255
  15019. };
  15020. }
  15021. /**
  15022. * Converts an RGB color value to HSL.
  15023. * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  15024. * *Returns:* { h, s, l } in [0,1]
  15025. */
  15026. function rgbToHsl(r, g, b) {
  15027. r = bound01(r, 255);
  15028. g = bound01(g, 255);
  15029. b = bound01(b, 255);
  15030. const max = Math.max(r, g, b);
  15031. const min = Math.min(r, g, b);
  15032. let h = 0;
  15033. let s = 0;
  15034. const l = (max + min) / 2;
  15035. if (max === min) {
  15036. s = 0;
  15037. h = 0;
  15038. } else {
  15039. const d = max - min;
  15040. s = l > .5 ? d / (2 - max - min) : d / (max + min);
  15041. switch (max) {
  15042. case r:
  15043. h = (g - b) / d + (g < b ? 6 : 0);
  15044. break;
  15045. case g:
  15046. h = (b - r) / d + 2;
  15047. break;
  15048. case b:
  15049. h = (r - g) / d + 4;
  15050. break;
  15051. default: break;
  15052. }
  15053. h /= 6;
  15054. }
  15055. return {
  15056. h,
  15057. s,
  15058. l
  15059. };
  15060. }
  15061. function hue2rgb(p, q, t) {
  15062. if (t < 0) t += 1;
  15063. if (t > 1) t -= 1;
  15064. if (t < 1 / 6) return p + (q - p) * (6 * t);
  15065. if (t < 1 / 2) return q;
  15066. if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
  15067. return p;
  15068. }
  15069. /**
  15070. * Converts an HSL color value to RGB.
  15071. *
  15072. * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  15073. * *Returns:* { r, g, b } in the set [0, 255]
  15074. */
  15075. function hslToRgb(h, s, l) {
  15076. let r;
  15077. let g;
  15078. let b;
  15079. h = bound01(h, 360);
  15080. s = bound01(s, 100);
  15081. l = bound01(l, 100);
  15082. if (s === 0) {
  15083. g = l;
  15084. b = l;
  15085. r = l;
  15086. } else {
  15087. const q = l < .5 ? l * (1 + s) : l + s - l * s;
  15088. const p = 2 * l - q;
  15089. r = hue2rgb(p, q, h + 1 / 3);
  15090. g = hue2rgb(p, q, h);
  15091. b = hue2rgb(p, q, h - 1 / 3);
  15092. }
  15093. return {
  15094. r: r * 255,
  15095. g: g * 255,
  15096. b: b * 255
  15097. };
  15098. }
  15099. /**
  15100. * Converts an RGB color value to HSV
  15101. *
  15102. * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  15103. * *Returns:* { h, s, v } in [0,1]
  15104. */
  15105. function rgbToHsv(r, g, b) {
  15106. r = bound01(r, 255);
  15107. g = bound01(g, 255);
  15108. b = bound01(b, 255);
  15109. const max = Math.max(r, g, b);
  15110. const min = Math.min(r, g, b);
  15111. let h = 0;
  15112. const v = max;
  15113. const d = max - min;
  15114. const s = max === 0 ? 0 : d / max;
  15115. if (max === min) h = 0;
  15116. else {
  15117. switch (max) {
  15118. case r:
  15119. h = (g - b) / d + (g < b ? 6 : 0);
  15120. break;
  15121. case g:
  15122. h = (b - r) / d + 2;
  15123. break;
  15124. case b:
  15125. h = (r - g) / d + 4;
  15126. break;
  15127. default: break;
  15128. }
  15129. h /= 6;
  15130. }
  15131. return {
  15132. h,
  15133. s,
  15134. v
  15135. };
  15136. }
  15137. /**
  15138. * Converts an HSV color value to RGB.
  15139. *
  15140. * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  15141. * *Returns:* { r, g, b } in the set [0, 255]
  15142. */
  15143. function hsvToRgb(h, s, v) {
  15144. h = bound01(h, 360) * 6;
  15145. s = bound01(s, 100);
  15146. v = bound01(v, 100);
  15147. const i = Math.floor(h);
  15148. const f = h - i;
  15149. const p = v * (1 - s);
  15150. const q = v * (1 - f * s);
  15151. const t = v * (1 - (1 - f) * s);
  15152. const mod = i % 6;
  15153. const r = [
  15154. v,
  15155. q,
  15156. p,
  15157. p,
  15158. t,
  15159. v
  15160. ][mod];
  15161. const g = [
  15162. t,
  15163. v,
  15164. v,
  15165. q,
  15166. p,
  15167. p
  15168. ][mod];
  15169. const b = [
  15170. p,
  15171. p,
  15172. t,
  15173. v,
  15174. v,
  15175. q
  15176. ][mod];
  15177. return {
  15178. r: r * 255,
  15179. g: g * 255,
  15180. b: b * 255
  15181. };
  15182. }
  15183. /**
  15184. * Converts an RGB color to hex
  15185. *
  15186. * *Assumes:* r, g, and b are contained in the set [0, 255]
  15187. * *Returns:* a 3 or 6 character hex
  15188. */
  15189. function rgbToHex(r, g, b, allow3Char) {
  15190. const hex = [
  15191. pad2(Math.round(r).toString(16)),
  15192. pad2(Math.round(g).toString(16)),
  15193. pad2(Math.round(b).toString(16))
  15194. ];
  15195. if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  15196. return hex.join("");
  15197. }
  15198. /**
  15199. * Converts an RGBA color plus alpha transparency to hex
  15200. *
  15201. * *Assumes:* r, g, b are contained in the set [0, 255] and a in [0, 1]
  15202. * *Returns:* a 4 or 8 character rgba hex
  15203. */
  15204. function rgbaToHex(r, g, b, a, allow4Char) {
  15205. const hex = [
  15206. pad2(Math.round(r).toString(16)),
  15207. pad2(Math.round(g).toString(16)),
  15208. pad2(Math.round(b).toString(16)),
  15209. pad2(convertDecimalToHex(a))
  15210. ];
  15211. if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
  15212. return hex.join("");
  15213. }
  15214. /**
  15215. * Converts CMYK to RBG
  15216. * Assumes c, m, y, k are in the set [0, 100]
  15217. */
  15218. function cmykToRgb(c, m, y, k) {
  15219. const cConv = c / 100;
  15220. const mConv = m / 100;
  15221. const yConv = y / 100;
  15222. const kConv = k / 100;
  15223. return {
  15224. r: 255 * (1 - cConv) * (1 - kConv),
  15225. g: 255 * (1 - mConv) * (1 - kConv),
  15226. b: 255 * (1 - yConv) * (1 - kConv)
  15227. };
  15228. }
  15229. function rgbToCmyk(r, g, b) {
  15230. let c = 1 - r / 255;
  15231. let m = 1 - g / 255;
  15232. let y = 1 - b / 255;
  15233. let k = Math.min(c, m, y);
  15234. if (k === 1) {
  15235. c = 0;
  15236. m = 0;
  15237. y = 0;
  15238. } else {
  15239. c = (c - k) / (1 - k) * 100;
  15240. m = (m - k) / (1 - k) * 100;
  15241. y = (y - k) / (1 - k) * 100;
  15242. }
  15243. k *= 100;
  15244. return {
  15245. c: Math.round(c),
  15246. m: Math.round(m),
  15247. y: Math.round(y),
  15248. k: Math.round(k)
  15249. };
  15250. }
  15251. /** Converts a decimal to a hex value */
  15252. function convertDecimalToHex(d) {
  15253. return Math.round(parseFloat(d) * 255).toString(16);
  15254. }
  15255. /** Converts a hex value to a decimal */
  15256. function convertHexToDecimal(h) {
  15257. return parseIntFromHex(h) / 255;
  15258. }
  15259. /** Parse a base-16 hex value into a base-10 integer */
  15260. function parseIntFromHex(val) {
  15261. return parseInt(val, 16);
  15262. }
  15263. function numberInputToObject(color) {
  15264. return {
  15265. r: color >> 16,
  15266. g: (color & 65280) >> 8,
  15267. b: color & 255
  15268. };
  15269. }
  15270. //#endregion
  15271. //#region node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
  15272. /**
  15273. * @hidden
  15274. */
  15275. var names = {
  15276. aliceblue: "#f0f8ff",
  15277. antiquewhite: "#faebd7",
  15278. aqua: "#00ffff",
  15279. aquamarine: "#7fffd4",
  15280. azure: "#f0ffff",
  15281. beige: "#f5f5dc",
  15282. bisque: "#ffe4c4",
  15283. black: "#000000",
  15284. blanchedalmond: "#ffebcd",
  15285. blue: "#0000ff",
  15286. blueviolet: "#8a2be2",
  15287. brown: "#a52a2a",
  15288. burlywood: "#deb887",
  15289. cadetblue: "#5f9ea0",
  15290. chartreuse: "#7fff00",
  15291. chocolate: "#d2691e",
  15292. coral: "#ff7f50",
  15293. cornflowerblue: "#6495ed",
  15294. cornsilk: "#fff8dc",
  15295. crimson: "#dc143c",
  15296. cyan: "#00ffff",
  15297. darkblue: "#00008b",
  15298. darkcyan: "#008b8b",
  15299. darkgoldenrod: "#b8860b",
  15300. darkgray: "#a9a9a9",
  15301. darkgreen: "#006400",
  15302. darkgrey: "#a9a9a9",
  15303. darkkhaki: "#bdb76b",
  15304. darkmagenta: "#8b008b",
  15305. darkolivegreen: "#556b2f",
  15306. darkorange: "#ff8c00",
  15307. darkorchid: "#9932cc",
  15308. darkred: "#8b0000",
  15309. darksalmon: "#e9967a",
  15310. darkseagreen: "#8fbc8f",
  15311. darkslateblue: "#483d8b",
  15312. darkslategray: "#2f4f4f",
  15313. darkslategrey: "#2f4f4f",
  15314. darkturquoise: "#00ced1",
  15315. darkviolet: "#9400d3",
  15316. deeppink: "#ff1493",
  15317. deepskyblue: "#00bfff",
  15318. dimgray: "#696969",
  15319. dimgrey: "#696969",
  15320. dodgerblue: "#1e90ff",
  15321. firebrick: "#b22222",
  15322. floralwhite: "#fffaf0",
  15323. forestgreen: "#228b22",
  15324. fuchsia: "#ff00ff",
  15325. gainsboro: "#dcdcdc",
  15326. ghostwhite: "#f8f8ff",
  15327. goldenrod: "#daa520",
  15328. gold: "#ffd700",
  15329. gray: "#808080",
  15330. green: "#008000",
  15331. greenyellow: "#adff2f",
  15332. grey: "#808080",
  15333. honeydew: "#f0fff0",
  15334. hotpink: "#ff69b4",
  15335. indianred: "#cd5c5c",
  15336. indigo: "#4b0082",
  15337. ivory: "#fffff0",
  15338. khaki: "#f0e68c",
  15339. lavenderblush: "#fff0f5",
  15340. lavender: "#e6e6fa",
  15341. lawngreen: "#7cfc00",
  15342. lemonchiffon: "#fffacd",
  15343. lightblue: "#add8e6",
  15344. lightcoral: "#f08080",
  15345. lightcyan: "#e0ffff",
  15346. lightgoldenrodyellow: "#fafad2",
  15347. lightgray: "#d3d3d3",
  15348. lightgreen: "#90ee90",
  15349. lightgrey: "#d3d3d3",
  15350. lightpink: "#ffb6c1",
  15351. lightsalmon: "#ffa07a",
  15352. lightseagreen: "#20b2aa",
  15353. lightskyblue: "#87cefa",
  15354. lightslategray: "#778899",
  15355. lightslategrey: "#778899",
  15356. lightsteelblue: "#b0c4de",
  15357. lightyellow: "#ffffe0",
  15358. lime: "#00ff00",
  15359. limegreen: "#32cd32",
  15360. linen: "#faf0e6",
  15361. magenta: "#ff00ff",
  15362. maroon: "#800000",
  15363. mediumaquamarine: "#66cdaa",
  15364. mediumblue: "#0000cd",
  15365. mediumorchid: "#ba55d3",
  15366. mediumpurple: "#9370db",
  15367. mediumseagreen: "#3cb371",
  15368. mediumslateblue: "#7b68ee",
  15369. mediumspringgreen: "#00fa9a",
  15370. mediumturquoise: "#48d1cc",
  15371. mediumvioletred: "#c71585",
  15372. midnightblue: "#191970",
  15373. mintcream: "#f5fffa",
  15374. mistyrose: "#ffe4e1",
  15375. moccasin: "#ffe4b5",
  15376. navajowhite: "#ffdead",
  15377. navy: "#000080",
  15378. oldlace: "#fdf5e6",
  15379. olive: "#808000",
  15380. olivedrab: "#6b8e23",
  15381. orange: "#ffa500",
  15382. orangered: "#ff4500",
  15383. orchid: "#da70d6",
  15384. palegoldenrod: "#eee8aa",
  15385. palegreen: "#98fb98",
  15386. paleturquoise: "#afeeee",
  15387. palevioletred: "#db7093",
  15388. papayawhip: "#ffefd5",
  15389. peachpuff: "#ffdab9",
  15390. peru: "#cd853f",
  15391. pink: "#ffc0cb",
  15392. plum: "#dda0dd",
  15393. powderblue: "#b0e0e6",
  15394. purple: "#800080",
  15395. rebeccapurple: "#663399",
  15396. red: "#ff0000",
  15397. rosybrown: "#bc8f8f",
  15398. royalblue: "#4169e1",
  15399. saddlebrown: "#8b4513",
  15400. salmon: "#fa8072",
  15401. sandybrown: "#f4a460",
  15402. seagreen: "#2e8b57",
  15403. seashell: "#fff5ee",
  15404. sienna: "#a0522d",
  15405. silver: "#c0c0c0",
  15406. skyblue: "#87ceeb",
  15407. slateblue: "#6a5acd",
  15408. slategray: "#708090",
  15409. slategrey: "#708090",
  15410. snow: "#fffafa",
  15411. springgreen: "#00ff7f",
  15412. steelblue: "#4682b4",
  15413. tan: "#d2b48c",
  15414. teal: "#008080",
  15415. thistle: "#d8bfd8",
  15416. tomato: "#ff6347",
  15417. turquoise: "#40e0d0",
  15418. violet: "#ee82ee",
  15419. wheat: "#f5deb3",
  15420. white: "#ffffff",
  15421. whitesmoke: "#f5f5f5",
  15422. yellow: "#ffff00",
  15423. yellowgreen: "#9acd32"
  15424. };
  15425. //#endregion
  15426. //#region node_modules/@ctrl/tinycolor/dist/module/format-input.js
  15427. /**
  15428. * Given a string or object, convert that input to RGB
  15429. *
  15430. * Possible string inputs:
  15431. * ```
  15432. * "red"
  15433. * "#f00" or "f00"
  15434. * "#ff0000" or "ff0000"
  15435. * "#ff000000" or "ff000000"
  15436. * "rgb 255 0 0" or "rgb (255, 0, 0)"
  15437. * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  15438. * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  15439. * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  15440. * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  15441. * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  15442. * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  15443. * "cmyk(0, 20, 0, 0)" or "cmyk 0 20 0 0"
  15444. * ```
  15445. */
  15446. function inputToRGB(color) {
  15447. let rgb = {
  15448. r: 0,
  15449. g: 0,
  15450. b: 0
  15451. };
  15452. let a = 1;
  15453. let s = null;
  15454. let v = null;
  15455. let l = null;
  15456. let ok = false;
  15457. let format = false;
  15458. if (typeof color === "string") color = stringInputToObject(color);
  15459. if (typeof color === "object") {
  15460. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  15461. rgb = rgbToRgb(color.r, color.g, color.b);
  15462. ok = true;
  15463. format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  15464. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  15465. s = convertToPercentage(color.s);
  15466. v = convertToPercentage(color.v);
  15467. rgb = hsvToRgb(color.h, s, v);
  15468. ok = true;
  15469. format = "hsv";
  15470. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  15471. s = convertToPercentage(color.s);
  15472. l = convertToPercentage(color.l);
  15473. rgb = hslToRgb(color.h, s, l);
  15474. ok = true;
  15475. format = "hsl";
  15476. } else if (isValidCSSUnit(color.c) && isValidCSSUnit(color.m) && isValidCSSUnit(color.y) && isValidCSSUnit(color.k)) {
  15477. rgb = cmykToRgb(color.c, color.m, color.y, color.k);
  15478. ok = true;
  15479. format = "cmyk";
  15480. }
  15481. if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
  15482. }
  15483. a = boundAlpha(a);
  15484. return {
  15485. ok,
  15486. format: color.format || format,
  15487. r: Math.min(255, Math.max(rgb.r, 0)),
  15488. g: Math.min(255, Math.max(rgb.g, 0)),
  15489. b: Math.min(255, Math.max(rgb.b, 0)),
  15490. a
  15491. };
  15492. }
  15493. var CSS_UNIT = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)";
  15494. var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?";
  15495. var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?";
  15496. var matchers = {
  15497. CSS_UNIT: new RegExp(CSS_UNIT),
  15498. rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  15499. rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  15500. hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  15501. hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  15502. hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  15503. hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  15504. cmyk: new RegExp("cmyk" + PERMISSIVE_MATCH4),
  15505. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  15506. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  15507. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  15508. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  15509. };
  15510. /**
  15511. * Permissive string parsing. Take in a number of formats, and output an object
  15512. * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` or `{c, m, y, k}` or `{c, m, y, k, a}`
  15513. */
  15514. function stringInputToObject(color) {
  15515. color = color.trim().toLowerCase();
  15516. if (color.length === 0) return false;
  15517. let named = false;
  15518. if (names[color]) {
  15519. color = names[color];
  15520. named = true;
  15521. } else if (color === "transparent") return {
  15522. r: 0,
  15523. g: 0,
  15524. b: 0,
  15525. a: 0,
  15526. format: "name"
  15527. };
  15528. let match = matchers.rgb.exec(color);
  15529. if (match) return {
  15530. r: match[1],
  15531. g: match[2],
  15532. b: match[3]
  15533. };
  15534. match = matchers.rgba.exec(color);
  15535. if (match) return {
  15536. r: match[1],
  15537. g: match[2],
  15538. b: match[3],
  15539. a: match[4]
  15540. };
  15541. match = matchers.hsl.exec(color);
  15542. if (match) return {
  15543. h: match[1],
  15544. s: match[2],
  15545. l: match[3]
  15546. };
  15547. match = matchers.hsla.exec(color);
  15548. if (match) return {
  15549. h: match[1],
  15550. s: match[2],
  15551. l: match[3],
  15552. a: match[4]
  15553. };
  15554. match = matchers.hsv.exec(color);
  15555. if (match) return {
  15556. h: match[1],
  15557. s: match[2],
  15558. v: match[3]
  15559. };
  15560. match = matchers.hsva.exec(color);
  15561. if (match) return {
  15562. h: match[1],
  15563. s: match[2],
  15564. v: match[3],
  15565. a: match[4]
  15566. };
  15567. match = matchers.cmyk.exec(color);
  15568. if (match) return {
  15569. c: match[1],
  15570. m: match[2],
  15571. y: match[3],
  15572. k: match[4]
  15573. };
  15574. match = matchers.hex8.exec(color);
  15575. if (match) return {
  15576. r: parseIntFromHex(match[1]),
  15577. g: parseIntFromHex(match[2]),
  15578. b: parseIntFromHex(match[3]),
  15579. a: convertHexToDecimal(match[4]),
  15580. format: named ? "name" : "hex8"
  15581. };
  15582. match = matchers.hex6.exec(color);
  15583. if (match) return {
  15584. r: parseIntFromHex(match[1]),
  15585. g: parseIntFromHex(match[2]),
  15586. b: parseIntFromHex(match[3]),
  15587. format: named ? "name" : "hex"
  15588. };
  15589. match = matchers.hex4.exec(color);
  15590. if (match) return {
  15591. r: parseIntFromHex(match[1] + match[1]),
  15592. g: parseIntFromHex(match[2] + match[2]),
  15593. b: parseIntFromHex(match[3] + match[3]),
  15594. a: convertHexToDecimal(match[4] + match[4]),
  15595. format: named ? "name" : "hex8"
  15596. };
  15597. match = matchers.hex3.exec(color);
  15598. if (match) return {
  15599. r: parseIntFromHex(match[1] + match[1]),
  15600. g: parseIntFromHex(match[2] + match[2]),
  15601. b: parseIntFromHex(match[3] + match[3]),
  15602. format: named ? "name" : "hex"
  15603. };
  15604. return false;
  15605. }
  15606. /**
  15607. * Check to see if it looks like a CSS unit
  15608. * (see `matchers` above for definition).
  15609. */
  15610. function isValidCSSUnit(color) {
  15611. if (typeof color === "number") return !Number.isNaN(color);
  15612. return matchers.CSS_UNIT.test(color);
  15613. }
  15614. //#endregion
  15615. //#region node_modules/@ctrl/tinycolor/dist/module/index.js
  15616. var TinyColor = class TinyColor {
  15617. constructor(color = "", opts = {}) {
  15618. if (color instanceof TinyColor) return color;
  15619. if (typeof color === "number") color = numberInputToObject(color);
  15620. this.originalInput = color;
  15621. const rgb = inputToRGB(color);
  15622. this.originalInput = color;
  15623. this.r = rgb.r;
  15624. this.g = rgb.g;
  15625. this.b = rgb.b;
  15626. this.a = rgb.a;
  15627. this.roundA = Math.round(100 * this.a) / 100;
  15628. this.format = opts.format ?? rgb.format;
  15629. this.gradientType = opts.gradientType;
  15630. if (this.r < 1) this.r = Math.round(this.r);
  15631. if (this.g < 1) this.g = Math.round(this.g);
  15632. if (this.b < 1) this.b = Math.round(this.b);
  15633. this.isValid = rgb.ok;
  15634. }
  15635. isDark() {
  15636. return this.getBrightness() < 128;
  15637. }
  15638. isLight() {
  15639. return !this.isDark();
  15640. }
  15641. /**
  15642. * Returns the perceived brightness of the color, from 0-255.
  15643. */
  15644. getBrightness() {
  15645. const rgb = this.toRgb();
  15646. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
  15647. }
  15648. /**
  15649. * Returns the perceived luminance of a color, from 0-1.
  15650. */
  15651. getLuminance() {
  15652. const rgb = this.toRgb();
  15653. let R;
  15654. let G;
  15655. let B;
  15656. const RsRGB = rgb.r / 255;
  15657. const GsRGB = rgb.g / 255;
  15658. const BsRGB = rgb.b / 255;
  15659. if (RsRGB <= .03928) R = RsRGB / 12.92;
  15660. else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
  15661. if (GsRGB <= .03928) G = GsRGB / 12.92;
  15662. else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
  15663. if (BsRGB <= .03928) B = BsRGB / 12.92;
  15664. else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
  15665. return .2126 * R + .7152 * G + .0722 * B;
  15666. }
  15667. /**
  15668. * Returns the alpha value of a color, from 0-1.
  15669. */
  15670. getAlpha() {
  15671. return this.a;
  15672. }
  15673. /**
  15674. * Sets the alpha value on the current color.
  15675. *
  15676. * @param alpha - The new alpha value. The accepted range is 0-1.
  15677. */
  15678. setAlpha(alpha) {
  15679. this.a = boundAlpha(alpha);
  15680. this.roundA = Math.round(100 * this.a) / 100;
  15681. return this;
  15682. }
  15683. /**
  15684. * Returns whether the color is monochrome.
  15685. */
  15686. isMonochrome() {
  15687. const { s } = this.toHsl();
  15688. return s === 0;
  15689. }
  15690. /**
  15691. * Returns the object as a HSVA object.
  15692. */
  15693. toHsv() {
  15694. const hsv = rgbToHsv(this.r, this.g, this.b);
  15695. return {
  15696. h: hsv.h * 360,
  15697. s: hsv.s,
  15698. v: hsv.v,
  15699. a: this.a
  15700. };
  15701. }
  15702. /**
  15703. * Returns the hsva values interpolated into a string with the following format:
  15704. * "hsva(xxx, xxx, xxx, xx)".
  15705. */
  15706. toHsvString() {
  15707. const hsv = rgbToHsv(this.r, this.g, this.b);
  15708. const h = Math.round(hsv.h * 360);
  15709. const s = Math.round(hsv.s * 100);
  15710. const v = Math.round(hsv.v * 100);
  15711. return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;
  15712. }
  15713. /**
  15714. * Returns the object as a HSLA object.
  15715. */
  15716. toHsl() {
  15717. const hsl = rgbToHsl(this.r, this.g, this.b);
  15718. return {
  15719. h: hsl.h * 360,
  15720. s: hsl.s,
  15721. l: hsl.l,
  15722. a: this.a
  15723. };
  15724. }
  15725. /**
  15726. * Returns the hsla values interpolated into a string with the following format:
  15727. * "hsla(xxx, xxx, xxx, xx)".
  15728. */
  15729. toHslString() {
  15730. const hsl = rgbToHsl(this.r, this.g, this.b);
  15731. const h = Math.round(hsl.h * 360);
  15732. const s = Math.round(hsl.s * 100);
  15733. const l = Math.round(hsl.l * 100);
  15734. return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;
  15735. }
  15736. /**
  15737. * Returns the hex value of the color.
  15738. * @param allow3Char will shorten hex value to 3 char if possible
  15739. */
  15740. toHex(allow3Char = false) {
  15741. return rgbToHex(this.r, this.g, this.b, allow3Char);
  15742. }
  15743. /**
  15744. * Returns the hex value of the color -with a # prefixed.
  15745. * @param allow3Char will shorten hex value to 3 char if possible
  15746. */
  15747. toHexString(allow3Char = false) {
  15748. return "#" + this.toHex(allow3Char);
  15749. }
  15750. /**
  15751. * Returns the hex 8 value of the color.
  15752. * @param allow4Char will shorten hex value to 4 char if possible
  15753. */
  15754. toHex8(allow4Char = false) {
  15755. return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
  15756. }
  15757. /**
  15758. * Returns the hex 8 value of the color -with a # prefixed.
  15759. * @param allow4Char will shorten hex value to 4 char if possible
  15760. */
  15761. toHex8String(allow4Char = false) {
  15762. return "#" + this.toHex8(allow4Char);
  15763. }
  15764. /**
  15765. * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
  15766. * @param allowShortChar will shorten hex value to 3 or 4 char if possible
  15767. */
  15768. toHexShortString(allowShortChar = false) {
  15769. return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
  15770. }
  15771. /**
  15772. * Returns the object as a RGBA object.
  15773. */
  15774. toRgb() {
  15775. return {
  15776. r: Math.round(this.r),
  15777. g: Math.round(this.g),
  15778. b: Math.round(this.b),
  15779. a: this.a
  15780. };
  15781. }
  15782. /**
  15783. * Returns the RGBA values interpolated into a string with the following format:
  15784. * "RGBA(xxx, xxx, xxx, xx)".
  15785. */
  15786. toRgbString() {
  15787. const r = Math.round(this.r);
  15788. const g = Math.round(this.g);
  15789. const b = Math.round(this.b);
  15790. return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;
  15791. }
  15792. /**
  15793. * Returns the object as a RGBA object.
  15794. */
  15795. toPercentageRgb() {
  15796. const fmt = (x) => `${Math.round(bound01(x, 255) * 100)}%`;
  15797. return {
  15798. r: fmt(this.r),
  15799. g: fmt(this.g),
  15800. b: fmt(this.b),
  15801. a: this.a
  15802. };
  15803. }
  15804. /**
  15805. * Returns the RGBA relative values interpolated into a string
  15806. */
  15807. toPercentageRgbString() {
  15808. const rnd = (x) => Math.round(bound01(x, 255) * 100);
  15809. return this.a === 1 ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)` : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;
  15810. }
  15811. toCmyk() {
  15812. return { ...rgbToCmyk(this.r, this.g, this.b) };
  15813. }
  15814. toCmykString() {
  15815. const { c, m, y, k } = rgbToCmyk(this.r, this.g, this.b);
  15816. return `cmyk(${c}, ${m}, ${y}, ${k})`;
  15817. }
  15818. /**
  15819. * The 'real' name of the color -if there is one.
  15820. */
  15821. toName() {
  15822. if (this.a === 0) return "transparent";
  15823. if (this.a < 1) return false;
  15824. const hex = "#" + rgbToHex(this.r, this.g, this.b, false);
  15825. for (const [key, value] of Object.entries(names)) if (hex === value) return key;
  15826. return false;
  15827. }
  15828. toString(format) {
  15829. const formatSet = Boolean(format);
  15830. format = format ?? this.format;
  15831. let formattedString = false;
  15832. const hasAlpha = this.a < 1 && this.a >= 0;
  15833. if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
  15834. if (format === "name" && this.a === 0) return this.toName();
  15835. return this.toRgbString();
  15836. }
  15837. if (format === "rgb") formattedString = this.toRgbString();
  15838. if (format === "prgb") formattedString = this.toPercentageRgbString();
  15839. if (format === "hex" || format === "hex6") formattedString = this.toHexString();
  15840. if (format === "hex3") formattedString = this.toHexString(true);
  15841. if (format === "hex4") formattedString = this.toHex8String(true);
  15842. if (format === "hex8") formattedString = this.toHex8String();
  15843. if (format === "name") formattedString = this.toName();
  15844. if (format === "hsl") formattedString = this.toHslString();
  15845. if (format === "hsv") formattedString = this.toHsvString();
  15846. if (format === "cmyk") formattedString = this.toCmykString();
  15847. return formattedString || this.toHexString();
  15848. }
  15849. toNumber() {
  15850. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  15851. }
  15852. clone() {
  15853. return new TinyColor(this.toString());
  15854. }
  15855. /**
  15856. * Lighten the color a given amount. Providing 100 will always return white.
  15857. * @param amount - valid between 1-100
  15858. */
  15859. lighten(amount = 10) {
  15860. const hsl = this.toHsl();
  15861. hsl.l += amount / 100;
  15862. hsl.l = clamp01(hsl.l);
  15863. return new TinyColor(hsl);
  15864. }
  15865. /**
  15866. * Brighten the color a given amount, from 0 to 100.
  15867. * @param amount - valid between 1-100
  15868. */
  15869. brighten(amount = 10) {
  15870. const rgb = this.toRgb();
  15871. rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
  15872. rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
  15873. rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
  15874. return new TinyColor(rgb);
  15875. }
  15876. /**
  15877. * Darken the color a given amount, from 0 to 100.
  15878. * Providing 100 will always return black.
  15879. * @param amount - valid between 1-100
  15880. */
  15881. darken(amount = 10) {
  15882. const hsl = this.toHsl();
  15883. hsl.l -= amount / 100;
  15884. hsl.l = clamp01(hsl.l);
  15885. return new TinyColor(hsl);
  15886. }
  15887. /**
  15888. * Mix the color with pure white, from 0 to 100.
  15889. * Providing 0 will do nothing, providing 100 will always return white.
  15890. * @param amount - valid between 1-100
  15891. */
  15892. tint(amount = 10) {
  15893. return this.mix("white", amount);
  15894. }
  15895. /**
  15896. * Mix the color with pure black, from 0 to 100.
  15897. * Providing 0 will do nothing, providing 100 will always return black.
  15898. * @param amount - valid between 1-100
  15899. */
  15900. shade(amount = 10) {
  15901. return this.mix("black", amount);
  15902. }
  15903. /**
  15904. * Desaturate the color a given amount, from 0 to 100.
  15905. * Providing 100 will is the same as calling greyscale
  15906. * @param amount - valid between 1-100
  15907. */
  15908. desaturate(amount = 10) {
  15909. const hsl = this.toHsl();
  15910. hsl.s -= amount / 100;
  15911. hsl.s = clamp01(hsl.s);
  15912. return new TinyColor(hsl);
  15913. }
  15914. /**
  15915. * Saturate the color a given amount, from 0 to 100.
  15916. * @param amount - valid between 1-100
  15917. */
  15918. saturate(amount = 10) {
  15919. const hsl = this.toHsl();
  15920. hsl.s += amount / 100;
  15921. hsl.s = clamp01(hsl.s);
  15922. return new TinyColor(hsl);
  15923. }
  15924. /**
  15925. * Completely desaturates a color into greyscale.
  15926. * Same as calling `desaturate(100)`
  15927. */
  15928. greyscale() {
  15929. return this.desaturate(100);
  15930. }
  15931. /**
  15932. * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  15933. * Values outside of this range will be wrapped into this range.
  15934. */
  15935. spin(amount) {
  15936. const hsl = this.toHsl();
  15937. const hue = (hsl.h + amount) % 360;
  15938. hsl.h = hue < 0 ? 360 + hue : hue;
  15939. return new TinyColor(hsl);
  15940. }
  15941. /**
  15942. * Mix the current color a given amount with another color, from 0 to 100.
  15943. * 0 means no mixing (return current color).
  15944. */
  15945. mix(color, amount = 50) {
  15946. const rgb1 = this.toRgb();
  15947. const rgb2 = new TinyColor(color).toRgb();
  15948. const p = amount / 100;
  15949. return new TinyColor({
  15950. r: (rgb2.r - rgb1.r) * p + rgb1.r,
  15951. g: (rgb2.g - rgb1.g) * p + rgb1.g,
  15952. b: (rgb2.b - rgb1.b) * p + rgb1.b,
  15953. a: (rgb2.a - rgb1.a) * p + rgb1.a
  15954. });
  15955. }
  15956. analogous(results = 6, slices = 30) {
  15957. const hsl = this.toHsl();
  15958. const part = 360 / slices;
  15959. const ret = [this];
  15960. for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
  15961. hsl.h = (hsl.h + part) % 360;
  15962. ret.push(new TinyColor(hsl));
  15963. }
  15964. return ret;
  15965. }
  15966. /**
  15967. * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
  15968. */
  15969. complement() {
  15970. const hsl = this.toHsl();
  15971. hsl.h = (hsl.h + 180) % 360;
  15972. return new TinyColor(hsl);
  15973. }
  15974. monochromatic(results = 6) {
  15975. const hsv = this.toHsv();
  15976. const { h } = hsv;
  15977. const { s } = hsv;
  15978. let { v } = hsv;
  15979. const res = [];
  15980. const modification = 1 / results;
  15981. while (results--) {
  15982. res.push(new TinyColor({
  15983. h,
  15984. s,
  15985. v
  15986. }));
  15987. v = (v + modification) % 1;
  15988. }
  15989. return res;
  15990. }
  15991. splitcomplement() {
  15992. const hsl = this.toHsl();
  15993. const { h } = hsl;
  15994. return [
  15995. this,
  15996. new TinyColor({
  15997. h: (h + 72) % 360,
  15998. s: hsl.s,
  15999. l: hsl.l
  16000. }),
  16001. new TinyColor({
  16002. h: (h + 216) % 360,
  16003. s: hsl.s,
  16004. l: hsl.l
  16005. })
  16006. ];
  16007. }
  16008. /**
  16009. * Compute how the color would appear on a background
  16010. */
  16011. onBackground(background) {
  16012. const fg = this.toRgb();
  16013. const bg = new TinyColor(background).toRgb();
  16014. const alpha = fg.a + bg.a * (1 - fg.a);
  16015. return new TinyColor({
  16016. r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
  16017. g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
  16018. b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
  16019. a: alpha
  16020. });
  16021. }
  16022. /**
  16023. * Alias for `polyad(3)`
  16024. */
  16025. triad() {
  16026. return this.polyad(3);
  16027. }
  16028. /**
  16029. * Alias for `polyad(4)`
  16030. */
  16031. tetrad() {
  16032. return this.polyad(4);
  16033. }
  16034. /**
  16035. * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
  16036. * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
  16037. */
  16038. polyad(n) {
  16039. const hsl = this.toHsl();
  16040. const { h } = hsl;
  16041. const result = [this];
  16042. const increment = 360 / n;
  16043. for (let i = 1; i < n; i++) result.push(new TinyColor({
  16044. h: (h + i * increment) % 360,
  16045. s: hsl.s,
  16046. l: hsl.l
  16047. }));
  16048. return result;
  16049. }
  16050. /**
  16051. * compare color vs current color
  16052. */
  16053. equals(color) {
  16054. const comparedColor = new TinyColor(color);
  16055. /**
  16056. * RGB and CMYK do not have the same color gamut, so a CMYK conversion will never be 100%.
  16057. * This means we need to compare CMYK to CMYK to ensure accuracy of the equals function.
  16058. */
  16059. if (this.format === "cmyk" || comparedColor.format === "cmyk") return this.toCmykString() === comparedColor.toCmykString();
  16060. return this.toRgbString() === comparedColor.toRgbString();
  16061. }
  16062. };
  16063. //#endregion
  16064. //#region node_modules/element-plus/es/components/button/src/button-custom.mjs
  16065. function darken(color, amount = 20) {
  16066. return color.mix("#141414", amount).toString();
  16067. }
  16068. function useButtonCustomStyle(props) {
  16069. const _disabled = useFormDisabled();
  16070. const ns = useNamespace("button");
  16071. return computed(() => {
  16072. let styles = {};
  16073. let buttonColor = props.color;
  16074. if (buttonColor) {
  16075. const match = buttonColor.match(/var\((.*?)\)/);
  16076. if (match) buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]);
  16077. const color = new TinyColor(buttonColor);
  16078. const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
  16079. if (props.plain) {
  16080. styles = ns.cssVarBlock({
  16081. "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
  16082. "text-color": buttonColor,
  16083. "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
  16084. "hover-text-color": `var(${ns.cssVarName("color-white")})`,
  16085. "hover-bg-color": buttonColor,
  16086. "hover-border-color": buttonColor,
  16087. "active-bg-color": activeBgColor,
  16088. "active-text-color": `var(${ns.cssVarName("color-white")})`,
  16089. "active-border-color": activeBgColor
  16090. });
  16091. if (_disabled.value) {
  16092. styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
  16093. styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
  16094. styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
  16095. }
  16096. } else {
  16097. const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
  16098. const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
  16099. styles = ns.cssVarBlock({
  16100. "bg-color": buttonColor,
  16101. "text-color": textColor,
  16102. "border-color": buttonColor,
  16103. "hover-bg-color": hoverBgColor,
  16104. "hover-text-color": textColor,
  16105. "hover-border-color": hoverBgColor,
  16106. "active-bg-color": activeBgColor,
  16107. "active-border-color": activeBgColor
  16108. });
  16109. if (_disabled.value) {
  16110. const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
  16111. styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
  16112. styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
  16113. styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
  16114. }
  16115. }
  16116. }
  16117. return styles;
  16118. });
  16119. }
  16120. //#endregion
  16121. //#region node_modules/element-plus/es/components/button/src/button2.mjs
  16122. var button_default$1 = /* @__PURE__ */ defineComponent({
  16123. name: "ElButton",
  16124. __name: "button",
  16125. props: buttonProps,
  16126. emits: buttonEmits,
  16127. setup(__props, { expose: __expose, emit: __emit }) {
  16128. const props = __props;
  16129. const emit = __emit;
  16130. const buttonStyle = useButtonCustomStyle(props);
  16131. const ns = useNamespace("button");
  16132. const { _ref, _size, _type, _disabled, _props, _plain, _round, _text, _dashed, shouldAddSpace, handleClick } = useButton(props, emit);
  16133. const buttonKls = computed(() => [
  16134. ns.b(),
  16135. ns.m(_type.value),
  16136. ns.m(_size.value),
  16137. ns.is("disabled", _disabled.value),
  16138. ns.is("loading", props.loading),
  16139. ns.is("plain", _plain.value),
  16140. ns.is("round", _round.value),
  16141. ns.is("circle", props.circle),
  16142. ns.is("text", _text.value),
  16143. ns.is("dashed", _dashed.value),
  16144. ns.is("link", props.link),
  16145. ns.is("has-bg", props.bg)
  16146. ]);
  16147. __expose({
  16148. ref: _ref,
  16149. size: _size,
  16150. type: _type,
  16151. disabled: _disabled,
  16152. shouldAddSpace
  16153. });
  16154. return (_ctx, _cache) => {
  16155. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({
  16156. ref_key: "_ref",
  16157. ref: _ref
  16158. }, unref(_props), {
  16159. class: buttonKls.value,
  16160. style: unref(buttonStyle),
  16161. onClick: unref(handleClick)
  16162. }), {
  16163. default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
  16164. key: 1,
  16165. class: normalizeClass(unref(ns).is("loading"))
  16166. }, {
  16167. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.loadingIcon)))]),
  16168. _: 1
  16169. }, 8, ["class"]))], 64)) : __props.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  16170. default: withCtx(() => [__props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
  16171. _: 3
  16172. })) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  16173. key: 2,
  16174. class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
  16175. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
  16176. _: 3
  16177. }, 16, [
  16178. "class",
  16179. "style",
  16180. "onClick"
  16181. ]);
  16182. };
  16183. }
  16184. });
  16185. //#endregion
  16186. //#region node_modules/element-plus/es/components/button/src/button-group2.mjs
  16187. var button_group_default = /* @__PURE__ */ defineComponent({
  16188. name: "ElButtonGroup",
  16189. __name: "button-group",
  16190. props: {
  16191. size: buttonProps.size,
  16192. type: buttonProps.type,
  16193. direction: {
  16194. type: definePropType(String),
  16195. values: ["horizontal", "vertical"],
  16196. default: "horizontal"
  16197. }
  16198. },
  16199. setup(__props) {
  16200. const props = __props;
  16201. provide(buttonGroupContextKey, reactive({
  16202. size: toRef(props, "size"),
  16203. type: toRef(props, "type")
  16204. }));
  16205. const ns = useNamespace("button");
  16206. return (_ctx, _cache) => {
  16207. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)]) }, [renderSlot(_ctx.$slots, "default")], 2);
  16208. };
  16209. }
  16210. });
  16211. //#endregion
  16212. //#region node_modules/element-plus/es/components/button/index.mjs
  16213. var ElButton = withInstall(button_default$1, { ButtonGroup: button_group_default });
  16214. var ElButtonGroup = withNoopInstall(button_group_default);
  16215. //#endregion
  16216. //#region node_modules/element-plus/es/components/calendar/src/calendar.mjs
  16217. var isValidRange$1 = (range) => isArray$1(range) && range.length === 2 && range.every((item) => isDate(item));
  16218. /**
  16219. * @deprecated Removed after 3.0.0, Use `CalendarProps` instead.
  16220. */
  16221. var calendarProps = buildProps({
  16222. modelValue: { type: Date },
  16223. range: {
  16224. type: definePropType(Array),
  16225. validator: isValidRange$1
  16226. },
  16227. controllerType: {
  16228. type: String,
  16229. values: ["button", "select"],
  16230. default: "button"
  16231. },
  16232. formatter: { type: definePropType(Function) }
  16233. });
  16234. var calendarEmits = {
  16235. [UPDATE_MODEL_EVENT]: (value) => isDate(value),
  16236. [INPUT_EVENT]: (value) => isDate(value)
  16237. };
  16238. //#endregion
  16239. //#region node_modules/element-plus/es/components/time-picker/src/constants.mjs
  16240. var timeUnits = [
  16241. "hours",
  16242. "minutes",
  16243. "seconds"
  16244. ];
  16245. var PICKER_BASE_INJECTION_KEY = "EP_PICKER_BASE";
  16246. var PICKER_POPPER_OPTIONS_INJECTION_KEY = "ElPopperOptions";
  16247. var ROOT_COMMON_PICKER_INJECTION_KEY = Symbol("commonPickerContextKey");
  16248. var DEFAULT_FORMATS_TIME = "HH:mm:ss";
  16249. var DEFAULT_FORMATS_DATE = "YYYY-MM-DD";
  16250. var DEFAULT_FORMATS_DATEPICKER = {
  16251. date: DEFAULT_FORMATS_DATE,
  16252. dates: DEFAULT_FORMATS_DATE,
  16253. week: "gggg[w]ww",
  16254. year: "YYYY",
  16255. years: "YYYY",
  16256. month: "YYYY-MM",
  16257. months: "YYYY-MM",
  16258. datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,
  16259. monthrange: "YYYY-MM",
  16260. yearrange: "YYYY",
  16261. daterange: DEFAULT_FORMATS_DATE,
  16262. datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`
  16263. };
  16264. //#endregion
  16265. //#region node_modules/element-plus/es/components/time-picker/src/utils.mjs
  16266. var import_dayjs_min = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  16267. (function(t, e) {
  16268. "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
  16269. })(exports, (function() {
  16270. "use strict";
  16271. var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|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, M = {
  16272. name: "en",
  16273. weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  16274. months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  16275. ordinal: function(t) {
  16276. var e = [
  16277. "th",
  16278. "st",
  16279. "nd",
  16280. "rd"
  16281. ], n = t % 100;
  16282. return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
  16283. }
  16284. }, m = function(t, e, n) {
  16285. var r = String(t);
  16286. return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
  16287. }, v = {
  16288. s: m,
  16289. z: function(t) {
  16290. var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
  16291. return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
  16292. },
  16293. m: function t(e, n) {
  16294. if (e.date() < n.date()) return -t(n, e);
  16295. var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);
  16296. return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
  16297. },
  16298. a: function(t) {
  16299. return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
  16300. },
  16301. p: function(t) {
  16302. return {
  16303. M: c,
  16304. y: h,
  16305. w: o,
  16306. d: a,
  16307. D: d,
  16308. h: u,
  16309. m: s,
  16310. s: i,
  16311. ms: r,
  16312. Q: f
  16313. }[t] || String(t || "").toLowerCase().replace(/s$/, "");
  16314. },
  16315. u: function(t) {
  16316. return void 0 === t;
  16317. }
  16318. }, g = "en", D = {};
  16319. D[g] = M;
  16320. var p = "$isDayjsObject", S = function(t) {
  16321. return t instanceof _ || !(!t || !t[p]);
  16322. }, w = function t(e, n, r) {
  16323. var i;
  16324. if (!e) return g;
  16325. if ("string" == typeof e) {
  16326. var s = e.toLowerCase();
  16327. D[s] && (i = s), n && (D[s] = n, i = s);
  16328. var u = e.split("-");
  16329. if (!i && u.length > 1) return t(u[0]);
  16330. } else {
  16331. var a = e.name;
  16332. D[a] = e, i = a;
  16333. }
  16334. return !r && i && (g = i), i || !r && g;
  16335. }, O = function(t, e) {
  16336. if (S(t)) return t.clone();
  16337. var n = "object" == typeof e ? e : {};
  16338. return n.date = t, n.args = arguments, new _(n);
  16339. }, b = v;
  16340. b.l = w, b.i = S, b.w = function(t, e) {
  16341. return O(t, {
  16342. locale: e.$L,
  16343. utc: e.$u,
  16344. x: e.$x,
  16345. $offset: e.$offset
  16346. });
  16347. };
  16348. var _ = function() {
  16349. function M(t) {
  16350. this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;
  16351. }
  16352. var m = M.prototype;
  16353. return m.parse = function(t) {
  16354. this.$d = function(t) {
  16355. var e = t.date, n = t.utc;
  16356. if (null === e) return /* @__PURE__ */ new Date(NaN);
  16357. if (b.u(e)) return /* @__PURE__ */ new Date();
  16358. if (e instanceof Date) return new Date(e);
  16359. if ("string" == typeof e && !/Z$/i.test(e)) {
  16360. var r = e.match($);
  16361. if (r) {
  16362. var i = r[2] - 1 || 0, s = (r[7] || "0").substring(0, 3);
  16363. return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
  16364. }
  16365. }
  16366. return new Date(e);
  16367. }(t), this.init();
  16368. }, m.init = function() {
  16369. var t = this.$d;
  16370. this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
  16371. }, m.$utils = function() {
  16372. return b;
  16373. }, m.isValid = function() {
  16374. return !(this.$d.toString() === l);
  16375. }, m.isSame = function(t, e) {
  16376. var n = O(t);
  16377. return this.startOf(e) <= n && n <= this.endOf(e);
  16378. }, m.isAfter = function(t, e) {
  16379. return O(t) < this.startOf(e);
  16380. }, m.isBefore = function(t, e) {
  16381. return this.endOf(e) < O(t);
  16382. }, m.$g = function(t, e, n) {
  16383. return b.u(t) ? this[e] : this.set(n, t);
  16384. }, m.unix = function() {
  16385. return Math.floor(this.valueOf() / 1e3);
  16386. }, m.valueOf = function() {
  16387. return this.$d.getTime();
  16388. }, m.startOf = function(t, e) {
  16389. var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {
  16390. var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
  16391. return r ? i : i.endOf(a);
  16392. }, $ = function(t, e) {
  16393. return b.w(n.toDate()[t].apply(n.toDate("s"), (r ? [
  16394. 0,
  16395. 0,
  16396. 0,
  16397. 0
  16398. ] : [
  16399. 23,
  16400. 59,
  16401. 59,
  16402. 999
  16403. ]).slice(e)), n);
  16404. }, y = this.$W, M = this.$M, m = this.$D, v = "set" + (this.$u ? "UTC" : "");
  16405. switch (f) {
  16406. case h: return r ? l(1, 0) : l(31, 11);
  16407. case c: return r ? l(1, M) : l(0, M + 1);
  16408. case o:
  16409. var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;
  16410. return l(r ? m - D : m + (6 - D), M);
  16411. case a:
  16412. case d: return $(v + "Hours", 0);
  16413. case u: return $(v + "Minutes", 1);
  16414. case s: return $(v + "Seconds", 2);
  16415. case i: return $(v + "Milliseconds", 3);
  16416. default: return this.clone();
  16417. }
  16418. }, m.endOf = function(t) {
  16419. return this.startOf(t, !1);
  16420. }, m.$set = function(t, e) {
  16421. var n, o = b.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;
  16422. if (o === c || o === h) {
  16423. var y = this.clone().set(d, 1);
  16424. y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
  16425. } else l && this.$d[l]($);
  16426. return this.init(), this;
  16427. }, m.set = function(t, e) {
  16428. return this.clone().$set(t, e);
  16429. }, m.get = function(t) {
  16430. return this[b.p(t)]();
  16431. }, m.add = function(r, f) {
  16432. var d, l = this;
  16433. r = Number(r);
  16434. var $ = b.p(f), y = function(t) {
  16435. var e = O(l);
  16436. return b.w(e.date(e.date() + Math.round(t * r)), l);
  16437. };
  16438. if ($ === c) return this.set(c, this.$M + r);
  16439. if ($ === h) return this.set(h, this.$y + r);
  16440. if ($ === a) return y(1);
  16441. if ($ === o) return y(7);
  16442. var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;
  16443. return b.w(m, this);
  16444. }, m.subtract = function(t, e) {
  16445. return this.add(-1 * t, e);
  16446. }, m.format = function(t) {
  16447. var e = this, n = this.$locale();
  16448. if (!this.isValid()) return n.invalidDate || l;
  16449. var r = t || "YYYY-MM-DDTHH:mm:ssZ", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {
  16450. return t && (t[n] || t(e, r)) || i[n].slice(0, s);
  16451. }, d = function(t) {
  16452. return b.s(s % 12 || 12, t, "0");
  16453. }, $ = f || function(t, e, n) {
  16454. var r = t < 12 ? "AM" : "PM";
  16455. return n ? r.toLowerCase() : r;
  16456. };
  16457. return r.replace(y, (function(t, r) {
  16458. return r || function(t) {
  16459. switch (t) {
  16460. case "YY": return String(e.$y).slice(-2);
  16461. case "YYYY": return b.s(e.$y, 4, "0");
  16462. case "M": return a + 1;
  16463. case "MM": return b.s(a + 1, 2, "0");
  16464. case "MMM": return h(n.monthsShort, a, c, 3);
  16465. case "MMMM": return h(c, a);
  16466. case "D": return e.$D;
  16467. case "DD": return b.s(e.$D, 2, "0");
  16468. case "d": return String(e.$W);
  16469. case "dd": return h(n.weekdaysMin, e.$W, o, 2);
  16470. case "ddd": return h(n.weekdaysShort, e.$W, o, 3);
  16471. case "dddd": return o[e.$W];
  16472. case "H": return String(s);
  16473. case "HH": return b.s(s, 2, "0");
  16474. case "h": return d(1);
  16475. case "hh": return d(2);
  16476. case "a": return $(s, u, !0);
  16477. case "A": return $(s, u, !1);
  16478. case "m": return String(u);
  16479. case "mm": return b.s(u, 2, "0");
  16480. case "s": return String(e.$s);
  16481. case "ss": return b.s(e.$s, 2, "0");
  16482. case "SSS": return b.s(e.$ms, 3, "0");
  16483. case "Z": return i;
  16484. }
  16485. return null;
  16486. }(t) || i.replace(":", "");
  16487. }));
  16488. }, m.utcOffset = function() {
  16489. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  16490. }, m.diff = function(r, d, l) {
  16491. var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {
  16492. return b.m(y, m);
  16493. };
  16494. switch (M) {
  16495. case h:
  16496. $ = D() / 12;
  16497. break;
  16498. case c:
  16499. $ = D();
  16500. break;
  16501. case f:
  16502. $ = D() / 3;
  16503. break;
  16504. case o:
  16505. $ = (g - v) / 6048e5;
  16506. break;
  16507. case a:
  16508. $ = (g - v) / 864e5;
  16509. break;
  16510. case u:
  16511. $ = g / n;
  16512. break;
  16513. case s:
  16514. $ = g / e;
  16515. break;
  16516. case i:
  16517. $ = g / t;
  16518. break;
  16519. default: $ = g;
  16520. }
  16521. return l ? $ : b.a($);
  16522. }, m.daysInMonth = function() {
  16523. return this.endOf(c).$D;
  16524. }, m.$locale = function() {
  16525. return D[this.$L];
  16526. }, m.locale = function(t, e) {
  16527. if (!t) return this.$L;
  16528. var n = this.clone(), r = w(t, e, !0);
  16529. return r && (n.$L = r), n;
  16530. }, m.clone = function() {
  16531. return b.w(this.$d, this);
  16532. }, m.toDate = function() {
  16533. return new Date(this.valueOf());
  16534. }, m.toJSON = function() {
  16535. return this.isValid() ? this.toISOString() : null;
  16536. }, m.toISOString = function() {
  16537. return this.$d.toISOString();
  16538. }, m.toString = function() {
  16539. return this.$d.toUTCString();
  16540. }, M;
  16541. }(), k = _.prototype;
  16542. return O.prototype = k, [
  16543. ["$ms", r],
  16544. ["$s", i],
  16545. ["$m", s],
  16546. ["$H", u],
  16547. ["$W", a],
  16548. ["$M", c],
  16549. ["$y", h],
  16550. ["$D", d]
  16551. ].forEach((function(t) {
  16552. k[t[1]] = function(e) {
  16553. return this.$g(e, t[0], t[1]);
  16554. };
  16555. })), O.extend = function(t, e) {
  16556. return t.$i || (t(e, _, O), t.$i = !0), O;
  16557. }, O.locale = w, O.isDayjs = S, O.unix = function(t) {
  16558. return O(1e3 * t);
  16559. }, O.en = D[g], O.Ls = D, O.p = {}, O;
  16560. }));
  16561. })))(), 1);
  16562. var buildTimeList = (value, bound) => {
  16563. return [
  16564. value > 0 ? value - 1 : void 0,
  16565. value,
  16566. value < bound ? value + 1 : void 0
  16567. ];
  16568. };
  16569. var rangeArr = (n) => Array.from(Array.from({ length: n }).keys());
  16570. var extractDateFormat = (format) => {
  16571. return format.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
  16572. };
  16573. var extractTimeFormat = (format) => {
  16574. return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim();
  16575. };
  16576. var dateEquals = function(a, b) {
  16577. const aIsDate = isDate(a);
  16578. const bIsDate = isDate(b);
  16579. if (aIsDate && bIsDate) return a.getTime() === b.getTime();
  16580. if (!aIsDate && !bIsDate) return a === b;
  16581. return false;
  16582. };
  16583. var valueEquals = function(a, b) {
  16584. const aIsArray = isArray$1(a);
  16585. const bIsArray = isArray$1(b);
  16586. if (aIsArray && bIsArray) {
  16587. if (a.length !== b.length) return false;
  16588. return a.every((item, index) => dateEquals(item, b[index]));
  16589. }
  16590. if (!aIsArray && !bIsArray) return dateEquals(a, b);
  16591. return false;
  16592. };
  16593. var parseDate = function(date, format, lang) {
  16594. const day = isEmpty(format) || format === "x" ? (0, import_dayjs_min.default)(date).locale(lang) : (0, import_dayjs_min.default)(date, format).locale(lang);
  16595. return day.isValid() ? day : void 0;
  16596. };
  16597. var formatter = function(date, format, lang) {
  16598. if (isEmpty(format)) return date;
  16599. if (format === "x") return +date;
  16600. return (0, import_dayjs_min.default)(date).locale(lang).format(format);
  16601. };
  16602. var makeList = (total, method) => {
  16603. const arr = [];
  16604. const disabledArr = method?.();
  16605. for (let i = 0; i < total; i++) arr.push(disabledArr?.includes(i) ?? false);
  16606. return arr;
  16607. };
  16608. var dayOrDaysToDate = (dayOrDays) => {
  16609. return isArray$1(dayOrDays) ? dayOrDays.map((d) => d.toDate()) : dayOrDays.toDate();
  16610. };
  16611. //#endregion
  16612. //#region node_modules/element-plus/es/components/time-picker/src/props/shared.mjs
  16613. var disabledTimeListsProps = buildProps({
  16614. disabledHours: { type: definePropType(Function) },
  16615. disabledMinutes: { type: definePropType(Function) },
  16616. disabledSeconds: { type: definePropType(Function) }
  16617. });
  16618. var timePanelSharedProps = buildProps({
  16619. visible: Boolean,
  16620. actualVisible: {
  16621. type: Boolean,
  16622. default: void 0
  16623. },
  16624. format: {
  16625. type: String,
  16626. default: ""
  16627. }
  16628. });
  16629. //#endregion
  16630. //#region node_modules/element-plus/es/components/time-picker/src/common/props.mjs
  16631. var timePickerDefaultProps = buildProps({
  16632. automaticDropdown: {
  16633. type: Boolean,
  16634. default: true
  16635. },
  16636. id: { type: definePropType([Array, String]) },
  16637. name: { type: definePropType([Array, String]) },
  16638. popperClass: useTooltipContentProps.popperClass,
  16639. popperStyle: useTooltipContentProps.popperStyle,
  16640. format: String,
  16641. valueFormat: String,
  16642. dateFormat: String,
  16643. timeFormat: String,
  16644. type: {
  16645. type: String,
  16646. default: ""
  16647. },
  16648. clearable: {
  16649. type: Boolean,
  16650. default: true
  16651. },
  16652. clearIcon: {
  16653. type: definePropType([String, Object]),
  16654. default: circle_close_default
  16655. },
  16656. editable: {
  16657. type: Boolean,
  16658. default: true
  16659. },
  16660. saveOnBlur: {
  16661. type: Boolean,
  16662. default: true
  16663. },
  16664. prefixIcon: {
  16665. type: definePropType([String, Object]),
  16666. default: ""
  16667. },
  16668. size: useSizeProp,
  16669. readonly: Boolean,
  16670. disabled: {
  16671. type: Boolean,
  16672. default: void 0
  16673. },
  16674. placeholder: {
  16675. type: String,
  16676. default: ""
  16677. },
  16678. popperOptions: {
  16679. type: definePropType(Object),
  16680. default: () => ({})
  16681. },
  16682. modelValue: {
  16683. type: definePropType([
  16684. Date,
  16685. Array,
  16686. String,
  16687. Number
  16688. ]),
  16689. default: ""
  16690. },
  16691. rangeSeparator: {
  16692. type: String,
  16693. default: "-"
  16694. },
  16695. startPlaceholder: String,
  16696. endPlaceholder: String,
  16697. defaultValue: { type: definePropType([Date, Array]) },
  16698. defaultTime: { type: definePropType([Date, Array]) },
  16699. isRange: Boolean,
  16700. ...disabledTimeListsProps,
  16701. disabledDate: { type: Function },
  16702. cellClassName: { type: Function },
  16703. shortcuts: {
  16704. type: Array,
  16705. default: () => []
  16706. },
  16707. arrowControl: Boolean,
  16708. tabindex: {
  16709. type: definePropType([String, Number]),
  16710. default: 0
  16711. },
  16712. validateEvent: {
  16713. type: Boolean,
  16714. default: true
  16715. },
  16716. unlinkPanels: Boolean,
  16717. placement: {
  16718. type: definePropType(String),
  16719. values: Ee,
  16720. default: "bottom"
  16721. },
  16722. fallbackPlacements: {
  16723. type: definePropType(Array),
  16724. default: [
  16725. "bottom",
  16726. "top",
  16727. "right",
  16728. "left"
  16729. ]
  16730. },
  16731. ...useEmptyValuesProps,
  16732. ...useAriaProps(["ariaLabel"]),
  16733. showNow: {
  16734. type: Boolean,
  16735. default: true
  16736. },
  16737. showConfirm: {
  16738. type: Boolean,
  16739. default: true
  16740. },
  16741. showFooter: {
  16742. type: Boolean,
  16743. default: true
  16744. },
  16745. showWeekNumber: Boolean
  16746. });
  16747. var timePickerRangeTriggerProps = buildProps({
  16748. id: { type: definePropType(Array) },
  16749. name: { type: definePropType(Array) },
  16750. modelValue: { type: definePropType([Array, String]) },
  16751. startPlaceholder: String,
  16752. endPlaceholder: String,
  16753. disabled: Boolean
  16754. });
  16755. /**
  16756. * @deprecated Use `timePickerRangeTriggerProps` instead. This will be removed in future versions.
  16757. */
  16758. var timePickerRngeTriggerProps = timePickerRangeTriggerProps;
  16759. //#endregion
  16760. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-common-picker.mjs
  16761. var useCommonPicker = (props, emit) => {
  16762. const { lang } = useLocale();
  16763. const pickerVisible = ref(false);
  16764. const pickerActualVisible = ref(false);
  16765. const userInput = ref(null);
  16766. const valueIsEmpty = computed(() => {
  16767. const { modelValue } = props;
  16768. return !modelValue || isArray$1(modelValue) && !modelValue.filter(Boolean).length;
  16769. });
  16770. const emitInput = (input) => {
  16771. if (!valueEquals(props.modelValue, input)) {
  16772. let formatted;
  16773. if (isArray$1(input)) formatted = input.map((item) => formatter(item, props.valueFormat, lang.value));
  16774. else if (input) formatted = formatter(input, props.valueFormat, lang.value);
  16775. emit(UPDATE_MODEL_EVENT, input ? formatted : input, lang.value);
  16776. }
  16777. };
  16778. const parsedValue = computed(() => {
  16779. let dayOrDays;
  16780. if (valueIsEmpty.value) {
  16781. if (pickerOptions.value.getDefaultValue) dayOrDays = pickerOptions.value.getDefaultValue();
  16782. } else if (isArray$1(props.modelValue)) dayOrDays = props.modelValue.map((d) => parseDate(d, props.valueFormat, lang.value));
  16783. else dayOrDays = parseDate(props.modelValue ?? "", props.valueFormat, lang.value);
  16784. if (pickerOptions.value.getRangeAvailableTime) {
  16785. const availableResult = pickerOptions.value.getRangeAvailableTime(dayOrDays);
  16786. if (!isEqual$1(availableResult, dayOrDays)) {
  16787. dayOrDays = availableResult;
  16788. if (!valueIsEmpty.value) emitInput(dayOrDaysToDate(dayOrDays));
  16789. }
  16790. }
  16791. if (isArray$1(dayOrDays) && dayOrDays.some((day) => !day)) dayOrDays = [];
  16792. return dayOrDays;
  16793. });
  16794. const pickerOptions = ref({});
  16795. const onSetPickerOption = (e) => {
  16796. pickerOptions.value[e[0]] = e[1];
  16797. pickerOptions.value.panelReady = true;
  16798. };
  16799. const onCalendarChange = (e) => {
  16800. emit("calendar-change", e);
  16801. };
  16802. const onPanelChange = (value, mode, view) => {
  16803. emit("panel-change", value, mode, view);
  16804. };
  16805. const onPick = (date = "", visible = false) => {
  16806. pickerVisible.value = visible;
  16807. let result;
  16808. if (isArray$1(date)) result = date.map((_) => _.toDate());
  16809. else result = date ? date.toDate() : date;
  16810. userInput.value = null;
  16811. emitInput(result);
  16812. };
  16813. return {
  16814. parsedValue,
  16815. pickerActualVisible,
  16816. pickerOptions,
  16817. pickerVisible,
  16818. userInput,
  16819. valueIsEmpty,
  16820. emitInput,
  16821. onCalendarChange,
  16822. onPanelChange,
  16823. onPick,
  16824. onSetPickerOption
  16825. };
  16826. };
  16827. //#endregion
  16828. //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.vue_vue_type_script_setup_true_lang.mjs
  16829. var _hoisted_1$71 = [
  16830. "id",
  16831. "name",
  16832. "placeholder",
  16833. "value",
  16834. "disabled"
  16835. ];
  16836. var _hoisted_2$40 = [
  16837. "id",
  16838. "name",
  16839. "placeholder",
  16840. "value",
  16841. "disabled"
  16842. ];
  16843. //#endregion
  16844. //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.mjs
  16845. var picker_range_trigger_default = /* @__PURE__ */ defineComponent({
  16846. name: "PickerRangeTrigger",
  16847. inheritAttrs: false,
  16848. __name: "picker-range-trigger",
  16849. props: timePickerRangeTriggerProps,
  16850. emits: [
  16851. "mouseenter",
  16852. "mouseleave",
  16853. "click",
  16854. "touchstart",
  16855. "focus",
  16856. "blur",
  16857. "startInput",
  16858. "endInput",
  16859. "startChange",
  16860. "endChange"
  16861. ],
  16862. setup(__props, { expose: __expose, emit: __emit }) {
  16863. const props = __props;
  16864. const emit = __emit;
  16865. const { formItem } = useFormItem();
  16866. const { inputId } = useFormItemInputId(reactive({ id: computed(() => props.id?.[0]) }), { formItemContext: formItem });
  16867. const attrs = useAttrs();
  16868. const nsDate = useNamespace("date");
  16869. const nsRange = useNamespace("range");
  16870. const inputRef = ref();
  16871. const endInputRef = ref();
  16872. const { wrapperRef, isFocused } = useFocusController(inputRef, { disabled: computed(() => props.disabled) });
  16873. const handleClick = (evt) => {
  16874. emit("click", evt);
  16875. };
  16876. const handleMouseEnter = (evt) => {
  16877. emit("mouseenter", evt);
  16878. };
  16879. const handleMouseLeave = (evt) => {
  16880. emit("mouseleave", evt);
  16881. };
  16882. const handleTouchStart = (evt) => {
  16883. emit("touchstart", evt);
  16884. };
  16885. const handleStartInput = (evt) => {
  16886. emit("startInput", evt);
  16887. };
  16888. const handleEndInput = (evt) => {
  16889. emit("endInput", evt);
  16890. };
  16891. const handleStartChange = (evt) => {
  16892. emit("startChange", evt);
  16893. };
  16894. const handleEndChange = (evt) => {
  16895. emit("endChange", evt);
  16896. };
  16897. const focus = () => {
  16898. inputRef.value?.focus();
  16899. };
  16900. const blur = () => {
  16901. inputRef.value?.blur();
  16902. endInputRef.value?.blur();
  16903. };
  16904. __expose({
  16905. focus,
  16906. blur
  16907. });
  16908. return (_ctx, _cache) => {
  16909. return openBlock(), createElementBlock("div", {
  16910. ref_key: "wrapperRef",
  16911. ref: wrapperRef,
  16912. class: normalizeClass([unref(nsDate).is("active", unref(isFocused)), _ctx.$attrs.class]),
  16913. style: normalizeStyle(_ctx.$attrs.style),
  16914. onClick: handleClick,
  16915. onMouseenter: handleMouseEnter,
  16916. onMouseleave: handleMouseLeave,
  16917. onTouchstartPassive: handleTouchStart
  16918. }, [
  16919. renderSlot(_ctx.$slots, "prefix"),
  16920. createBaseVNode("input", mergeProps(unref(attrs), {
  16921. id: unref(inputId),
  16922. ref_key: "inputRef",
  16923. ref: inputRef,
  16924. name: _ctx.name && _ctx.name[0],
  16925. placeholder: _ctx.startPlaceholder,
  16926. value: _ctx.modelValue && _ctx.modelValue[0],
  16927. class: unref(nsRange).b("input"),
  16928. disabled: _ctx.disabled,
  16929. onInput: handleStartInput,
  16930. onChange: handleStartChange
  16931. }), null, 16, _hoisted_1$71),
  16932. renderSlot(_ctx.$slots, "range-separator"),
  16933. createBaseVNode("input", mergeProps(unref(attrs), {
  16934. id: _ctx.id && _ctx.id[1],
  16935. ref_key: "endInputRef",
  16936. ref: endInputRef,
  16937. name: _ctx.name && _ctx.name[1],
  16938. placeholder: _ctx.endPlaceholder,
  16939. value: _ctx.modelValue && _ctx.modelValue[1],
  16940. class: unref(nsRange).b("input"),
  16941. disabled: _ctx.disabled,
  16942. onInput: handleEndInput,
  16943. onChange: handleEndChange
  16944. }), null, 16, _hoisted_2$40),
  16945. renderSlot(_ctx.$slots, "suffix")
  16946. ], 38);
  16947. };
  16948. }
  16949. });
  16950. //#endregion
  16951. //#region node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
  16952. var picker_default = /* @__PURE__ */ defineComponent({
  16953. name: "Picker",
  16954. __name: "picker",
  16955. props: timePickerDefaultProps,
  16956. emits: [
  16957. UPDATE_MODEL_EVENT,
  16958. CHANGE_EVENT,
  16959. "focus",
  16960. "blur",
  16961. "clear",
  16962. "calendar-change",
  16963. "panel-change",
  16964. "visible-change",
  16965. "keydown"
  16966. ],
  16967. setup(__props, { expose: __expose, emit: __emit }) {
  16968. const props = __props;
  16969. const emit = __emit;
  16970. const attrs = useAttrs$1();
  16971. const nsDate = useNamespace("date");
  16972. const nsInput = useNamespace("input");
  16973. const nsRange = useNamespace("range");
  16974. const { formItem } = useFormItem();
  16975. const elPopperOptions = inject(PICKER_POPPER_OPTIONS_INJECTION_KEY, {});
  16976. const emptyValues = useEmptyValues(props, null);
  16977. const refPopper = ref();
  16978. const inputRef = ref();
  16979. const valueOnOpen = ref(null);
  16980. let hasJustTabExitedInput = false;
  16981. const pickerDisabled = useFormDisabled();
  16982. const commonPicker = useCommonPicker(props, emit);
  16983. const { parsedValue, pickerActualVisible, userInput, pickerVisible, pickerOptions, valueIsEmpty, emitInput, onPick, onSetPickerOption, onCalendarChange, onPanelChange } = commonPicker;
  16984. const { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {
  16985. disabled: pickerDisabled,
  16986. beforeFocus() {
  16987. return props.readonly;
  16988. },
  16989. afterFocus() {
  16990. if (!props.automaticDropdown) return;
  16991. pickerVisible.value = true;
  16992. },
  16993. beforeBlur(event) {
  16994. return !hasJustTabExitedInput && refPopper.value?.isFocusInsideContent(event);
  16995. },
  16996. afterBlur() {
  16997. if (isTimePicker.value && !props.saveOnBlur) {
  16998. if (!valueIsEmpty.value) pickerOptions.value.handleCancel?.();
  16999. } else handleChange();
  17000. pickerVisible.value = false;
  17001. hasJustTabExitedInput = false;
  17002. props.validateEvent && formItem?.validate("blur").catch((err) => debugWarn(err));
  17003. }
  17004. });
  17005. const hovering = ref(false);
  17006. const rangeInputKls = computed(() => [
  17007. nsDate.b("editor"),
  17008. nsDate.bm("editor", props.type),
  17009. nsInput.e("wrapper"),
  17010. nsDate.is("disabled", pickerDisabled.value),
  17011. nsDate.is("active", pickerVisible.value),
  17012. nsRange.b("editor"),
  17013. pickerSize ? nsRange.bm("editor", pickerSize.value) : "",
  17014. attrs.class
  17015. ]);
  17016. const clearIconKls = computed(() => [
  17017. nsInput.e("icon"),
  17018. nsRange.e("close-icon"),
  17019. !showClearBtn.value ? nsRange.em("close-icon", "hidden") : ""
  17020. ]);
  17021. watch(pickerVisible, (val) => {
  17022. if (!val) {
  17023. userInput.value = null;
  17024. nextTick(() => {
  17025. emitChange(props.modelValue);
  17026. });
  17027. } else nextTick(() => {
  17028. if (val) valueOnOpen.value = props.modelValue;
  17029. });
  17030. });
  17031. const emitChange = (val, isClear) => {
  17032. if (isClear || !valueEquals(val, valueOnOpen.value)) {
  17033. emit(CHANGE_EVENT, val);
  17034. isClear && (valueOnOpen.value = val);
  17035. props.validateEvent && formItem?.validate("change").catch((err) => debugWarn(err));
  17036. }
  17037. };
  17038. const emitKeydown = (e) => {
  17039. emit("keydown", e);
  17040. };
  17041. const refInput = computed(() => {
  17042. if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
  17043. return [];
  17044. });
  17045. const setSelectionRange = (start, end, pos) => {
  17046. const _inputs = refInput.value;
  17047. if (!_inputs.length) return;
  17048. if (!pos || pos === "min") {
  17049. _inputs[0].setSelectionRange(start, end);
  17050. _inputs[0].focus();
  17051. } else if (pos === "max") {
  17052. _inputs[1].setSelectionRange(start, end);
  17053. _inputs[1].focus();
  17054. }
  17055. };
  17056. const onBeforeShow = () => {
  17057. pickerActualVisible.value = true;
  17058. };
  17059. const onShow = () => {
  17060. emit("visible-change", true);
  17061. };
  17062. const onHide = () => {
  17063. pickerActualVisible.value = false;
  17064. pickerVisible.value = false;
  17065. emit("visible-change", false);
  17066. };
  17067. const handleOpen = () => {
  17068. pickerVisible.value = true;
  17069. };
  17070. const handleClose = () => {
  17071. pickerVisible.value = false;
  17072. };
  17073. const displayValue = computed(() => {
  17074. const formattedValue = formatToString(parsedValue.value);
  17075. if (isArray$1(userInput.value)) return [userInput.value[0] || formattedValue && formattedValue[0] || "", userInput.value[1] || formattedValue && formattedValue[1] || ""];
  17076. else if (userInput.value !== null) return userInput.value;
  17077. if (isTimePicker.value && valueIsEmpty.value && !props.saveOnBlur) return "";
  17078. if (!isTimePicker.value && valueIsEmpty.value) return "";
  17079. if (!pickerVisible.value && valueIsEmpty.value) return "";
  17080. if (formattedValue) return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue;
  17081. return "";
  17082. });
  17083. const isTimeLikePicker = computed(() => props.type.includes("time"));
  17084. const isTimePicker = computed(() => props.type.startsWith("time"));
  17085. const isDatesPicker = computed(() => props.type === "dates");
  17086. const isMonthsPicker = computed(() => props.type === "months");
  17087. const isYearsPicker = computed(() => props.type === "years");
  17088. const triggerIcon = computed(() => props.prefixIcon || (isTimeLikePicker.value ? clock_default : calendar_default$1));
  17089. const showClearBtn = computed(() => props.clearable && !pickerDisabled.value && !props.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value));
  17090. const onClear = (event) => {
  17091. if (props.readonly || pickerDisabled.value) return;
  17092. if (showClearBtn.value) {
  17093. event?.stopPropagation();
  17094. if (pickerOptions.value.handleClear) pickerOptions.value.handleClear();
  17095. else emitInput(emptyValues.valueOnClear.value);
  17096. emitChange(emptyValues.valueOnClear.value, true);
  17097. onHide();
  17098. }
  17099. emit("clear");
  17100. };
  17101. const onMouseDownInput = async (event) => {
  17102. if (props.readonly || pickerDisabled.value) return;
  17103. if (event.target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
  17104. };
  17105. const onMouseEnter = () => {
  17106. if (props.readonly || pickerDisabled.value) return;
  17107. if (!valueIsEmpty.value && props.clearable) hovering.value = true;
  17108. };
  17109. const onMouseLeave = () => {
  17110. hovering.value = false;
  17111. };
  17112. const onTouchStartInput = (event) => {
  17113. if (props.readonly || pickerDisabled.value) return;
  17114. if (event.touches[0].target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
  17115. };
  17116. const isRangeInput = computed(() => {
  17117. return props.type.includes("range");
  17118. });
  17119. const pickerSize = useFormSize();
  17120. const popperEl = computed(() => unref(refPopper)?.popperRef?.contentRef);
  17121. const stophandle = onClickOutside(inputRef, (e) => {
  17122. const unrefedPopperEl = unref(popperEl);
  17123. const inputEl = unrefElement(inputRef);
  17124. if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl)) return;
  17125. pickerVisible.value = false;
  17126. });
  17127. onBeforeUnmount(() => {
  17128. stophandle?.();
  17129. });
  17130. const handleChange = () => {
  17131. if (isTimePicker.value && !props.saveOnBlur) return;
  17132. if (userInput.value) {
  17133. const value = parseUserInputToDayjs(displayValue.value);
  17134. if (value) {
  17135. if (isValidValue(value)) emitInput(dayOrDaysToDate(value));
  17136. userInput.value = null;
  17137. }
  17138. }
  17139. if (userInput.value === "") {
  17140. emitInput(emptyValues.valueOnClear.value);
  17141. emitChange(emptyValues.valueOnClear.value, true);
  17142. userInput.value = null;
  17143. }
  17144. };
  17145. const parseUserInputToDayjs = (value) => {
  17146. if (!value) return null;
  17147. return pickerOptions.value.parseUserInput(value);
  17148. };
  17149. const formatToString = (value) => {
  17150. if (!value) return null;
  17151. return isArray$1(value) ? value.map((_) => _.format(props.format)) : value.format(props.format);
  17152. };
  17153. const isValidValue = (value) => {
  17154. return pickerOptions.value.isValidValue(value);
  17155. };
  17156. const handleKeydownInput = async (event) => {
  17157. if (props.readonly || pickerDisabled.value) return;
  17158. const code = getEventCode(event);
  17159. emitKeydown(event);
  17160. if (code === EVENT_CODE.esc) {
  17161. if (pickerVisible.value === true) {
  17162. pickerVisible.value = false;
  17163. event.preventDefault();
  17164. event.stopPropagation();
  17165. }
  17166. return;
  17167. }
  17168. if (code === EVENT_CODE.down) {
  17169. if (pickerOptions.value.handleFocusPicker) {
  17170. event.preventDefault();
  17171. event.stopPropagation();
  17172. }
  17173. if (pickerVisible.value === false) {
  17174. pickerVisible.value = true;
  17175. await nextTick();
  17176. }
  17177. if (pickerOptions.value.handleFocusPicker) {
  17178. pickerOptions.value.handleFocusPicker();
  17179. return;
  17180. }
  17181. }
  17182. if (code === EVENT_CODE.tab) {
  17183. hasJustTabExitedInput = true;
  17184. return;
  17185. }
  17186. if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {
  17187. if (!pickerVisible.value) pickerVisible.value = true;
  17188. else if (userInput.value === null || userInput.value === "" || isValidValue(parseUserInputToDayjs(displayValue.value))) {
  17189. handleChange();
  17190. pickerVisible.value = false;
  17191. }
  17192. event.preventDefault();
  17193. event.stopPropagation();
  17194. return;
  17195. }
  17196. if (userInput.value) {
  17197. event.stopPropagation();
  17198. return;
  17199. }
  17200. if (pickerOptions.value.handleKeydownInput) pickerOptions.value.handleKeydownInput(event);
  17201. };
  17202. const onUserInput = (e) => {
  17203. userInput.value = e;
  17204. if (!pickerVisible.value) pickerVisible.value = true;
  17205. };
  17206. const handleStartInput = (event) => {
  17207. const target = event.target;
  17208. if (userInput.value) userInput.value = [target.value, userInput.value[1]];
  17209. else userInput.value = [target.value, null];
  17210. };
  17211. const handleEndInput = (event) => {
  17212. const target = event.target;
  17213. if (userInput.value) userInput.value = [userInput.value[0], target.value];
  17214. else userInput.value = [null, target.value];
  17215. };
  17216. const handleStartChange = () => {
  17217. const values = userInput.value;
  17218. const value = parseUserInputToDayjs(values && values[0]);
  17219. const parsedVal = unref(parsedValue);
  17220. if (value && value.isValid()) {
  17221. userInput.value = [formatToString(value), displayValue.value?.[1] || null];
  17222. const newValue = [value, parsedVal && (parsedVal[1] || null)];
  17223. if (isValidValue(newValue)) {
  17224. emitInput(dayOrDaysToDate(newValue));
  17225. userInput.value = null;
  17226. }
  17227. }
  17228. };
  17229. const handleEndChange = () => {
  17230. const values = unref(userInput);
  17231. const value = parseUserInputToDayjs(values && values[1]);
  17232. const parsedVal = unref(parsedValue);
  17233. if (value && value.isValid()) {
  17234. userInput.value = [unref(displayValue)?.[0] || null, formatToString(value)];
  17235. const newValue = [parsedVal && parsedVal[0], value];
  17236. if (isValidValue(newValue)) {
  17237. emitInput(dayOrDaysToDate(newValue));
  17238. userInput.value = null;
  17239. }
  17240. }
  17241. };
  17242. const focus = () => {
  17243. inputRef.value?.focus();
  17244. };
  17245. const blur = () => {
  17246. inputRef.value?.blur();
  17247. };
  17248. provide(PICKER_BASE_INJECTION_KEY, {
  17249. props,
  17250. emptyValues
  17251. });
  17252. provide(ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker);
  17253. __expose({
  17254. focus,
  17255. blur,
  17256. handleOpen,
  17257. handleClose,
  17258. onPick
  17259. });
  17260. return (_ctx, _cache) => {
  17261. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  17262. ref_key: "refPopper",
  17263. ref: refPopper,
  17264. visible: unref(pickerVisible),
  17265. effect: "light",
  17266. pure: "",
  17267. trigger: "click"
  17268. }, _ctx.$attrs, {
  17269. role: "dialog",
  17270. teleported: "",
  17271. transition: `${unref(nsDate).namespace.value}-zoom-in-top`,
  17272. "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
  17273. "popper-style": _ctx.popperStyle,
  17274. "popper-options": unref(elPopperOptions),
  17275. "fallback-placements": _ctx.fallbackPlacements,
  17276. "gpu-acceleration": false,
  17277. placement: _ctx.placement,
  17278. "stop-popper-mouse-event": false,
  17279. "hide-after": 0,
  17280. persistent: "",
  17281. onBeforeShow,
  17282. onShow,
  17283. onHide
  17284. }), {
  17285. default: withCtx(() => [!isRangeInput.value ? (openBlock(), createBlock(unref(ElInput), {
  17286. key: 0,
  17287. id: _ctx.id,
  17288. ref_key: "inputRef",
  17289. ref: inputRef,
  17290. "container-role": "combobox",
  17291. "model-value": displayValue.value,
  17292. name: _ctx.name,
  17293. size: unref(pickerSize),
  17294. disabled: unref(pickerDisabled),
  17295. placeholder: _ctx.placeholder,
  17296. class: normalizeClass([
  17297. unref(nsDate).b("editor"),
  17298. unref(nsDate).bm("editor", _ctx.type),
  17299. unref(nsDate).is("focus", unref(pickerVisible)),
  17300. _ctx.$attrs.class
  17301. ]),
  17302. style: normalizeStyle(_ctx.$attrs.style),
  17303. readonly: !_ctx.editable || _ctx.readonly || isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value || _ctx.type === "week",
  17304. "aria-label": _ctx.ariaLabel,
  17305. tabindex: _ctx.tabindex,
  17306. "validate-event": false,
  17307. onInput: onUserInput,
  17308. onFocus: unref(handleFocus),
  17309. onBlur: unref(handleBlur),
  17310. onKeydown: handleKeydownInput,
  17311. onChange: handleChange,
  17312. onMousedown: onMouseDownInput,
  17313. onMouseenter: onMouseEnter,
  17314. onMouseleave: onMouseLeave,
  17315. onTouchstartPassive: onTouchStartInput,
  17316. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  17317. }, {
  17318. prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  17319. key: 0,
  17320. class: normalizeClass(unref(nsInput).e("icon")),
  17321. onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
  17322. onTouchstartPassive: onTouchStartInput
  17323. }, {
  17324. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
  17325. _: 1
  17326. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  17327. suffix: withCtx(() => [showClearBtn.value && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  17328. key: 0,
  17329. class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`),
  17330. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  17331. onClick: onClear
  17332. }, {
  17333. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  17334. _: 1
  17335. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
  17336. _: 1
  17337. }, 8, [
  17338. "id",
  17339. "model-value",
  17340. "name",
  17341. "size",
  17342. "disabled",
  17343. "placeholder",
  17344. "class",
  17345. "style",
  17346. "readonly",
  17347. "aria-label",
  17348. "tabindex",
  17349. "onFocus",
  17350. "onBlur"
  17351. ])) : (openBlock(), createBlock(picker_range_trigger_default, {
  17352. key: 1,
  17353. id: _ctx.id,
  17354. ref_key: "inputRef",
  17355. ref: inputRef,
  17356. "model-value": displayValue.value,
  17357. name: _ctx.name,
  17358. disabled: unref(pickerDisabled),
  17359. readonly: !_ctx.editable || _ctx.readonly,
  17360. "start-placeholder": _ctx.startPlaceholder,
  17361. "end-placeholder": _ctx.endPlaceholder,
  17362. class: normalizeClass(rangeInputKls.value),
  17363. style: normalizeStyle(_ctx.$attrs.style),
  17364. "aria-label": _ctx.ariaLabel,
  17365. tabindex: _ctx.tabindex,
  17366. autocomplete: "off",
  17367. role: "combobox",
  17368. onClick: onMouseDownInput,
  17369. onFocus: unref(handleFocus),
  17370. onBlur: unref(handleBlur),
  17371. onStartInput: handleStartInput,
  17372. onStartChange: handleStartChange,
  17373. onEndInput: handleEndInput,
  17374. onEndChange: handleEndChange,
  17375. onMousedown: onMouseDownInput,
  17376. onMouseenter: onMouseEnter,
  17377. onMouseleave: onMouseLeave,
  17378. onTouchstartPassive: onTouchStartInput,
  17379. onKeydown: handleKeydownInput
  17380. }, {
  17381. prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  17382. key: 0,
  17383. class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")])
  17384. }, {
  17385. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
  17386. _: 1
  17387. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  17388. "range-separator": withCtx(() => [renderSlot(_ctx.$slots, "range-separator", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(nsRange).b("separator")) }, toDisplayString(_ctx.rangeSeparator), 3)])]),
  17389. suffix: withCtx(() => [_ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  17390. key: 0,
  17391. class: normalizeClass(clearIconKls.value),
  17392. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  17393. onClick: onClear
  17394. }, {
  17395. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  17396. _: 1
  17397. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
  17398. _: 3
  17399. }, 8, [
  17400. "id",
  17401. "model-value",
  17402. "name",
  17403. "disabled",
  17404. "readonly",
  17405. "start-placeholder",
  17406. "end-placeholder",
  17407. "class",
  17408. "style",
  17409. "aria-label",
  17410. "tabindex",
  17411. "onFocus",
  17412. "onBlur"
  17413. ]))]),
  17414. content: withCtx(() => [renderSlot(_ctx.$slots, "default", {
  17415. visible: unref(pickerVisible),
  17416. actualVisible: unref(pickerActualVisible),
  17417. parsedValue: unref(parsedValue),
  17418. format: _ctx.format,
  17419. dateFormat: _ctx.dateFormat,
  17420. timeFormat: _ctx.timeFormat,
  17421. unlinkPanels: _ctx.unlinkPanels,
  17422. type: _ctx.type,
  17423. defaultValue: _ctx.defaultValue,
  17424. showNow: _ctx.showNow,
  17425. showConfirm: _ctx.showConfirm,
  17426. showFooter: _ctx.showFooter,
  17427. showWeekNumber: _ctx.showWeekNumber,
  17428. onPick: _cache[1] || (_cache[1] = (...args) => unref(onPick) && unref(onPick)(...args)),
  17429. onSelectRange: setSelectionRange,
  17430. onSetPickerOption: _cache[2] || (_cache[2] = (...args) => unref(onSetPickerOption) && unref(onSetPickerOption)(...args)),
  17431. onCalendarChange: _cache[3] || (_cache[3] = (...args) => unref(onCalendarChange) && unref(onCalendarChange)(...args)),
  17432. onClear,
  17433. onPanelChange: _cache[4] || (_cache[4] = (...args) => unref(onPanelChange) && unref(onPanelChange)(...args)),
  17434. onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"]))
  17435. })]),
  17436. _: 3
  17437. }, 16, [
  17438. "visible",
  17439. "transition",
  17440. "popper-class",
  17441. "popper-style",
  17442. "popper-options",
  17443. "fallback-placements",
  17444. "placement"
  17445. ]);
  17446. };
  17447. }
  17448. });
  17449. //#endregion
  17450. //#region node_modules/element-plus/es/directives/click-outside/index.mjs
  17451. var nodeList = /* @__PURE__ */ new Map();
  17452. if (isClient) {
  17453. let startClick;
  17454. document.addEventListener("mousedown", (e) => startClick = e);
  17455. document.addEventListener("mouseup", (e) => {
  17456. if (startClick) {
  17457. for (const handlers of nodeList.values()) for (const { documentHandler } of handlers) documentHandler(e, startClick);
  17458. startClick = void 0;
  17459. }
  17460. });
  17461. }
  17462. function createDocumentHandler(el, binding) {
  17463. let excludes = [];
  17464. if (isArray$1(binding.arg)) excludes = binding.arg;
  17465. else if (isElement$1(binding.arg)) excludes.push(binding.arg);
  17466. return function(mouseup, mousedown) {
  17467. const popperRef = binding.instance.popperRef;
  17468. const mouseUpTarget = mouseup.target;
  17469. const mouseDownTarget = mousedown?.target;
  17470. const isBound = !binding || !binding.instance;
  17471. const isTargetExists = !mouseUpTarget || !mouseDownTarget;
  17472. const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
  17473. const isSelf = el === mouseUpTarget;
  17474. const isTargetExcluded = excludes.length && excludes.some((item) => item?.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);
  17475. const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
  17476. if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) return;
  17477. binding.value(mouseup, mousedown);
  17478. };
  17479. }
  17480. var ClickOutside = {
  17481. beforeMount(el, binding) {
  17482. if (!nodeList.has(el)) nodeList.set(el, []);
  17483. nodeList.get(el).push({
  17484. documentHandler: createDocumentHandler(el, binding),
  17485. bindingFn: binding.value
  17486. });
  17487. },
  17488. updated(el, binding) {
  17489. if (!nodeList.has(el)) nodeList.set(el, []);
  17490. const handlers = nodeList.get(el);
  17491. const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
  17492. const newHandler = {
  17493. documentHandler: createDocumentHandler(el, binding),
  17494. bindingFn: binding.value
  17495. };
  17496. if (oldHandlerIndex >= 0) handlers.splice(oldHandlerIndex, 1, newHandler);
  17497. else handlers.push(newHandler);
  17498. },
  17499. unmounted(el) {
  17500. nodeList.delete(el);
  17501. }
  17502. };
  17503. var SCOPE$9 = "_RepeatClick";
  17504. var vRepeatClick = {
  17505. beforeMount(el, binding) {
  17506. const value = binding.value;
  17507. const { interval = 100, delay = 600 } = isFunction$1(value) ? {} : value;
  17508. let intervalId;
  17509. let delayId;
  17510. const handler = () => isFunction$1(value) ? value() : value.handler();
  17511. const clear = () => {
  17512. if (delayId) {
  17513. clearTimeout(delayId);
  17514. delayId = void 0;
  17515. }
  17516. if (intervalId) {
  17517. clearInterval(intervalId);
  17518. intervalId = void 0;
  17519. }
  17520. };
  17521. const start = (evt) => {
  17522. if (evt.button !== 0) return;
  17523. clear();
  17524. handler();
  17525. document.addEventListener("mouseup", clear, { once: true });
  17526. delayId = setTimeout(() => {
  17527. intervalId = setInterval(() => {
  17528. handler();
  17529. }, interval);
  17530. }, delay);
  17531. };
  17532. el[SCOPE$9] = {
  17533. start,
  17534. clear
  17535. };
  17536. el.addEventListener("mousedown", start);
  17537. },
  17538. unmounted(el) {
  17539. if (!el[SCOPE$9]) return;
  17540. const { start, clear } = el[SCOPE$9];
  17541. if (start) el.removeEventListener("mousedown", start);
  17542. if (clear) {
  17543. clear();
  17544. document.removeEventListener("mouseup", clear);
  17545. }
  17546. el[SCOPE$9] = null;
  17547. }
  17548. };
  17549. //#endregion
  17550. //#region node_modules/element-plus/es/directives/trap-focus/index.mjs
  17551. var FOCUSABLE_CHILDREN = "_trap-focus-children";
  17552. var FOCUS_STACK = [];
  17553. var FOCUS_HANDLER = (e) => {
  17554. if (FOCUS_STACK.length === 0) return;
  17555. const code = getEventCode(e);
  17556. const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];
  17557. if (focusableElement.length > 0 && code === EVENT_CODE.tab) {
  17558. if (focusableElement.length === 1) {
  17559. e.preventDefault();
  17560. if (document.activeElement !== focusableElement[0]) focusableElement[0].focus();
  17561. return;
  17562. }
  17563. const goingBackward = e.shiftKey;
  17564. const isFirst = e.target === focusableElement[0];
  17565. const isLast = e.target === focusableElement[focusableElement.length - 1];
  17566. if (isFirst && goingBackward) {
  17567. e.preventDefault();
  17568. focusableElement[focusableElement.length - 1].focus();
  17569. }
  17570. if (isLast && !goingBackward) {
  17571. e.preventDefault();
  17572. focusableElement[0].focus();
  17573. }
  17574. }
  17575. };
  17576. var TrapFocus = {
  17577. beforeMount(el) {
  17578. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
  17579. FOCUS_STACK.push(el);
  17580. if (FOCUS_STACK.length <= 1) document.addEventListener("keydown", FOCUS_HANDLER);
  17581. },
  17582. updated(el) {
  17583. nextTick(() => {
  17584. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
  17585. });
  17586. },
  17587. unmounted() {
  17588. FOCUS_STACK.shift();
  17589. if (FOCUS_STACK.length === 0) document.removeEventListener("keydown", FOCUS_HANDLER);
  17590. }
  17591. };
  17592. //#endregion
  17593. //#region node_modules/normalize-wheel-es/dist/index.mjs
  17594. var v = !1, o, f, s, u, d, N, l, p, m, w, D, x, E, M, F;
  17595. function a() {
  17596. if (!v) {
  17597. v = !0;
  17598. 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);
  17599. if (x = /\b(iPhone|iP[ao]d)/.exec(e), E = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) {
  17600. o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode);
  17601. var r = /(?:Trident\/(\d+.\d+))/.exec(e);
  17602. N = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN;
  17603. } else o = f = s = d = u = NaN;
  17604. if (i) {
  17605. if (i[1]) {
  17606. var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
  17607. l = t ? parseFloat(t[1].replace("_", ".")) : !0;
  17608. } else l = !1;
  17609. p = !!i[2], m = !!i[3];
  17610. } else l = p = m = !1;
  17611. }
  17612. }
  17613. var _ = {
  17614. ie: function() {
  17615. return a() || o;
  17616. },
  17617. ieCompatibilityMode: function() {
  17618. return a() || N > o;
  17619. },
  17620. ie64: function() {
  17621. return _.ie() && D;
  17622. },
  17623. firefox: function() {
  17624. return a() || f;
  17625. },
  17626. opera: function() {
  17627. return a() || s;
  17628. },
  17629. webkit: function() {
  17630. return a() || u;
  17631. },
  17632. safari: function() {
  17633. return _.webkit();
  17634. },
  17635. chrome: function() {
  17636. return a() || d;
  17637. },
  17638. windows: function() {
  17639. return a() || p;
  17640. },
  17641. osx: function() {
  17642. return a() || l;
  17643. },
  17644. linux: function() {
  17645. return a() || m;
  17646. },
  17647. iphone: function() {
  17648. return a() || x;
  17649. },
  17650. mobile: function() {
  17651. return a() || x || E || w || F;
  17652. },
  17653. nativeApp: function() {
  17654. return a() || M;
  17655. },
  17656. android: function() {
  17657. return a() || w;
  17658. },
  17659. ipad: function() {
  17660. return a() || E;
  17661. }
  17662. }, A = _;
  17663. var c = !!(typeof window < "u" && window.document && window.document.createElement), h = {
  17664. canUseDOM: c,
  17665. canUseWorkers: typeof Worker < "u",
  17666. canUseEventListeners: c && !!(window.addEventListener || window.attachEvent),
  17667. canUseViewport: c && !!window.screen,
  17668. isInWorker: !c
  17669. };
  17670. var X;
  17671. h.canUseDOM && (X = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
  17672. function S(e, n) {
  17673. if (!h.canUseDOM || n && !("addEventListener" in document)) return !1;
  17674. var i = "on" + e, r = i in document;
  17675. if (!r) {
  17676. var t = document.createElement("div");
  17677. t.setAttribute(i, "return;"), r = typeof t[i] == "function";
  17678. }
  17679. return !r && X && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
  17680. }
  17681. var b = S;
  17682. var O = 10, I = 40, P = 800;
  17683. function T(e) {
  17684. var n = 0, i = 0, r = 0, t = 0;
  17685. return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I, t *= I) : (r *= P, t *= P)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), {
  17686. spinX: n,
  17687. spinY: i,
  17688. pixelX: r,
  17689. pixelY: t
  17690. };
  17691. }
  17692. T.getEventType = function() {
  17693. return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel";
  17694. };
  17695. var Y = T;
  17696. /**
  17697. * Checks if an event is supported in the current execution environment.
  17698. *
  17699. * NOTE: This will not work correctly for non-generic events such as `change`,
  17700. * `reset`, `load`, `error`, and `select`.
  17701. *
  17702. * Borrows from Modernizr.
  17703. *
  17704. * @param {string} eventNameSuffix Event name, e.g. "click".
  17705. * @param {?boolean} capture Check if the capture phase is supported.
  17706. * @return {boolean} True if the event is supported.
  17707. * @internal
  17708. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  17709. */
  17710. //#endregion
  17711. //#region node_modules/element-plus/es/directives/mousewheel/index.mjs
  17712. var SCOPE$8 = "_Mousewheel";
  17713. var mousewheel = function(element, callback) {
  17714. if (element && element.addEventListener) {
  17715. removeWheelHandler(element);
  17716. const fn = function(event) {
  17717. const normalized = Y(event);
  17718. callback && Reflect.apply(callback, this, [event, normalized]);
  17719. };
  17720. element[SCOPE$8] = { wheelHandler: fn };
  17721. element.addEventListener("wheel", fn, { passive: true });
  17722. }
  17723. };
  17724. var removeWheelHandler = (element) => {
  17725. if (element["_Mousewheel"]?.wheelHandler) {
  17726. element.removeEventListener("wheel", element[SCOPE$8].wheelHandler);
  17727. element[SCOPE$8] = null;
  17728. }
  17729. };
  17730. var Mousewheel = {
  17731. beforeMount(el, binding) {
  17732. mousewheel(el, binding.value);
  17733. },
  17734. unmounted(el) {
  17735. removeWheelHandler(el);
  17736. },
  17737. updated(el, binding) {
  17738. if (binding.value !== binding.oldValue) mousewheel(el, binding.value);
  17739. }
  17740. };
  17741. //#endregion
  17742. //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-picker.mjs
  17743. var panelTimePickerProps = buildProps({
  17744. ...timePanelSharedProps,
  17745. datetimeRole: String,
  17746. parsedValue: { type: definePropType(Object) }
  17747. });
  17748. //#endregion
  17749. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-panel.mjs
  17750. var useTimePanel = ({ getAvailableHours, getAvailableMinutes, getAvailableSeconds }) => {
  17751. const getAvailableTime = (date, role, first, compareDate) => {
  17752. const availableTimeGetters = {
  17753. hour: getAvailableHours,
  17754. minute: getAvailableMinutes,
  17755. second: getAvailableSeconds
  17756. };
  17757. let result = date;
  17758. [
  17759. "hour",
  17760. "minute",
  17761. "second"
  17762. ].forEach((type) => {
  17763. if (availableTimeGetters[type]) {
  17764. let availableTimeSlots;
  17765. const method = availableTimeGetters[type];
  17766. switch (type) {
  17767. case "minute":
  17768. availableTimeSlots = method(result.hour(), role, compareDate);
  17769. break;
  17770. case "second":
  17771. availableTimeSlots = method(result.hour(), result.minute(), role, compareDate);
  17772. break;
  17773. default:
  17774. availableTimeSlots = method(role, compareDate);
  17775. break;
  17776. }
  17777. if (availableTimeSlots?.length && !availableTimeSlots.includes(result[type]())) {
  17778. const pos = first ? 0 : availableTimeSlots.length - 1;
  17779. result = result[type](availableTimeSlots[pos]);
  17780. }
  17781. }
  17782. });
  17783. return result;
  17784. };
  17785. const timePickerOptions = {};
  17786. const onSetOption = ([key, val]) => {
  17787. timePickerOptions[key] = val;
  17788. };
  17789. return {
  17790. timePickerOptions,
  17791. getAvailableTime,
  17792. onSetOption
  17793. };
  17794. };
  17795. //#endregion
  17796. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-picker.mjs
  17797. var makeAvailableArr = (disabledList) => {
  17798. const trueOrNumber = (isDisabled, index) => isDisabled || index;
  17799. const getNumber = (predicate) => predicate !== true;
  17800. return disabledList.map(trueOrNumber).filter(getNumber);
  17801. };
  17802. var getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => {
  17803. const getHoursList = (role, compare) => {
  17804. return makeList(24, disabledHours && (() => disabledHours?.(role, compare)));
  17805. };
  17806. const getMinutesList = (hour, role, compare) => {
  17807. return makeList(60, disabledMinutes && (() => disabledMinutes?.(hour, role, compare)));
  17808. };
  17809. const getSecondsList = (hour, minute, role, compare) => {
  17810. return makeList(60, disabledSeconds && (() => disabledSeconds?.(hour, minute, role, compare)));
  17811. };
  17812. return {
  17813. getHoursList,
  17814. getMinutesList,
  17815. getSecondsList
  17816. };
  17817. };
  17818. var buildAvailableTimeSlotGetter = (disabledHours, disabledMinutes, disabledSeconds) => {
  17819. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(disabledHours, disabledMinutes, disabledSeconds);
  17820. const getAvailableHours = (role, compare) => {
  17821. return makeAvailableArr(getHoursList(role, compare));
  17822. };
  17823. const getAvailableMinutes = (hour, role, compare) => {
  17824. return makeAvailableArr(getMinutesList(hour, role, compare));
  17825. };
  17826. const getAvailableSeconds = (hour, minute, role, compare) => {
  17827. return makeAvailableArr(getSecondsList(hour, minute, role, compare));
  17828. };
  17829. return {
  17830. getAvailableHours,
  17831. getAvailableMinutes,
  17832. getAvailableSeconds
  17833. };
  17834. };
  17835. var useOldValue = (props, options) => {
  17836. const oldValue = ref(props.parsedValue);
  17837. watch(() => props.visible, (val) => {
  17838. const modelValue = toValue$1(options.modelValue);
  17839. const valueOnClear = toValue$1(options.valueOnClear);
  17840. if (val && modelValue === valueOnClear) {
  17841. oldValue.value = valueOnClear;
  17842. return;
  17843. }
  17844. if (!val) oldValue.value = props.parsedValue;
  17845. });
  17846. return oldValue;
  17847. };
  17848. //#endregion
  17849. //#region node_modules/element-plus/es/components/time-picker/src/props/basic-time-spinner.mjs
  17850. var basicTimeSpinnerProps = buildProps({
  17851. role: {
  17852. type: String,
  17853. required: true
  17854. },
  17855. spinnerDate: {
  17856. type: definePropType(Object),
  17857. required: true
  17858. },
  17859. showSeconds: {
  17860. type: Boolean,
  17861. default: true
  17862. },
  17863. arrowControl: Boolean,
  17864. amPmMode: {
  17865. type: definePropType(String),
  17866. default: ""
  17867. },
  17868. ...disabledTimeListsProps
  17869. });
  17870. //#endregion
  17871. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs
  17872. var _hoisted_1$70 = ["onClick"];
  17873. var _hoisted_2$39 = ["onMouseenter"];
  17874. //#endregion
  17875. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs
  17876. var basic_time_spinner_default = /* @__PURE__ */ defineComponent({
  17877. __name: "basic-time-spinner",
  17878. props: basicTimeSpinnerProps,
  17879. emits: [
  17880. CHANGE_EVENT,
  17881. "select-range",
  17882. "set-option"
  17883. ],
  17884. setup(__props, { emit: __emit }) {
  17885. const props = __props;
  17886. const { isRange, format, saveOnBlur } = inject(PICKER_BASE_INJECTION_KEY).props;
  17887. const emit = __emit;
  17888. const ns = useNamespace("time");
  17889. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(props.disabledHours, props.disabledMinutes, props.disabledSeconds);
  17890. let isScrolling = false;
  17891. const ignoreScroll = {
  17892. hours: false,
  17893. minutes: false,
  17894. seconds: false
  17895. };
  17896. const currentScrollbar = ref();
  17897. const listRefsMap = {
  17898. hours: ref(),
  17899. minutes: ref(),
  17900. seconds: ref()
  17901. };
  17902. const spinnerItems = computed(() => {
  17903. return props.showSeconds ? timeUnits : timeUnits.slice(0, 2);
  17904. });
  17905. const timePartials = computed(() => {
  17906. const { spinnerDate } = props;
  17907. return {
  17908. hours: spinnerDate.hour(),
  17909. minutes: spinnerDate.minute(),
  17910. seconds: spinnerDate.second()
  17911. };
  17912. });
  17913. const timeList = computed(() => {
  17914. const { hours, minutes } = unref(timePartials);
  17915. const { role, spinnerDate } = props;
  17916. const compare = !isRange ? spinnerDate : void 0;
  17917. return {
  17918. hours: getHoursList(role, compare),
  17919. minutes: getMinutesList(hours, role, compare),
  17920. seconds: getSecondsList(hours, minutes, role, compare)
  17921. };
  17922. });
  17923. const arrowControlTimeList = computed(() => {
  17924. const { hours, minutes, seconds } = unref(timePartials);
  17925. return {
  17926. hours: buildTimeList(hours, 23),
  17927. minutes: buildTimeList(minutes, 59),
  17928. seconds: buildTimeList(seconds, 59)
  17929. };
  17930. });
  17931. const debouncedResetScroll = debounce((type) => {
  17932. isScrolling = false;
  17933. adjustCurrentSpinner(type);
  17934. }, 200);
  17935. const getAmPmFlag = (hour) => {
  17936. if (!!!props.amPmMode) return "";
  17937. const isCapital = props.amPmMode === "A";
  17938. let content = hour < 12 ? " am" : " pm";
  17939. if (isCapital) content = content.toUpperCase();
  17940. return content;
  17941. };
  17942. const emitSelectRange = (type) => {
  17943. let range = [0, 0];
  17944. const actualFormat = format || "HH:mm:ss";
  17945. const hourIndex = actualFormat.indexOf("HH");
  17946. const minuteIndex = actualFormat.indexOf("mm");
  17947. const secondIndex = actualFormat.indexOf("ss");
  17948. switch (type) {
  17949. case "hours":
  17950. if (hourIndex !== -1) range = [hourIndex, hourIndex + 2];
  17951. break;
  17952. case "minutes":
  17953. if (minuteIndex !== -1) range = [minuteIndex, minuteIndex + 2];
  17954. break;
  17955. case "seconds":
  17956. if (secondIndex !== -1) range = [secondIndex, secondIndex + 2];
  17957. break;
  17958. }
  17959. const [left, right] = range;
  17960. emit("select-range", left, right);
  17961. currentScrollbar.value = type;
  17962. };
  17963. const adjustCurrentSpinner = (type) => {
  17964. adjustSpinner(type, unref(timePartials)[type]);
  17965. };
  17966. const adjustSpinners = () => {
  17967. adjustCurrentSpinner("hours");
  17968. adjustCurrentSpinner("minutes");
  17969. adjustCurrentSpinner("seconds");
  17970. };
  17971. const getScrollbarElement = (el) => el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
  17972. const adjustSpinner = (type, value) => {
  17973. if (props.arrowControl) return;
  17974. const scrollbar = unref(listRefsMap[type]);
  17975. if (scrollbar && scrollbar.$el) {
  17976. if (!saveOnBlur) {
  17977. ignoreScroll[type] = true;
  17978. rAF(() => {
  17979. ignoreScroll[type] = false;
  17980. });
  17981. }
  17982. getScrollbarElement(scrollbar.$el).scrollTop = Math.max(0, value * typeItemHeight(type));
  17983. }
  17984. };
  17985. const typeItemHeight = (type) => {
  17986. const listItem = unref(listRefsMap[type])?.$el.querySelector("li");
  17987. if (listItem) return Number.parseFloat(getStyle(listItem, "height")) || 0;
  17988. return 0;
  17989. };
  17990. const onIncrement = () => {
  17991. scrollDown(1);
  17992. };
  17993. const onDecrement = () => {
  17994. scrollDown(-1);
  17995. };
  17996. const scrollDown = (step) => {
  17997. if (!currentScrollbar.value) emitSelectRange("hours");
  17998. const label = currentScrollbar.value;
  17999. const now = unref(timePartials)[label];
  18000. const next = findNextUnDisabled(label, now, step, currentScrollbar.value === "hours" ? 24 : 60);
  18001. modifyDateField(label, next);
  18002. adjustSpinner(label, next);
  18003. nextTick(() => emitSelectRange(label));
  18004. };
  18005. const findNextUnDisabled = (type, now, step, total) => {
  18006. let next = (now + step + total) % total;
  18007. const list = unref(timeList)[type];
  18008. while (list[next] && next !== now) next = (next + step + total) % total;
  18009. return next;
  18010. };
  18011. const modifyDateField = (type, value) => {
  18012. if (unref(timeList)[type][value]) return;
  18013. const { hours, minutes, seconds } = unref(timePartials);
  18014. let changeTo;
  18015. switch (type) {
  18016. case "hours":
  18017. changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds);
  18018. break;
  18019. case "minutes":
  18020. changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds);
  18021. break;
  18022. case "seconds":
  18023. changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value);
  18024. break;
  18025. }
  18026. emit(CHANGE_EVENT, changeTo);
  18027. };
  18028. const handleClick = (type, { value, disabled }) => {
  18029. if (!disabled) {
  18030. modifyDateField(type, value);
  18031. emitSelectRange(type);
  18032. adjustSpinner(type, value);
  18033. }
  18034. };
  18035. const handleScroll = (type) => {
  18036. if (!saveOnBlur && ignoreScroll[type]) return;
  18037. const scrollbar = unref(listRefsMap[type]);
  18038. if (!scrollbar) return;
  18039. isScrolling = true;
  18040. debouncedResetScroll(type);
  18041. modifyDateField(type, Math.min(Math.round((getScrollbarElement(scrollbar.$el).scrollTop - (scrollBarHeight(type) * .5 - 10) / typeItemHeight(type) + 3) / typeItemHeight(type)), type === "hours" ? 23 : 59));
  18042. };
  18043. const scrollBarHeight = (type) => {
  18044. return unref(listRefsMap[type]).$el.offsetHeight;
  18045. };
  18046. const bindScrollEvent = () => {
  18047. const bindFunction = (type) => {
  18048. const scrollbar = unref(listRefsMap[type]);
  18049. if (scrollbar && scrollbar.$el) getScrollbarElement(scrollbar.$el).onscroll = () => {
  18050. handleScroll(type);
  18051. };
  18052. };
  18053. bindFunction("hours");
  18054. bindFunction("minutes");
  18055. bindFunction("seconds");
  18056. };
  18057. onMounted(() => {
  18058. nextTick(() => {
  18059. !props.arrowControl && bindScrollEvent();
  18060. adjustSpinners();
  18061. if (props.role === "start") emitSelectRange("hours");
  18062. });
  18063. });
  18064. const setRef = (scrollbar, type) => {
  18065. listRefsMap[type].value = scrollbar ?? void 0;
  18066. };
  18067. emit("set-option", [`${props.role}_scrollDown`, scrollDown]);
  18068. emit("set-option", [`${props.role}_emitSelectRange`, emitSelectRange]);
  18069. watch(() => props.spinnerDate, () => {
  18070. if (isScrolling) return;
  18071. adjustSpinners();
  18072. });
  18073. return (_ctx, _cache) => {
  18074. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("spinner"), { "has-seconds": _ctx.showSeconds }]) }, [!_ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(spinnerItems.value, (item) => {
  18075. return openBlock(), createBlock(unref(ElScrollbar), {
  18076. key: item,
  18077. ref_for: true,
  18078. ref: (scrollbar) => setRef(scrollbar, item),
  18079. class: normalizeClass(unref(ns).be("spinner", "wrapper")),
  18080. "wrap-style": "max-height: inherit;",
  18081. "view-class": unref(ns).be("spinner", "list"),
  18082. noresize: "",
  18083. tag: "ul",
  18084. onMouseenter: ($event) => emitSelectRange(item),
  18085. onMousemove: ($event) => adjustCurrentSpinner(item)
  18086. }, {
  18087. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(timeList.value[item], (disabled, key) => {
  18088. return openBlock(), createElementBlock("li", {
  18089. key,
  18090. class: normalizeClass([
  18091. unref(ns).be("spinner", "item"),
  18092. unref(ns).is("active", key === timePartials.value[item]),
  18093. unref(ns).is("disabled", disabled)
  18094. ]),
  18095. onClick: ($event) => handleClick(item, {
  18096. value: key,
  18097. disabled
  18098. })
  18099. }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(getAmPmFlag(key)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + key).slice(-2)), 1)], 64))], 10, _hoisted_1$70);
  18100. }), 128))]),
  18101. _: 2
  18102. }, 1032, [
  18103. "class",
  18104. "view-class",
  18105. "onMouseenter",
  18106. "onMousemove"
  18107. ]);
  18108. }), 128)) : createCommentVNode("v-if", true), _ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(spinnerItems.value, (item) => {
  18109. return openBlock(), createElementBlock("div", {
  18110. key: item,
  18111. class: normalizeClass([unref(ns).be("spinner", "wrapper"), unref(ns).is("arrow")]),
  18112. onMouseenter: ($event) => emitSelectRange(item)
  18113. }, [
  18114. withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-up", unref(ns).be("spinner", "arrow")]) }, {
  18115. default: withCtx(() => [createVNode(unref(arrow_up_default))]),
  18116. _: 1
  18117. }, 8, ["class"])), [[unref(vRepeatClick), onDecrement]]),
  18118. withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-down", unref(ns).be("spinner", "arrow")]) }, {
  18119. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  18120. _: 1
  18121. }, 8, ["class"])), [[unref(vRepeatClick), onIncrement]]),
  18122. createBaseVNode("ul", { class: normalizeClass(unref(ns).be("spinner", "list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(arrowControlTimeList.value[item], (time, key) => {
  18123. return openBlock(), createElementBlock("li", {
  18124. key,
  18125. class: normalizeClass([
  18126. unref(ns).be("spinner", "item"),
  18127. unref(ns).is("active", time === timePartials.value[item]),
  18128. unref(ns).is("disabled", timeList.value[item][time])
  18129. ])
  18130. }, [unref(isNumber)(time) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2)) + toDisplayString(getAmPmFlag(time)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + time).slice(-2)), 1)], 64))], 64)) : createCommentVNode("v-if", true)], 2);
  18131. }), 128))], 2)
  18132. ], 42, _hoisted_2$39);
  18133. }), 128)) : createCommentVNode("v-if", true)], 2);
  18134. };
  18135. }
  18136. });
  18137. //#endregion
  18138. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs
  18139. var panel_time_pick_default = /* @__PURE__ */ defineComponent({
  18140. __name: "panel-time-pick",
  18141. props: panelTimePickerProps,
  18142. emits: [
  18143. "pick",
  18144. "select-range",
  18145. "set-picker-option"
  18146. ],
  18147. setup(__props, { emit: __emit }) {
  18148. const props = __props;
  18149. const emit = __emit;
  18150. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  18151. const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
  18152. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours, disabledMinutes, disabledSeconds);
  18153. const ns = useNamespace("time");
  18154. const { t, lang } = useLocale();
  18155. const selectionRange = ref([0, 2]);
  18156. const oldValue = useOldValue(props, {
  18157. modelValue: computed(() => pickerBase.props.modelValue),
  18158. valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
  18159. });
  18160. const transitionName = computed(() => {
  18161. return isUndefined(props.actualVisible) ? `${ns.namespace.value}-zoom-in-top` : "";
  18162. });
  18163. const showSeconds = computed(() => {
  18164. return props.format.includes("ss");
  18165. });
  18166. const amPmMode = computed(() => {
  18167. if (props.format.includes("A")) return "A";
  18168. if (props.format.includes("a")) return "a";
  18169. return "";
  18170. });
  18171. const isValidValue = (_date) => {
  18172. const parsedDate = (0, import_dayjs_min.default)(_date).locale(lang.value);
  18173. const result = getRangeAvailableTime(parsedDate);
  18174. return parsedDate.isSame(result);
  18175. };
  18176. const handleCancel = () => {
  18177. const old = oldValue.value;
  18178. emit("pick", old, false);
  18179. nextTick(() => {
  18180. oldValue.value = old;
  18181. });
  18182. };
  18183. const handleConfirm = (visible = false, first = false) => {
  18184. if (first) return;
  18185. emit("pick", props.parsedValue, visible);
  18186. };
  18187. const handleChange = (_date) => {
  18188. if (!props.visible) return;
  18189. emit("pick", getRangeAvailableTime(_date).millisecond(0), true);
  18190. };
  18191. const setSelectionRange = (start, end) => {
  18192. emit("select-range", start, end);
  18193. selectionRange.value = [start, end];
  18194. };
  18195. const changeSelectionRange = (step) => {
  18196. const actualFormat = props.format;
  18197. const hourIndex = actualFormat.indexOf("HH");
  18198. const minuteIndex = actualFormat.indexOf("mm");
  18199. const secondIndex = actualFormat.indexOf("ss");
  18200. const list = [];
  18201. const mapping = [];
  18202. if (hourIndex !== -1) {
  18203. list.push(hourIndex);
  18204. mapping.push("hours");
  18205. }
  18206. if (minuteIndex !== -1) {
  18207. list.push(minuteIndex);
  18208. mapping.push("minutes");
  18209. }
  18210. if (secondIndex !== -1 && showSeconds.value) {
  18211. list.push(secondIndex);
  18212. mapping.push("seconds");
  18213. }
  18214. const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
  18215. timePickerOptions["start_emitSelectRange"](mapping[next]);
  18216. };
  18217. const handleKeydown = (event) => {
  18218. const code = getEventCode(event);
  18219. const { left, right, up, down } = EVENT_CODE;
  18220. if ([left, right].includes(code)) {
  18221. changeSelectionRange(code === left ? -1 : 1);
  18222. event.preventDefault();
  18223. return;
  18224. }
  18225. if ([up, down].includes(code)) {
  18226. const step = code === up ? -1 : 1;
  18227. timePickerOptions["start_scrollDown"](step);
  18228. event.preventDefault();
  18229. return;
  18230. }
  18231. };
  18232. const { timePickerOptions, onSetOption, getAvailableTime } = useTimePanel({
  18233. getAvailableHours,
  18234. getAvailableMinutes,
  18235. getAvailableSeconds
  18236. });
  18237. const getRangeAvailableTime = (date) => {
  18238. return getAvailableTime(date, props.datetimeRole || "", true);
  18239. };
  18240. const parseUserInput = (value) => {
  18241. if (!value) return null;
  18242. return (0, import_dayjs_min.default)(value, props.format).locale(lang.value);
  18243. };
  18244. const getDefaultValue = () => {
  18245. return (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
  18246. };
  18247. emit("set-picker-option", ["isValidValue", isValidValue]);
  18248. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  18249. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  18250. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  18251. emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
  18252. emit("set-picker-option", ["handleCancel", handleCancel]);
  18253. return (_ctx, _cache) => {
  18254. return openBlock(), createBlock(Transition, { name: transitionName.value }, {
  18255. default: withCtx(() => [_ctx.actualVisible || _ctx.visible ? (openBlock(), createElementBlock("div", {
  18256. key: 0,
  18257. class: normalizeClass(unref(ns).b("panel"))
  18258. }, [createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "content"), { "has-seconds": showSeconds.value }]) }, [createVNode(basic_time_spinner_default, {
  18259. ref: "spinner",
  18260. role: _ctx.datetimeRole || "start",
  18261. "arrow-control": unref(arrowControl),
  18262. "show-seconds": showSeconds.value,
  18263. "am-pm-mode": amPmMode.value,
  18264. "spinner-date": _ctx.parsedValue,
  18265. "disabled-hours": unref(disabledHours),
  18266. "disabled-minutes": unref(disabledMinutes),
  18267. "disabled-seconds": unref(disabledSeconds),
  18268. onChange: handleChange,
  18269. onSetOption: unref(onSetOption),
  18270. onSelectRange: setSelectionRange
  18271. }, null, 8, [
  18272. "role",
  18273. "arrow-control",
  18274. "show-seconds",
  18275. "am-pm-mode",
  18276. "spinner-date",
  18277. "disabled-hours",
  18278. "disabled-minutes",
  18279. "disabled-seconds",
  18280. "onSetOption"
  18281. ])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "footer")) }, [createBaseVNode("button", {
  18282. type: "button",
  18283. class: normalizeClass([unref(ns).be("panel", "btn"), "cancel"]),
  18284. onClick: handleCancel
  18285. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
  18286. type: "button",
  18287. class: normalizeClass([unref(ns).be("panel", "btn"), "confirm"]),
  18288. onClick: _cache[0] || (_cache[0] = ($event) => handleConfirm())
  18289. }, toDisplayString(unref(t)("el.datepicker.confirm")), 3)], 2)], 2)) : createCommentVNode("v-if", true)]),
  18290. _: 1
  18291. }, 8, ["name"]);
  18292. };
  18293. }
  18294. });
  18295. //#endregion
  18296. //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-range.mjs
  18297. var panelTimeRangeProps = buildProps({
  18298. ...timePanelSharedProps,
  18299. parsedValue: { type: definePropType(Array) }
  18300. });
  18301. //#endregion
  18302. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.vue_vue_type_script_setup_true_lang.mjs
  18303. var _hoisted_1$69 = ["disabled"];
  18304. //#endregion
  18305. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs
  18306. var panel_time_range_default = /* @__PURE__ */ defineComponent({
  18307. __name: "panel-time-range",
  18308. props: panelTimeRangeProps,
  18309. emits: [
  18310. "pick",
  18311. "select-range",
  18312. "set-picker-option"
  18313. ],
  18314. setup(__props, { emit: __emit }) {
  18315. const props = __props;
  18316. const emit = __emit;
  18317. const makeSelectRange = (start, end) => {
  18318. const result = [];
  18319. for (let i = start; i <= end; i++) result.push(i);
  18320. return result;
  18321. };
  18322. const { t, lang } = useLocale();
  18323. const nsTime = useNamespace("time");
  18324. const nsPicker = useNamespace("picker");
  18325. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  18326. const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
  18327. const startContainerKls = computed(() => [
  18328. nsTime.be("range-picker", "body"),
  18329. nsTime.be("panel", "content"),
  18330. nsTime.is("arrow", arrowControl),
  18331. showSeconds.value ? "has-seconds" : ""
  18332. ]);
  18333. const endContainerKls = computed(() => [
  18334. nsTime.be("range-picker", "body"),
  18335. nsTime.be("panel", "content"),
  18336. nsTime.is("arrow", arrowControl),
  18337. showSeconds.value ? "has-seconds" : ""
  18338. ]);
  18339. const startTime = computed(() => props.parsedValue[0]);
  18340. const endTime = computed(() => props.parsedValue[1]);
  18341. const oldValue = useOldValue(props, {
  18342. modelValue: computed(() => pickerBase.props.modelValue),
  18343. valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
  18344. });
  18345. const handleCancel = () => {
  18346. const old = oldValue.value;
  18347. emit("pick", old, false);
  18348. nextTick(() => {
  18349. oldValue.value = old;
  18350. });
  18351. };
  18352. const showSeconds = computed(() => {
  18353. return props.format.includes("ss");
  18354. });
  18355. const amPmMode = computed(() => {
  18356. if (props.format.includes("A")) return "A";
  18357. if (props.format.includes("a")) return "a";
  18358. return "";
  18359. });
  18360. const handleConfirm = (visible = false) => {
  18361. emit("pick", [startTime.value, endTime.value], visible);
  18362. };
  18363. const handleMinChange = (date) => {
  18364. handleChange(date.millisecond(0), endTime.value);
  18365. };
  18366. const handleMaxChange = (date) => {
  18367. handleChange(startTime.value, date.millisecond(0));
  18368. };
  18369. const isValidValue = (_date) => {
  18370. const parsedDate = _date.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
  18371. const result = getRangeAvailableTime(parsedDate);
  18372. return parsedDate[0].isSame(result[0]) && parsedDate[1].isSame(result[1]);
  18373. };
  18374. const handleChange = (start, end) => {
  18375. if (!props.visible) return;
  18376. emit("pick", [start, end], true);
  18377. };
  18378. const btnConfirmDisabled = computed(() => {
  18379. return startTime.value > endTime.value;
  18380. });
  18381. const selectionRange = ref([0, 2]);
  18382. const setMinSelectionRange = (start, end) => {
  18383. emit("select-range", start, end, "min");
  18384. selectionRange.value = [start, end];
  18385. };
  18386. const offset = computed(() => showSeconds.value ? 11 : 8);
  18387. const setMaxSelectionRange = (start, end) => {
  18388. emit("select-range", start, end, "max");
  18389. const _offset = unref(offset);
  18390. selectionRange.value = [start + _offset, end + _offset];
  18391. };
  18392. const changeSelectionRange = (step) => {
  18393. const list = showSeconds.value ? [
  18394. 0,
  18395. 3,
  18396. 6,
  18397. 11,
  18398. 14,
  18399. 17
  18400. ] : [
  18401. 0,
  18402. 3,
  18403. 8,
  18404. 11
  18405. ];
  18406. const mapping = ["hours", "minutes"].concat(showSeconds.value ? ["seconds"] : []);
  18407. const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
  18408. const half = list.length / 2;
  18409. if (next < half) timePickerOptions["start_emitSelectRange"](mapping[next]);
  18410. else timePickerOptions["end_emitSelectRange"](mapping[next - half]);
  18411. };
  18412. const handleKeydown = (event) => {
  18413. const code = getEventCode(event);
  18414. const { left, right, up, down } = EVENT_CODE;
  18415. if ([left, right].includes(code)) {
  18416. changeSelectionRange(code === left ? -1 : 1);
  18417. event.preventDefault();
  18418. return;
  18419. }
  18420. if ([up, down].includes(code)) {
  18421. const step = code === up ? -1 : 1;
  18422. timePickerOptions[`${selectionRange.value[0] < offset.value ? "start" : "end"}_scrollDown`](step);
  18423. event.preventDefault();
  18424. return;
  18425. }
  18426. };
  18427. const disabledHours_ = (role, compare) => {
  18428. const defaultDisable = disabledHours ? disabledHours(role) : [];
  18429. const isStart = role === "start";
  18430. const compareHour = (compare || (isStart ? endTime.value : startTime.value)).hour();
  18431. return union(defaultDisable, isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1));
  18432. };
  18433. const disabledMinutes_ = (hour, role, compare) => {
  18434. const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : [];
  18435. const isStart = role === "start";
  18436. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  18437. if (hour !== compareDate.hour()) return defaultDisable;
  18438. const compareMinute = compareDate.minute();
  18439. return union(defaultDisable, isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1));
  18440. };
  18441. const disabledSeconds_ = (hour, minute, role, compare) => {
  18442. const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : [];
  18443. const isStart = role === "start";
  18444. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  18445. const compareHour = compareDate.hour();
  18446. const compareMinute = compareDate.minute();
  18447. if (hour !== compareHour || minute !== compareMinute) return defaultDisable;
  18448. const compareSecond = compareDate.second();
  18449. return union(defaultDisable, isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1));
  18450. };
  18451. const getRangeAvailableTime = ([start, end]) => {
  18452. return [getAvailableTime(start, "start", true, end), getAvailableTime(end, "end", false, start)];
  18453. };
  18454. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours_, disabledMinutes_, disabledSeconds_);
  18455. const { timePickerOptions, getAvailableTime, onSetOption } = useTimePanel({
  18456. getAvailableHours,
  18457. getAvailableMinutes,
  18458. getAvailableSeconds
  18459. });
  18460. const parseUserInput = (days) => {
  18461. if (!days) return null;
  18462. if (isArray$1(days)) return days.map((d) => (0, import_dayjs_min.default)(d, props.format).locale(lang.value));
  18463. return (0, import_dayjs_min.default)(days, props.format).locale(lang.value);
  18464. };
  18465. const getDefaultValue = () => {
  18466. if (isArray$1(defaultValue)) return defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang.value));
  18467. const defaultDay = (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
  18468. return [defaultDay, defaultDay.add(60, "m")];
  18469. };
  18470. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  18471. emit("set-picker-option", ["isValidValue", isValidValue]);
  18472. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  18473. emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
  18474. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  18475. emit("set-picker-option", ["handleCancel", handleCancel]);
  18476. return (_ctx, _cache) => {
  18477. return _ctx.actualVisible ? (openBlock(), createElementBlock("div", {
  18478. key: 0,
  18479. class: normalizeClass([unref(nsTime).b("range-picker"), unref(nsPicker).b("panel")])
  18480. }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "content")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.startTime")), 3), createBaseVNode("div", { class: normalizeClass(startContainerKls.value) }, [createVNode(basic_time_spinner_default, {
  18481. ref: "minSpinner",
  18482. role: "start",
  18483. "show-seconds": showSeconds.value,
  18484. "am-pm-mode": amPmMode.value,
  18485. "arrow-control": unref(arrowControl),
  18486. "spinner-date": startTime.value,
  18487. "disabled-hours": disabledHours_,
  18488. "disabled-minutes": disabledMinutes_,
  18489. "disabled-seconds": disabledSeconds_,
  18490. onChange: handleMinChange,
  18491. onSetOption: unref(onSetOption),
  18492. onSelectRange: setMinSelectionRange
  18493. }, null, 8, [
  18494. "show-seconds",
  18495. "am-pm-mode",
  18496. "arrow-control",
  18497. "spinner-date",
  18498. "onSetOption"
  18499. ])], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.endTime")), 3), createBaseVNode("div", { class: normalizeClass(endContainerKls.value) }, [createVNode(basic_time_spinner_default, {
  18500. ref: "maxSpinner",
  18501. role: "end",
  18502. "show-seconds": showSeconds.value,
  18503. "am-pm-mode": amPmMode.value,
  18504. "arrow-control": unref(arrowControl),
  18505. "spinner-date": endTime.value,
  18506. "disabled-hours": disabledHours_,
  18507. "disabled-minutes": disabledMinutes_,
  18508. "disabled-seconds": disabledSeconds_,
  18509. onChange: handleMaxChange,
  18510. onSetOption: unref(onSetOption),
  18511. onSelectRange: setMaxSelectionRange
  18512. }, null, 8, [
  18513. "show-seconds",
  18514. "am-pm-mode",
  18515. "arrow-control",
  18516. "spinner-date",
  18517. "onSetOption"
  18518. ])], 2)], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("panel", "footer")) }, [createBaseVNode("button", {
  18519. type: "button",
  18520. class: normalizeClass([unref(nsTime).be("panel", "btn"), "cancel"]),
  18521. onClick: _cache[0] || (_cache[0] = ($event) => handleCancel())
  18522. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
  18523. type: "button",
  18524. class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]),
  18525. disabled: btnConfirmDisabled.value,
  18526. onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm())
  18527. }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_1$69)], 2)], 2)) : createCommentVNode("v-if", true);
  18528. };
  18529. }
  18530. });
  18531. //#endregion
  18532. //#region node_modules/element-plus/es/components/time-picker/src/time-picker.mjs
  18533. var import_customParseFormat = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  18534. (function(e, t) {
  18535. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
  18536. })(exports, (function() {
  18537. "use strict";
  18538. var e = {
  18539. LTS: "h:mm:ss A",
  18540. LT: "h:mm A",
  18541. L: "MM/DD/YYYY",
  18542. LL: "MMMM D, YYYY",
  18543. LLL: "MMMM D, YYYY h:mm A",
  18544. LLLL: "dddd, MMMM D, YYYY h:mm A"
  18545. }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e) {
  18546. return (e = +e) + (e > 68 ? 1900 : 2e3);
  18547. };
  18548. var f = function(e) {
  18549. return function(t) {
  18550. this[e] = +t;
  18551. };
  18552. }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e) {
  18553. (this.zone || (this.zone = {})).offset = function(e) {
  18554. if (!e) return 0;
  18555. if ("Z" === e) return 0;
  18556. var t = e.match(/([+-]|\d\d)/g), n = 60 * t[1] + (+t[2] || 0);
  18557. return 0 === n ? 0 : "+" === t[0] ? -n : n;
  18558. }(e);
  18559. }], u = function(e) {
  18560. var t = s[e];
  18561. return t && (t.indexOf ? t : t.s.concat(t.f));
  18562. }, d = function(e, t) {
  18563. var n, r = s.meridiem;
  18564. if (r) {
  18565. for (var i = 1; i <= 24; i += 1) if (e.indexOf(r(i, 0, t)) > -1) {
  18566. n = i > 12;
  18567. break;
  18568. }
  18569. } else n = e === (t ? "pm" : "PM");
  18570. return n;
  18571. }, c = {
  18572. A: [o, function(e) {
  18573. this.afternoon = d(e, !1);
  18574. }],
  18575. a: [o, function(e) {
  18576. this.afternoon = d(e, !0);
  18577. }],
  18578. Q: [n, function(e) {
  18579. this.month = 3 * (e - 1) + 1;
  18580. }],
  18581. S: [n, function(e) {
  18582. this.milliseconds = 100 * +e;
  18583. }],
  18584. SS: [r, function(e) {
  18585. this.milliseconds = 10 * +e;
  18586. }],
  18587. SSS: [/\d{3}/, function(e) {
  18588. this.milliseconds = +e;
  18589. }],
  18590. s: [i, f("seconds")],
  18591. ss: [i, f("seconds")],
  18592. m: [i, f("minutes")],
  18593. mm: [i, f("minutes")],
  18594. H: [i, f("hours")],
  18595. h: [i, f("hours")],
  18596. HH: [i, f("hours")],
  18597. hh: [i, f("hours")],
  18598. D: [i, f("day")],
  18599. DD: [r, f("day")],
  18600. Do: [o, function(e) {
  18601. var t = s.ordinal;
  18602. if (this.day = e.match(/\d+/)[0], t) for (var r = 1; r <= 31; r += 1) t(r).replace(/\[|\]/g, "") === e && (this.day = r);
  18603. }],
  18604. w: [i, f("week")],
  18605. ww: [r, f("week")],
  18606. M: [i, f("month")],
  18607. MM: [r, f("month")],
  18608. MMM: [o, function(e) {
  18609. var t = u("months"), n = (u("monthsShort") || t.map((function(e) {
  18610. return e.slice(0, 3);
  18611. }))).indexOf(e) + 1;
  18612. if (n < 1) throw new Error();
  18613. this.month = n % 12 || n;
  18614. }],
  18615. MMMM: [o, function(e) {
  18616. var t = u("months").indexOf(e) + 1;
  18617. if (t < 1) throw new Error();
  18618. this.month = t % 12 || t;
  18619. }],
  18620. Y: [/[+-]?\d+/, f("year")],
  18621. YY: [r, function(e) {
  18622. this.year = a(e);
  18623. }],
  18624. YYYY: [/\d{4}/, f("year")],
  18625. Z: h,
  18626. ZZ: h
  18627. };
  18628. function l(n) {
  18629. var r = n, i = s && s.formats;
  18630. for (var o = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, n, r) {
  18631. var o = r && r.toUpperCase();
  18632. return n || i[r] || e[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) {
  18633. return t || n.slice(1);
  18634. }));
  18635. }))).match(t), a = o.length, f = 0; f < a; f += 1) {
  18636. var h = o[f], u = c[h], d = u && u[0], l = u && u[1];
  18637. o[f] = l ? {
  18638. regex: d,
  18639. parser: l
  18640. } : h.replace(/^\[|\]$/g, "");
  18641. }
  18642. return function(e) {
  18643. for (var t = {}, n = 0, r = 0; n < a; n += 1) {
  18644. var i = o[n];
  18645. if ("string" == typeof i) r += i.length;
  18646. else {
  18647. var s = i.regex, f = i.parser, h = e.slice(r), u = s.exec(h)[0];
  18648. f.call(t, u), e = e.replace(u, "");
  18649. }
  18650. }
  18651. return function(e) {
  18652. var t = e.afternoon;
  18653. if (void 0 !== t) {
  18654. var n = e.hours;
  18655. t ? n < 12 && (e.hours += 12) : 12 === n && (e.hours = 0), delete e.afternoon;
  18656. }
  18657. }(t), t;
  18658. };
  18659. }
  18660. return function(e, t, n) {
  18661. n.p.customParseFormat = !0, e && e.parseTwoDigitYear && (a = e.parseTwoDigitYear);
  18662. var r = t.prototype, i = r.parse;
  18663. r.parse = function(e) {
  18664. var t = e.date, r = e.utc, o = e.args;
  18665. this.$u = r;
  18666. var a = o[1];
  18667. if ("string" == typeof a) {
  18668. var f = !0 === o[2], h = !0 === o[3], u = f || h, d = o[2];
  18669. h && (d = o[2]), s = this.$locale(), !f && d && (s = n.Ls[d]), this.$d = function(e, t, n, r) {
  18670. try {
  18671. if (["x", "X"].indexOf(t) > -1) return /* @__PURE__ */ new Date(("X" === t ? 1e3 : 1) * e);
  18672. var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = /* @__PURE__ */ new Date(), Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0;
  18673. o && !s || (v = s > 0 ? s - 1 : M.getMonth());
  18674. var D, w = f || 0, g = h || 0, y = u || 0, L = d || 0;
  18675. return c ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c.offset * 1e3)) : n ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m && (D = r(D).week(m).toDate()), D);
  18676. } catch (e) {
  18677. return /* @__PURE__ */ new Date("");
  18678. }
  18679. }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
  18680. } else if (a instanceof Array) for (var c = a.length, m = 1; m <= c; m += 1) {
  18681. o[1] = a[m - 1];
  18682. var M = n.apply(this, o);
  18683. if (M.isValid()) {
  18684. this.$d = M.$d, this.$L = M.$L, this.init();
  18685. break;
  18686. }
  18687. m === c && (this.$d = /* @__PURE__ */ new Date(""));
  18688. }
  18689. else i.call(this, e);
  18690. };
  18691. };
  18692. }));
  18693. })))(), 1);
  18694. import_dayjs_min.default.extend(import_customParseFormat.default);
  18695. //#endregion
  18696. //#region node_modules/element-plus/es/components/time-picker/index.mjs
  18697. var ElTimePicker = withInstall(/* @__PURE__ */ defineComponent({
  18698. name: "ElTimePicker",
  18699. install: null,
  18700. props: {
  18701. ...timePickerDefaultProps,
  18702. isRange: Boolean
  18703. },
  18704. emits: [UPDATE_MODEL_EVENT],
  18705. setup(props, ctx) {
  18706. const commonPicker = ref();
  18707. const [type, Panel] = props.isRange ? ["timerange", panel_time_range_default] : ["time", panel_time_pick_default];
  18708. const modelUpdater = (value) => ctx.emit(UPDATE_MODEL_EVENT, value);
  18709. provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, props.popperOptions);
  18710. ctx.expose({
  18711. focus: () => {
  18712. commonPicker.value?.focus();
  18713. },
  18714. blur: () => {
  18715. commonPicker.value?.blur();
  18716. },
  18717. handleOpen: () => {
  18718. commonPicker.value?.handleOpen();
  18719. },
  18720. handleClose: () => {
  18721. commonPicker.value?.handleClose();
  18722. }
  18723. });
  18724. return () => {
  18725. const format = props.format ?? "HH:mm:ss";
  18726. return createVNode(picker_default, mergeProps(props, {
  18727. "ref": commonPicker,
  18728. "type": type,
  18729. "format": format,
  18730. "onUpdate:modelValue": modelUpdater
  18731. }), { default: (props) => createVNode(Panel, props, null) });
  18732. };
  18733. }
  18734. }));
  18735. //#endregion
  18736. //#region node_modules/element-plus/es/components/tag/src/tag.mjs
  18737. /**
  18738. * @deprecated Removed after 3.0.0, Use `TagProps` instead.
  18739. */
  18740. var tagProps = buildProps({
  18741. type: {
  18742. type: String,
  18743. values: [
  18744. "primary",
  18745. "success",
  18746. "info",
  18747. "warning",
  18748. "danger"
  18749. ],
  18750. default: "primary"
  18751. },
  18752. closable: Boolean,
  18753. disableTransitions: Boolean,
  18754. hit: Boolean,
  18755. color: String,
  18756. size: {
  18757. type: String,
  18758. values: componentSizes
  18759. },
  18760. effect: {
  18761. type: String,
  18762. values: [
  18763. "dark",
  18764. "light",
  18765. "plain"
  18766. ],
  18767. default: "light"
  18768. },
  18769. round: Boolean
  18770. });
  18771. var tagEmits = {
  18772. close: (evt) => evt instanceof MouseEvent,
  18773. click: (evt) => evt instanceof MouseEvent
  18774. };
  18775. //#endregion
  18776. //#region node_modules/element-plus/es/components/tag/src/tag.vue_vue_type_script_setup_true_lang.mjs
  18777. var _hoisted_1$68 = ["aria-label"];
  18778. var _hoisted_2$38 = ["aria-label"];
  18779. //#endregion
  18780. //#region node_modules/element-plus/es/components/tag/index.mjs
  18781. var ElTag = withInstall(/* @__PURE__ */ defineComponent({
  18782. name: "ElTag",
  18783. __name: "tag",
  18784. props: tagProps,
  18785. emits: tagEmits,
  18786. setup(__props, { emit: __emit }) {
  18787. const props = __props;
  18788. const emit = __emit;
  18789. const tagSize = useFormSize();
  18790. const { t } = useLocale();
  18791. const ns = useNamespace("tag");
  18792. const containerKls = computed(() => {
  18793. const { type, hit, effect, closable, round } = props;
  18794. return [
  18795. ns.b(),
  18796. ns.is("closable", closable),
  18797. ns.m(type || "primary"),
  18798. ns.m(tagSize.value),
  18799. ns.m(effect),
  18800. ns.is("hit", hit),
  18801. ns.is("round", round)
  18802. ];
  18803. });
  18804. const handleClose = (event) => {
  18805. emit("close", event);
  18806. };
  18807. const handleClick = (event) => {
  18808. emit("click", event);
  18809. };
  18810. const handleVNodeMounted = (vnode) => {
  18811. if (vnode?.component?.subTree?.component?.bum) vnode.component.subTree.component.bum = null;
  18812. };
  18813. return (_ctx, _cache) => {
  18814. return __props.disableTransitions ? (openBlock(), createElementBlock("span", {
  18815. key: 0,
  18816. class: normalizeClass(containerKls.value),
  18817. style: normalizeStyle({ backgroundColor: __props.color }),
  18818. onClick: handleClick
  18819. }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
  18820. key: 0,
  18821. "aria-label": unref(t)("el.tag.close"),
  18822. class: normalizeClass(unref(ns).e("close")),
  18823. type: "button",
  18824. onClick: withModifiers(handleClose, ["stop"])
  18825. }, [createVNode(unref(ElIcon), null, {
  18826. default: withCtx(() => [createVNode(unref(close_default))]),
  18827. _: 1
  18828. })], 10, _hoisted_1$68)) : createCommentVNode("v-if", true)], 6)) : (openBlock(), createBlock(Transition, {
  18829. key: 1,
  18830. name: `${unref(ns).namespace.value}-zoom-in-center`,
  18831. appear: "",
  18832. onVnodeMounted: handleVNodeMounted
  18833. }, {
  18834. default: withCtx(() => [createBaseVNode("span", {
  18835. class: normalizeClass(containerKls.value),
  18836. style: normalizeStyle({ backgroundColor: __props.color }),
  18837. onClick: handleClick
  18838. }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
  18839. key: 0,
  18840. "aria-label": unref(t)("el.tag.close"),
  18841. class: normalizeClass(unref(ns).e("close")),
  18842. type: "button",
  18843. onClick: withModifiers(handleClose, ["stop"])
  18844. }, [createVNode(unref(ElIcon), null, {
  18845. default: withCtx(() => [createVNode(unref(close_default))]),
  18846. _: 1
  18847. })], 10, _hoisted_2$38)) : createCommentVNode("v-if", true)], 6)]),
  18848. _: 3
  18849. }, 8, ["name"]));
  18850. };
  18851. }
  18852. }));
  18853. //#endregion
  18854. //#region node_modules/element-plus/es/components/select/src/token.mjs
  18855. var selectGroupKey = Symbol("ElSelectGroup");
  18856. var selectKey = Symbol("ElSelect");
  18857. //#endregion
  18858. //#region node_modules/element-plus/es/components/select-v2/src/useProps.mjs
  18859. var defaultProps$2 = {
  18860. label: "label",
  18861. value: "value",
  18862. disabled: "disabled",
  18863. options: "options"
  18864. };
  18865. function useProps(props) {
  18866. const aliasProps = ref({
  18867. ...defaultProps$2,
  18868. ...props.props
  18869. });
  18870. let cache = { ...props.props };
  18871. watch(() => props.props, (val) => {
  18872. if (!isEqual$1(val, cache)) {
  18873. aliasProps.value = {
  18874. ...defaultProps$2,
  18875. ...val
  18876. };
  18877. cache = { ...val };
  18878. }
  18879. }, { deep: true });
  18880. const getLabel = (option) => get(option, aliasProps.value.label);
  18881. const getValue = (option) => get(option, aliasProps.value.value);
  18882. const getDisabled = (option) => get(option, aliasProps.value.disabled);
  18883. const getOptions = (option) => get(option, aliasProps.value.options);
  18884. return {
  18885. aliasProps,
  18886. getLabel,
  18887. getValue,
  18888. getDisabled,
  18889. getOptions
  18890. };
  18891. }
  18892. //#endregion
  18893. //#region node_modules/element-plus/es/components/select/src/select.mjs
  18894. var selectProps = buildProps({
  18895. name: String,
  18896. id: String,
  18897. modelValue: {
  18898. type: definePropType([
  18899. Array,
  18900. String,
  18901. Number,
  18902. Boolean,
  18903. Object
  18904. ]),
  18905. default: void 0
  18906. },
  18907. autocomplete: {
  18908. type: String,
  18909. default: "off"
  18910. },
  18911. automaticDropdown: Boolean,
  18912. size: useSizeProp,
  18913. effect: {
  18914. type: definePropType(String),
  18915. default: "light"
  18916. },
  18917. disabled: {
  18918. type: Boolean,
  18919. default: void 0
  18920. },
  18921. clearable: Boolean,
  18922. filterable: Boolean,
  18923. allowCreate: Boolean,
  18924. loading: Boolean,
  18925. popperClass: {
  18926. type: String,
  18927. default: ""
  18928. },
  18929. popperStyle: { type: definePropType([String, Object]) },
  18930. popperOptions: {
  18931. type: definePropType(Object),
  18932. default: () => ({})
  18933. },
  18934. remote: Boolean,
  18935. debounce: {
  18936. type: Number,
  18937. default: 300
  18938. },
  18939. loadingText: String,
  18940. noMatchText: String,
  18941. noDataText: String,
  18942. remoteMethod: { type: definePropType(Function) },
  18943. filterMethod: { type: definePropType(Function) },
  18944. multiple: Boolean,
  18945. multipleLimit: {
  18946. type: Number,
  18947. default: 0
  18948. },
  18949. placeholder: { type: String },
  18950. defaultFirstOption: Boolean,
  18951. reserveKeyword: {
  18952. type: Boolean,
  18953. default: true
  18954. },
  18955. valueKey: {
  18956. type: String,
  18957. default: "value"
  18958. },
  18959. collapseTags: Boolean,
  18960. collapseTagsTooltip: Boolean,
  18961. tagTooltip: {
  18962. type: definePropType(Object),
  18963. default: () => ({})
  18964. },
  18965. maxCollapseTags: {
  18966. type: Number,
  18967. default: 1
  18968. },
  18969. teleported: useTooltipContentProps.teleported,
  18970. persistent: {
  18971. type: Boolean,
  18972. default: true
  18973. },
  18974. clearIcon: {
  18975. type: iconPropType,
  18976. default: circle_close_default
  18977. },
  18978. fitInputWidth: Boolean,
  18979. suffixIcon: {
  18980. type: iconPropType,
  18981. default: arrow_down_default
  18982. },
  18983. tagType: {
  18984. ...tagProps.type,
  18985. default: "info"
  18986. },
  18987. tagEffect: {
  18988. ...tagProps.effect,
  18989. default: "light"
  18990. },
  18991. validateEvent: {
  18992. type: Boolean,
  18993. default: true
  18994. },
  18995. remoteShowSuffix: Boolean,
  18996. showArrow: {
  18997. type: Boolean,
  18998. default: true
  18999. },
  19000. offset: {
  19001. type: Number,
  19002. default: 12
  19003. },
  19004. placement: {
  19005. type: definePropType(String),
  19006. values: Ee,
  19007. default: "bottom-start"
  19008. },
  19009. fallbackPlacements: {
  19010. type: definePropType(Array),
  19011. default: [
  19012. "bottom-start",
  19013. "top-start",
  19014. "right",
  19015. "left"
  19016. ]
  19017. },
  19018. tabindex: {
  19019. type: [String, Number],
  19020. default: 0
  19021. },
  19022. appendTo: useTooltipContentProps.appendTo,
  19023. options: { type: definePropType(Array) },
  19024. props: {
  19025. type: definePropType(Object),
  19026. default: () => defaultProps$2
  19027. },
  19028. ...useEmptyValuesProps,
  19029. ...useAriaProps(["ariaLabel"])
  19030. });
  19031. var selectEmits = {
  19032. [UPDATE_MODEL_EVENT]: (val) => true,
  19033. [CHANGE_EVENT]: (val) => true,
  19034. "popup-scroll": scrollbarEmits.scroll,
  19035. "remove-tag": (val) => true,
  19036. "visible-change": (visible) => true,
  19037. focus: (evt) => evt instanceof FocusEvent,
  19038. blur: (evt) => evt instanceof FocusEvent,
  19039. clear: () => true
  19040. };
  19041. //#endregion
  19042. //#region node_modules/element-plus/es/components/select/src/option.mjs
  19043. var COMPONENT_NAME$14 = "ElOption";
  19044. var optionProps = buildProps({
  19045. value: {
  19046. type: [
  19047. String,
  19048. Number,
  19049. Boolean,
  19050. Object
  19051. ],
  19052. required: true
  19053. },
  19054. label: { type: [String, Number] },
  19055. created: Boolean,
  19056. disabled: Boolean
  19057. });
  19058. //#endregion
  19059. //#region node_modules/element-plus/es/components/select/src/useOption.mjs
  19060. function useOption$1(props, states) {
  19061. const select = inject(selectKey);
  19062. if (!select) throwError(COMPONENT_NAME$14, "usage: <el-select><el-option /></el-select/>");
  19063. const selectGroup = inject(selectGroupKey, { disabled: false });
  19064. const itemSelected = computed(() => {
  19065. return contains(castArray$1(select.props.modelValue), props.value);
  19066. });
  19067. const limitReached = computed(() => {
  19068. if (select.props.multiple) {
  19069. const modelValue = castArray$1(select.props.modelValue ?? []);
  19070. return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
  19071. } else return false;
  19072. });
  19073. const currentLabel = computed(() => {
  19074. return props.label ?? (isObject$2(props.value) ? "" : props.value);
  19075. });
  19076. const currentValue = computed(() => {
  19077. return props.value || props.label || "";
  19078. });
  19079. const isDisabled = computed(() => {
  19080. return props.disabled || states.groupDisabled || limitReached.value;
  19081. });
  19082. const instance = getCurrentInstance();
  19083. const contains = (arr = [], target) => {
  19084. if (!isObject$2(props.value)) return arr && arr.includes(target);
  19085. else {
  19086. const valueKey = select.props.valueKey;
  19087. return arr && arr.some((item) => {
  19088. return toRaw(get(item, valueKey)) === get(target, valueKey);
  19089. });
  19090. }
  19091. };
  19092. const hoverItem = () => {
  19093. if (!isDisabled.value) select.states.hoveringIndex = select.optionsArray.indexOf(instance.proxy);
  19094. };
  19095. const updateOption = (query) => {
  19096. states.visible = new RegExp(escapeStringRegexp(query), "i").test(String(currentLabel.value)) || props.created;
  19097. };
  19098. watch(() => currentLabel.value, () => {
  19099. if (!props.created && !select.props.remote) select.setSelected();
  19100. });
  19101. watch(() => props.value, (val, oldVal) => {
  19102. const { remote, valueKey } = select.props;
  19103. if (remote ? val !== oldVal : !isEqual$1(val, oldVal)) {
  19104. select.onOptionDestroy(oldVal, instance.proxy);
  19105. select.onOptionCreate(instance.proxy);
  19106. }
  19107. if (!props.created && !remote) {
  19108. if (valueKey && isObject$2(val) && isObject$2(oldVal) && val[valueKey] === oldVal[valueKey]) return;
  19109. select.setSelected();
  19110. }
  19111. });
  19112. watch(() => selectGroup.disabled, () => {
  19113. states.groupDisabled = selectGroup.disabled;
  19114. }, { immediate: true });
  19115. return {
  19116. select,
  19117. currentLabel,
  19118. currentValue,
  19119. itemSelected,
  19120. isDisabled,
  19121. hoverItem,
  19122. updateOption
  19123. };
  19124. }
  19125. //#endregion
  19126. //#region node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs
  19127. var option_vue_vue_type_script_lang_default = defineComponent({
  19128. name: COMPONENT_NAME$14,
  19129. componentName: COMPONENT_NAME$14,
  19130. props: optionProps,
  19131. setup(props) {
  19132. const ns = useNamespace("select");
  19133. const id = useId();
  19134. const containerKls = computed(() => [
  19135. ns.be("dropdown", "item"),
  19136. ns.is("disabled", unref(isDisabled)),
  19137. ns.is("selected", unref(itemSelected)),
  19138. ns.is("hovering", unref(hover))
  19139. ]);
  19140. const states = reactive({
  19141. index: -1,
  19142. groupDisabled: false,
  19143. visible: true,
  19144. hover: false
  19145. });
  19146. const { currentLabel, itemSelected, isDisabled, select, hoverItem, updateOption } = useOption$1(props, states);
  19147. const { visible, hover } = toRefs(states);
  19148. const vm = getCurrentInstance().proxy;
  19149. select.onOptionCreate(vm);
  19150. onBeforeUnmount(() => {
  19151. const key = vm.value;
  19152. nextTick(() => {
  19153. const { selected: selectedOptions } = select.states;
  19154. const doesSelected = selectedOptions.some((item) => {
  19155. return item.value === vm.value;
  19156. });
  19157. if (select.states.cachedOptions.get(key) === vm && !doesSelected) select.states.cachedOptions.delete(key);
  19158. });
  19159. select.onOptionDestroy(key, vm);
  19160. });
  19161. function selectOptionClick() {
  19162. if (!isDisabled.value) select.handleOptionSelect(vm);
  19163. }
  19164. return {
  19165. ns,
  19166. id,
  19167. containerKls,
  19168. currentLabel,
  19169. itemSelected,
  19170. isDisabled,
  19171. select,
  19172. visible,
  19173. hover,
  19174. states,
  19175. hoverItem,
  19176. updateOption,
  19177. selectOptionClick
  19178. };
  19179. }
  19180. });
  19181. //#endregion
  19182. //#region node_modules/element-plus/es/components/select/src/option2.mjs
  19183. var _hoisted_1$67 = [
  19184. "id",
  19185. "aria-disabled",
  19186. "aria-selected"
  19187. ];
  19188. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  19189. return withDirectives((openBlock(), createElementBlock("li", {
  19190. id: _ctx.id,
  19191. class: normalizeClass(_ctx.containerKls),
  19192. role: "option",
  19193. "aria-disabled": _ctx.isDisabled || void 0,
  19194. "aria-selected": _ctx.itemSelected,
  19195. onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
  19196. onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  19197. }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentLabel), 1)])], 42, _hoisted_1$67)), [[vShow, _ctx.visible]]);
  19198. }
  19199. var option_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_vue_vue_type_script_lang_default, [["render", _sfc_render$20]]);
  19200. //#endregion
  19201. //#region node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs
  19202. var option_group_vue_vue_type_script_lang_default = defineComponent({
  19203. name: "ElOptionGroup",
  19204. componentName: "ElOptionGroup",
  19205. props: {
  19206. label: String,
  19207. disabled: Boolean
  19208. },
  19209. setup(props) {
  19210. const ns = useNamespace("select");
  19211. const groupRef = ref();
  19212. const instance = getCurrentInstance();
  19213. const children = ref([]);
  19214. provide(selectGroupKey, reactive({ ...toRefs(props) }));
  19215. const visible = computed(() => children.value.some((option) => option.visible === true));
  19216. const isOption = (node) => node.type.name === "ElOption" && !!node.component?.proxy;
  19217. const flattedChildren = (node) => {
  19218. const nodes = castArray$1(node);
  19219. const children = [];
  19220. nodes.forEach((child) => {
  19221. if (!isVNode(child)) return;
  19222. if (isOption(child)) children.push(child.component.proxy);
  19223. else if (isArray$1(child.children) && child.children.length) children.push(...flattedChildren(child.children));
  19224. else if (child.component?.subTree) children.push(...flattedChildren(child.component.subTree));
  19225. });
  19226. return children;
  19227. };
  19228. const updateChildren = () => {
  19229. children.value = flattedChildren(instance.subTree);
  19230. };
  19231. onMounted(() => {
  19232. updateChildren();
  19233. });
  19234. useMutationObserver(groupRef, updateChildren, {
  19235. attributes: true,
  19236. subtree: true,
  19237. childList: true
  19238. });
  19239. return {
  19240. groupRef,
  19241. visible,
  19242. ns
  19243. };
  19244. }
  19245. });
  19246. //#endregion
  19247. //#region node_modules/element-plus/es/components/select/src/option-group.mjs
  19248. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  19249. return withDirectives((openBlock(), createElementBlock("ul", {
  19250. ref: "groupRef",
  19251. class: normalizeClass(_ctx.ns.be("group", "wrap"))
  19252. }, [createBaseVNode("li", { class: normalizeClass(_ctx.ns.be("group", "title")) }, toDisplayString(_ctx.label), 3), createBaseVNode("li", null, [createBaseVNode("ul", { class: normalizeClass(_ctx.ns.b("group")) }, [renderSlot(_ctx.$slots, "default")], 2)])], 2)), [[vShow, _ctx.visible]]);
  19253. }
  19254. var option_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_group_vue_vue_type_script_lang_default, [["render", _sfc_render$19]]);
  19255. //#endregion
  19256. //#region node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs
  19257. var select_dropdown_vue_vue_type_script_lang_default = defineComponent({
  19258. name: "ElSelectDropdown",
  19259. componentName: "ElSelectDropdown",
  19260. setup() {
  19261. const select = inject(selectKey);
  19262. const ns = useNamespace("select");
  19263. const popperClass = computed(() => select.props.popperClass);
  19264. const isMultiple = computed(() => select.props.multiple);
  19265. const isFitInputWidth = computed(() => select.props.fitInputWidth);
  19266. const minWidth = ref("");
  19267. function updateMinWidth() {
  19268. const offsetWidth = select.selectRef?.offsetWidth;
  19269. if (offsetWidth) minWidth.value = `${offsetWidth - 2}px`;
  19270. else minWidth.value = "";
  19271. }
  19272. onMounted(() => {
  19273. updateMinWidth();
  19274. useResizeObserver(select.selectRef, updateMinWidth);
  19275. });
  19276. return {
  19277. ns,
  19278. minWidth,
  19279. popperClass,
  19280. isMultiple,
  19281. isFitInputWidth
  19282. };
  19283. }
  19284. });
  19285. //#endregion
  19286. //#region node_modules/element-plus/es/components/select/src/select-dropdown.mjs
  19287. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  19288. return openBlock(), createElementBlock("div", {
  19289. class: normalizeClass([
  19290. _ctx.ns.b("dropdown"),
  19291. _ctx.ns.is("multiple", _ctx.isMultiple),
  19292. _ctx.popperClass
  19293. ]),
  19294. style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
  19295. }, [
  19296. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  19297. key: 0,
  19298. class: normalizeClass(_ctx.ns.be("dropdown", "header"))
  19299. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  19300. renderSlot(_ctx.$slots, "default"),
  19301. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  19302. key: 1,
  19303. class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
  19304. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  19305. ], 6);
  19306. }
  19307. var select_dropdown_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(select_dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$18]]);
  19308. //#endregion
  19309. //#region node_modules/element-plus/es/components/select/src/useSelect.mjs
  19310. var useSelect$2 = (props, emit) => {
  19311. const { t } = useLocale();
  19312. const slots = useSlots();
  19313. const contentId = useId();
  19314. const nsSelect = useNamespace("select");
  19315. const nsInput = useNamespace("input");
  19316. const states = reactive({
  19317. inputValue: "",
  19318. options: /* @__PURE__ */ new Map(),
  19319. cachedOptions: /* @__PURE__ */ new Map(),
  19320. optionValues: [],
  19321. selected: [],
  19322. selectionWidth: 0,
  19323. collapseItemWidth: 0,
  19324. selectedLabel: "",
  19325. hoveringIndex: -1,
  19326. previousQuery: null,
  19327. inputHovering: false,
  19328. menuVisibleOnFocus: false,
  19329. isBeforeHide: false
  19330. });
  19331. const selectRef = ref();
  19332. const selectionRef = ref();
  19333. const tooltipRef = ref();
  19334. const tagTooltipRef = ref();
  19335. const inputRef = ref();
  19336. const prefixRef = ref();
  19337. const suffixRef = ref();
  19338. const menuRef = ref();
  19339. const tagMenuRef = ref();
  19340. const collapseItemRef = ref();
  19341. const scrollbarRef = ref();
  19342. const expanded = ref(false);
  19343. const hoverOption = ref();
  19344. const debouncing = ref(false);
  19345. const { form, formItem } = useFormItem();
  19346. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  19347. const { valueOnClear, isEmptyValue } = useEmptyValues(props);
  19348. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: (e) => onInput(e) });
  19349. const selectDisabled = useFormDisabled();
  19350. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  19351. disabled: selectDisabled,
  19352. afterFocus() {
  19353. if (props.automaticDropdown && !expanded.value) {
  19354. expanded.value = true;
  19355. states.menuVisibleOnFocus = true;
  19356. }
  19357. },
  19358. beforeBlur(event) {
  19359. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  19360. },
  19361. afterBlur() {
  19362. expanded.value = false;
  19363. states.menuVisibleOnFocus = false;
  19364. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  19365. }
  19366. });
  19367. const hasModelValue = computed(() => {
  19368. return isArray$1(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
  19369. });
  19370. const needStatusIcon = computed(() => form?.statusIcon ?? false);
  19371. const showClearBtn = computed(() => {
  19372. return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
  19373. });
  19374. const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
  19375. const iconReverse = computed(() => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)));
  19376. const validateState = computed(() => formItem?.validateState || "");
  19377. const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
  19378. const debounce = computed(() => props.remote ? props.debounce : 0);
  19379. const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && states.options.size === 0);
  19380. const emptyText = computed(() => {
  19381. if (props.loading) return props.loadingText || t("el.select.loading");
  19382. else {
  19383. if (props.filterable && states.inputValue && states.options.size > 0 && filteredOptionsCount.value === 0) return props.noMatchText || t("el.select.noMatch");
  19384. if (states.options.size === 0) return props.noDataText || t("el.select.noData");
  19385. }
  19386. return null;
  19387. });
  19388. const filteredOptionsCount = computed(() => optionsArray.value.filter((option) => option.visible).length);
  19389. const optionsArray = computed(() => {
  19390. const list = Array.from(states.options.values());
  19391. const newList = [];
  19392. states.optionValues.forEach((item) => {
  19393. const index = list.findIndex((i) => i.value === item);
  19394. if (index > -1) newList.push(list[index]);
  19395. });
  19396. return newList.length >= list.length ? newList : list;
  19397. });
  19398. const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));
  19399. const showNewOption = computed(() => {
  19400. const hasExistingOption = optionsArray.value.filter((option) => {
  19401. return !option.created;
  19402. }).some((option) => {
  19403. return option.currentLabel === states.inputValue;
  19404. });
  19405. return props.filterable && props.allowCreate && states.inputValue !== "" && !hasExistingOption;
  19406. });
  19407. const updateOptions = () => {
  19408. if (props.filterable && isFunction$1(props.filterMethod)) return;
  19409. if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) return;
  19410. optionsArray.value.forEach((option) => {
  19411. option.updateOption?.(states.inputValue);
  19412. });
  19413. };
  19414. const selectSize = useFormSize();
  19415. const collapseTagSize = computed(() => ["small"].includes(selectSize.value) ? "small" : "default");
  19416. const dropdownMenuVisible = computed({
  19417. get() {
  19418. return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery));
  19419. },
  19420. set(val) {
  19421. expanded.value = val;
  19422. }
  19423. });
  19424. const shouldShowPlaceholder = computed(() => {
  19425. if (props.multiple && !isUndefined(props.modelValue)) return castArray$1(props.modelValue).length === 0 && !states.inputValue;
  19426. const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
  19427. return props.filterable || isUndefined(value) ? !states.inputValue : true;
  19428. });
  19429. const currentPlaceholder = computed(() => {
  19430. const _placeholder = props.placeholder ?? t("el.select.placeholder");
  19431. return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
  19432. });
  19433. const mouseEnterEventName = computed(() => isIOS ? null : "mouseenter");
  19434. watch(() => props.modelValue, (val, oldVal) => {
  19435. if (props.multiple) {
  19436. if (props.filterable && !props.reserveKeyword) {
  19437. states.inputValue = "";
  19438. handleQueryChange("");
  19439. }
  19440. }
  19441. setSelected();
  19442. if (!isEqual$1(val, oldVal) && props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
  19443. }, {
  19444. flush: "post",
  19445. deep: true
  19446. });
  19447. watch(() => expanded.value, (val) => {
  19448. if (val) handleQueryChange(states.inputValue);
  19449. else {
  19450. states.inputValue = "";
  19451. states.previousQuery = null;
  19452. states.isBeforeHide = true;
  19453. states.menuVisibleOnFocus = false;
  19454. }
  19455. });
  19456. watch(() => states.options.entries(), () => {
  19457. if (!isClient) return;
  19458. setSelected();
  19459. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) checkDefaultFirstOption();
  19460. }, { flush: "post" });
  19461. watch([() => states.hoveringIndex, optionsArray], ([val]) => {
  19462. if (isNumber(val) && val > -1) hoverOption.value = optionsArray.value[val] || {};
  19463. else hoverOption.value = {};
  19464. optionsArray.value.forEach((option) => {
  19465. option.hover = hoverOption.value === option;
  19466. });
  19467. });
  19468. watchEffect(() => {
  19469. if (states.isBeforeHide) return;
  19470. updateOptions();
  19471. });
  19472. const handleQueryChange = (val) => {
  19473. if (states.previousQuery === val || isComposing.value) return;
  19474. states.previousQuery = val;
  19475. if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
  19476. else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
  19477. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) nextTick(checkDefaultFirstOption);
  19478. else nextTick(updateHoveringIndex);
  19479. };
  19480. /**
  19481. * find and highlight first option as default selected
  19482. * @remark
  19483. * - if the first option in dropdown list is user-created,
  19484. * it would be at the end of the optionsArray
  19485. * so find it and set hover.
  19486. * (NOTE: there must be only one user-created option in dropdown list with query)
  19487. * - if there's no user-created option in list, just find the first one as usual
  19488. * (NOTE: exclude options that are disabled or in disabled-group)
  19489. */
  19490. const checkDefaultFirstOption = () => {
  19491. const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
  19492. const userCreatedOption = optionsInDropdown.find((n) => n.created);
  19493. const firstOriginOption = optionsInDropdown[0];
  19494. states.hoveringIndex = getValueIndex(optionsArray.value.map((item) => item.value), userCreatedOption || firstOriginOption);
  19495. };
  19496. const setSelected = () => {
  19497. if (!props.multiple) {
  19498. const option = getOption(isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue);
  19499. states.selectedLabel = option.currentLabel;
  19500. states.selected = [option];
  19501. return;
  19502. } else states.selectedLabel = "";
  19503. const result = [];
  19504. if (!isUndefined(props.modelValue)) castArray$1(props.modelValue).forEach((value) => {
  19505. result.push(getOption(value));
  19506. });
  19507. states.selected = result;
  19508. };
  19509. const getOption = (value) => {
  19510. let option;
  19511. const isObjectValue = isPlainObject$1(value);
  19512. for (let i = states.cachedOptions.size - 1; i >= 0; i--) {
  19513. const cachedOption = cachedOptionsArray.value[i];
  19514. if (isObjectValue ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey) : cachedOption.value === value) {
  19515. option = {
  19516. index: optionsArray.value.filter((opt) => !opt.created).indexOf(cachedOption),
  19517. value,
  19518. currentLabel: cachedOption.currentLabel,
  19519. get isDisabled() {
  19520. return cachedOption.isDisabled;
  19521. }
  19522. };
  19523. break;
  19524. }
  19525. }
  19526. if (option) return option;
  19527. return {
  19528. index: -1,
  19529. value,
  19530. currentLabel: isObjectValue ? value.label : value ?? ""
  19531. };
  19532. };
  19533. const updateHoveringIndex = () => {
  19534. const length = states.selected.length;
  19535. if (length > 0) {
  19536. const lastOption = states.selected[length - 1];
  19537. states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
  19538. } else states.hoveringIndex = -1;
  19539. };
  19540. const resetSelectionWidth = () => {
  19541. states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
  19542. };
  19543. const resetCollapseItemWidth = () => {
  19544. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  19545. };
  19546. const updateTooltip = () => {
  19547. tooltipRef.value?.updatePopper?.();
  19548. };
  19549. const updateTagTooltip = () => {
  19550. tagTooltipRef.value?.updatePopper?.();
  19551. };
  19552. const onInputChange = () => {
  19553. if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
  19554. handleQueryChange(states.inputValue);
  19555. };
  19556. const onInput = (event) => {
  19557. states.inputValue = event.target.value;
  19558. if (props.remote) {
  19559. debouncing.value = true;
  19560. debouncedOnInputChange();
  19561. } else return onInputChange();
  19562. };
  19563. const debouncedOnInputChange = useDebounceFn(() => {
  19564. onInputChange();
  19565. debouncing.value = false;
  19566. }, debounce);
  19567. const emitChange = (val) => {
  19568. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  19569. };
  19570. const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => {
  19571. const option = states.cachedOptions.get(it);
  19572. return !option?.disabled && !option?.states.groupDisabled;
  19573. });
  19574. const deletePrevTag = (e) => {
  19575. const code = getEventCode(e);
  19576. if (!props.multiple) return;
  19577. if (code === EVENT_CODE.delete) return;
  19578. if (e.target.value.length <= 0) {
  19579. const value = castArray$1(props.modelValue).slice();
  19580. const lastNotDisabledIndex = getLastNotDisabledIndex(value);
  19581. if (lastNotDisabledIndex < 0) return;
  19582. const removeTagValue = value[lastNotDisabledIndex];
  19583. value.splice(lastNotDisabledIndex, 1);
  19584. emit(UPDATE_MODEL_EVENT, value);
  19585. emitChange(value);
  19586. emit("remove-tag", removeTagValue);
  19587. }
  19588. };
  19589. const deleteTag = (event, tag) => {
  19590. const index = states.selected.indexOf(tag);
  19591. if (index > -1 && !selectDisabled.value) {
  19592. const value = castArray$1(props.modelValue).slice();
  19593. value.splice(index, 1);
  19594. emit(UPDATE_MODEL_EVENT, value);
  19595. emitChange(value);
  19596. emit("remove-tag", tag.value);
  19597. }
  19598. event.stopPropagation();
  19599. focus();
  19600. };
  19601. const deleteSelected = (event) => {
  19602. event.stopPropagation();
  19603. const value = props.multiple ? [] : valueOnClear.value;
  19604. if (props.multiple) {
  19605. for (const item of states.selected) if (item.isDisabled) value.push(item.value);
  19606. }
  19607. emit(UPDATE_MODEL_EVENT, value);
  19608. emitChange(value);
  19609. states.hoveringIndex = -1;
  19610. expanded.value = false;
  19611. emit("clear");
  19612. focus();
  19613. };
  19614. const handleOptionSelect = (option) => {
  19615. if (props.multiple) {
  19616. const value = castArray$1(props.modelValue ?? []).slice();
  19617. const optionIndex = getValueIndex(value, option);
  19618. if (optionIndex > -1) value.splice(optionIndex, 1);
  19619. else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) value.push(option.value);
  19620. emit(UPDATE_MODEL_EVENT, value);
  19621. emitChange(value);
  19622. if (option.created) handleQueryChange("");
  19623. if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
  19624. } else {
  19625. !isEqual$1(props.modelValue, option.value) && emit("update:modelValue", option.value);
  19626. emitChange(option.value);
  19627. expanded.value = false;
  19628. }
  19629. focus();
  19630. if (expanded.value) return;
  19631. nextTick(() => {
  19632. scrollToOption(option);
  19633. });
  19634. };
  19635. const getValueIndex = (arr, option) => {
  19636. if (isUndefined(option)) return -1;
  19637. if (!isObject$2(option.value)) return arr.indexOf(option.value);
  19638. return arr.findIndex((item) => {
  19639. return isEqual$1(get(item, props.valueKey), getValueKey(option));
  19640. });
  19641. };
  19642. const scrollToOption = (option) => {
  19643. const targetOption = isArray$1(option) ? option[option.length - 1] : option;
  19644. let target = null;
  19645. if (!isNil(targetOption?.value)) {
  19646. const options = optionsArray.value.filter((item) => item.value === targetOption.value);
  19647. if (options.length > 0) target = options[0].$el;
  19648. }
  19649. if (tooltipRef.value && target) {
  19650. const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(`.${nsSelect.be("dropdown", "wrap")}`);
  19651. if (menu) scrollIntoView(menu, target);
  19652. }
  19653. scrollbarRef.value?.handleScroll();
  19654. };
  19655. const onOptionCreate = (vm) => {
  19656. states.options.set(vm.value, vm);
  19657. states.cachedOptions.set(vm.value, vm);
  19658. };
  19659. const onOptionDestroy = (key, vm) => {
  19660. if (states.options.get(key) === vm) states.options.delete(key);
  19661. };
  19662. const popperRef = computed(() => {
  19663. return tooltipRef.value?.popperRef?.contentRef;
  19664. });
  19665. const handleMenuEnter = () => {
  19666. states.isBeforeHide = false;
  19667. nextTick(() => {
  19668. scrollbarRef.value?.update();
  19669. scrollToOption(states.selected);
  19670. });
  19671. };
  19672. const focus = () => {
  19673. inputRef.value?.focus();
  19674. };
  19675. const blur = () => {
  19676. if (expanded.value) {
  19677. expanded.value = false;
  19678. nextTick(() => inputRef.value?.blur());
  19679. return;
  19680. }
  19681. inputRef.value?.blur();
  19682. };
  19683. const handleClearClick = (event) => {
  19684. deleteSelected(event);
  19685. };
  19686. const handleClickOutside = (event) => {
  19687. expanded.value = false;
  19688. if (isFocused.value) {
  19689. const _event = new FocusEvent("blur", event);
  19690. nextTick(() => handleBlur(_event));
  19691. }
  19692. };
  19693. const handleEsc = () => {
  19694. if (states.inputValue.length > 0) states.inputValue = "";
  19695. else expanded.value = false;
  19696. };
  19697. const toggleMenu = (event) => {
  19698. if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
  19699. if (isIOS) states.inputHovering = true;
  19700. if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
  19701. else expanded.value = !expanded.value;
  19702. };
  19703. const selectOption = () => {
  19704. if (!expanded.value) toggleMenu();
  19705. else {
  19706. const option = optionsArray.value[states.hoveringIndex];
  19707. if (option && !option.isDisabled) handleOptionSelect(option);
  19708. }
  19709. };
  19710. const getValueKey = (item) => {
  19711. return isObject$2(item.value) ? get(item.value, props.valueKey) : item.value;
  19712. };
  19713. const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled));
  19714. const showTagList = computed(() => {
  19715. if (!props.multiple) return [];
  19716. return props.collapseTags ? states.selected.slice(0, props.maxCollapseTags) : states.selected;
  19717. });
  19718. const collapseTagList = computed(() => {
  19719. if (!props.multiple) return [];
  19720. return props.collapseTags ? states.selected.slice(props.maxCollapseTags) : [];
  19721. });
  19722. const navigateOptions = (direction) => {
  19723. if (!expanded.value) {
  19724. expanded.value = true;
  19725. return;
  19726. }
  19727. if (states.options.size === 0 || filteredOptionsCount.value === 0 || isComposing.value) return;
  19728. if (!optionsAllDisabled.value) {
  19729. if (direction === "next") {
  19730. states.hoveringIndex++;
  19731. if (states.hoveringIndex === states.options.size) states.hoveringIndex = 0;
  19732. } else if (direction === "prev") {
  19733. states.hoveringIndex--;
  19734. if (states.hoveringIndex < 0) states.hoveringIndex = states.options.size - 1;
  19735. }
  19736. const option = optionsArray.value[states.hoveringIndex];
  19737. if (option.isDisabled || !option.visible) navigateOptions(direction);
  19738. nextTick(() => scrollToOption(hoverOption.value));
  19739. }
  19740. };
  19741. const findFocusableIndex = (arr, start, step, len) => {
  19742. for (let i = start; i >= 0 && i < len; i += step) {
  19743. const obj = arr[i];
  19744. if (!obj?.isDisabled && obj?.visible) return i;
  19745. }
  19746. return null;
  19747. };
  19748. const focusOption = (targetIndex, mode) => {
  19749. const len = states.options.size;
  19750. if (len === 0) return;
  19751. const start = clamp$2(targetIndex, 0, len - 1);
  19752. const options = optionsArray.value;
  19753. const direction = mode === "up" ? -1 : 1;
  19754. const newIndex = findFocusableIndex(options, start, direction, len) ?? findFocusableIndex(options, start - direction, -direction, len);
  19755. if (newIndex != null) {
  19756. states.hoveringIndex = newIndex;
  19757. nextTick(() => scrollToOption(hoverOption.value));
  19758. }
  19759. };
  19760. const handleKeydown = (e) => {
  19761. const code = getEventCode(e);
  19762. let isPreventDefault = true;
  19763. switch (code) {
  19764. case EVENT_CODE.up:
  19765. navigateOptions("prev");
  19766. break;
  19767. case EVENT_CODE.down:
  19768. navigateOptions("next");
  19769. break;
  19770. case EVENT_CODE.enter:
  19771. case EVENT_CODE.numpadEnter:
  19772. if (!isComposing.value) selectOption();
  19773. break;
  19774. case EVENT_CODE.esc:
  19775. handleEsc();
  19776. break;
  19777. case EVENT_CODE.backspace:
  19778. isPreventDefault = false;
  19779. deletePrevTag(e);
  19780. return;
  19781. case EVENT_CODE.home:
  19782. if (!expanded.value) return;
  19783. focusOption(0, "down");
  19784. break;
  19785. case EVENT_CODE.end:
  19786. if (!expanded.value) return;
  19787. focusOption(states.options.size - 1, "up");
  19788. break;
  19789. case EVENT_CODE.pageUp:
  19790. if (!expanded.value) return;
  19791. focusOption(states.hoveringIndex - 10, "up");
  19792. break;
  19793. case EVENT_CODE.pageDown:
  19794. if (!expanded.value) return;
  19795. focusOption(states.hoveringIndex + 10, "down");
  19796. break;
  19797. default:
  19798. isPreventDefault = false;
  19799. break;
  19800. }
  19801. if (isPreventDefault) {
  19802. e.preventDefault();
  19803. e.stopPropagation();
  19804. }
  19805. };
  19806. const getGapWidth = () => {
  19807. if (!selectionRef.value) return 0;
  19808. const style = window.getComputedStyle(selectionRef.value);
  19809. return Number.parseFloat(style.gap || "6px");
  19810. };
  19811. const tagStyle = computed(() => {
  19812. const gapWidth = getGapWidth();
  19813. const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
  19814. return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
  19815. });
  19816. const collapseTagStyle = computed(() => {
  19817. return { maxWidth: `${states.selectionWidth}px` };
  19818. });
  19819. const popupScroll = (data) => {
  19820. emit("popup-scroll", data);
  19821. };
  19822. useResizeObserver(selectionRef, resetSelectionWidth);
  19823. useResizeObserver(wrapperRef, updateTooltip);
  19824. useResizeObserver(tagMenuRef, updateTagTooltip);
  19825. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  19826. let stop;
  19827. watch(() => dropdownMenuVisible.value, (newVal) => {
  19828. if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
  19829. else {
  19830. stop?.();
  19831. stop = void 0;
  19832. }
  19833. emit("visible-change", newVal);
  19834. });
  19835. onMounted(() => {
  19836. setSelected();
  19837. });
  19838. return {
  19839. inputId,
  19840. contentId,
  19841. nsSelect,
  19842. nsInput,
  19843. states,
  19844. isFocused,
  19845. expanded,
  19846. optionsArray,
  19847. hoverOption,
  19848. selectSize,
  19849. filteredOptionsCount,
  19850. updateTooltip,
  19851. updateTagTooltip,
  19852. debouncedOnInputChange,
  19853. onInput,
  19854. deletePrevTag,
  19855. deleteTag,
  19856. deleteSelected,
  19857. handleOptionSelect,
  19858. scrollToOption,
  19859. hasModelValue,
  19860. shouldShowPlaceholder,
  19861. currentPlaceholder,
  19862. mouseEnterEventName,
  19863. needStatusIcon,
  19864. showClearBtn,
  19865. iconComponent,
  19866. iconReverse,
  19867. validateState,
  19868. validateIcon,
  19869. showNewOption,
  19870. updateOptions,
  19871. collapseTagSize,
  19872. setSelected,
  19873. selectDisabled,
  19874. emptyText,
  19875. handleCompositionStart,
  19876. handleCompositionUpdate,
  19877. handleCompositionEnd,
  19878. handleKeydown,
  19879. onOptionCreate,
  19880. onOptionDestroy,
  19881. handleMenuEnter,
  19882. focus,
  19883. blur,
  19884. handleClearClick,
  19885. handleClickOutside,
  19886. handleEsc,
  19887. toggleMenu,
  19888. selectOption,
  19889. getValueKey,
  19890. navigateOptions,
  19891. dropdownMenuVisible,
  19892. showTagList,
  19893. collapseTagList,
  19894. popupScroll,
  19895. getOption,
  19896. tagStyle,
  19897. collapseTagStyle,
  19898. popperRef,
  19899. inputRef,
  19900. tooltipRef,
  19901. tagTooltipRef,
  19902. prefixRef,
  19903. suffixRef,
  19904. selectRef,
  19905. wrapperRef,
  19906. selectionRef,
  19907. scrollbarRef,
  19908. menuRef,
  19909. tagMenuRef,
  19910. collapseItemRef
  19911. };
  19912. };
  19913. //#endregion
  19914. //#region node_modules/element-plus/es/components/select/src/options.mjs
  19915. var options_default = defineComponent({
  19916. name: "ElOptions",
  19917. setup(_, { slots }) {
  19918. const select = inject(selectKey);
  19919. let cachedValueList = [];
  19920. return () => {
  19921. const children = slots.default?.();
  19922. const valueList = [];
  19923. function filterOptions(children) {
  19924. if (!isArray$1(children)) return;
  19925. children.forEach((item) => {
  19926. const name = (item?.type || {})?.name;
  19927. if (name === "ElOptionGroup") filterOptions(!isString(item.children) && !isArray$1(item.children) && isFunction$1(item.children?.default) ? item.children?.default() : item.children);
  19928. else if (name === "ElOption") valueList.push(item.props?.value);
  19929. else if (isArray$1(item.children)) filterOptions(item.children);
  19930. });
  19931. }
  19932. if (children.length) filterOptions(children[0]?.children);
  19933. if (!isEqual$1(valueList, cachedValueList)) {
  19934. cachedValueList = valueList;
  19935. if (select) select.states.optionValues = valueList;
  19936. }
  19937. return children;
  19938. };
  19939. }
  19940. });
  19941. //#endregion
  19942. //#region node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs
  19943. var COMPONENT_NAME$13 = "ElSelect";
  19944. var warnHandlerMap = /* @__PURE__ */ new WeakMap();
  19945. var createSelectWarnHandler = (appContext) => {
  19946. return (...args) => {
  19947. const message = args[0];
  19948. if (!message || message.includes("Slot \"default\" invoked outside of the render function") && args[2]?.includes("ElTreeSelect")) return;
  19949. const original = warnHandlerMap.get(appContext)?.originalWarnHandler;
  19950. if (original) {
  19951. original(...args);
  19952. return;
  19953. }
  19954. console.warn(...args);
  19955. };
  19956. };
  19957. var getWarnHandlerRecord = (appContext) => {
  19958. let record = warnHandlerMap.get(appContext);
  19959. if (!record) {
  19960. record = {
  19961. originalWarnHandler: appContext.config.warnHandler,
  19962. handler: createSelectWarnHandler(appContext),
  19963. count: 0
  19964. };
  19965. warnHandlerMap.set(appContext, record);
  19966. }
  19967. return record;
  19968. };
  19969. var select_vue_vue_type_script_lang_default$1 = defineComponent({
  19970. name: COMPONENT_NAME$13,
  19971. componentName: COMPONENT_NAME$13,
  19972. components: {
  19973. ElSelectMenu: select_dropdown_default$1,
  19974. ElOption: option_default,
  19975. ElOptions: options_default,
  19976. ElOptionGroup: option_group_default,
  19977. ElTag,
  19978. ElScrollbar,
  19979. ElTooltip,
  19980. ElIcon
  19981. },
  19982. directives: { ClickOutside },
  19983. props: selectProps,
  19984. emits: [
  19985. UPDATE_MODEL_EVENT,
  19986. CHANGE_EVENT,
  19987. "remove-tag",
  19988. "clear",
  19989. "visible-change",
  19990. "focus",
  19991. "blur",
  19992. "popup-scroll"
  19993. ],
  19994. setup(props, { emit, slots }) {
  19995. const instance = getCurrentInstance();
  19996. const warnRecord = getWarnHandlerRecord(instance.appContext);
  19997. warnRecord.count += 1;
  19998. instance.appContext.config.warnHandler = warnRecord.handler;
  19999. const modelValue = computed(() => {
  20000. const { modelValue: rawModelValue, multiple } = props;
  20001. const fallback = multiple ? [] : void 0;
  20002. if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
  20003. return multiple ? fallback : rawModelValue;
  20004. });
  20005. const _props = reactive({
  20006. ...toRefs(props),
  20007. modelValue
  20008. });
  20009. const API = useSelect$2(_props, emit);
  20010. const { calculatorRef, inputStyle } = useCalcInputWidth();
  20011. const { getLabel, getValue, getOptions, getDisabled } = useProps(props);
  20012. const getOptionProps = (option) => ({
  20013. label: getLabel(option),
  20014. value: getValue(option),
  20015. disabled: getDisabled(option)
  20016. });
  20017. const flatTreeSelectData = (data) => {
  20018. return data.reduce((acc, item) => {
  20019. acc.push(item);
  20020. if (item.children && item.children.length > 0) acc.push(...flatTreeSelectData(item.children));
  20021. return acc;
  20022. }, []);
  20023. };
  20024. const manuallyRenderSlots = (vnodes) => {
  20025. flattedChildren(vnodes || []).forEach((item) => {
  20026. if (isObject$2(item) && (item.type.name === "ElOption" || item.type.name === "ElTree")) {
  20027. const _name = item.type.name;
  20028. if (_name === "ElTree") flatTreeSelectData(item.props?.data || []).forEach((treeItem) => {
  20029. treeItem.currentLabel = treeItem.label || (isObject$2(treeItem.value) ? "" : treeItem.value);
  20030. API.onOptionCreate(treeItem);
  20031. });
  20032. else if (_name === "ElOption") {
  20033. const obj = { ...item.props };
  20034. obj.currentLabel = obj.label || (isObject$2(obj.value) ? "" : obj.value);
  20035. API.onOptionCreate(obj);
  20036. }
  20037. }
  20038. });
  20039. };
  20040. watch(() => [props.persistent || API.expanded.value || !slots.default ? void 0 : slots.default?.(), modelValue.value], () => {
  20041. if (props.persistent || API.expanded.value) return;
  20042. API.states.options.clear();
  20043. manuallyRenderSlots(slots.default?.());
  20044. }, { immediate: true });
  20045. provide(selectKey, reactive({
  20046. props: _props,
  20047. states: API.states,
  20048. selectRef: API.selectRef,
  20049. optionsArray: API.optionsArray,
  20050. setSelected: API.setSelected,
  20051. handleOptionSelect: API.handleOptionSelect,
  20052. onOptionCreate: API.onOptionCreate,
  20053. onOptionDestroy: API.onOptionDestroy
  20054. }));
  20055. const selectedLabel = computed(() => {
  20056. if (!props.multiple) return API.states.selectedLabel;
  20057. return API.states.selected.map((i) => i.currentLabel);
  20058. });
  20059. onBeforeUnmount(() => {
  20060. const record = warnHandlerMap.get(instance.appContext);
  20061. if (!record) return;
  20062. record.count -= 1;
  20063. if (record.count <= 0) {
  20064. instance.appContext.config.warnHandler = record.originalWarnHandler;
  20065. warnHandlerMap.delete(instance.appContext);
  20066. }
  20067. });
  20068. return {
  20069. ...API,
  20070. modelValue,
  20071. selectedLabel,
  20072. calculatorRef,
  20073. inputStyle,
  20074. getLabel,
  20075. getValue,
  20076. getOptions,
  20077. getDisabled,
  20078. getOptionProps
  20079. };
  20080. }
  20081. });
  20082. //#endregion
  20083. //#region node_modules/element-plus/es/components/select/src/select2.mjs
  20084. var _hoisted_1$66 = [
  20085. "id",
  20086. "value",
  20087. "name",
  20088. "disabled",
  20089. "autocomplete",
  20090. "tabindex",
  20091. "readonly",
  20092. "aria-activedescendant",
  20093. "aria-controls",
  20094. "aria-expanded",
  20095. "aria-label"
  20096. ];
  20097. var _hoisted_2$37 = ["textContent"];
  20098. var _hoisted_3$17 = { key: 1 };
  20099. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  20100. const _component_el_tag = resolveComponent("el-tag");
  20101. const _component_el_tooltip = resolveComponent("el-tooltip");
  20102. const _component_el_icon = resolveComponent("el-icon");
  20103. const _component_el_option = resolveComponent("el-option");
  20104. const _component_el_option_group = resolveComponent("el-option-group");
  20105. const _component_el_options = resolveComponent("el-options");
  20106. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  20107. const _component_el_select_menu = resolveComponent("el-select-menu");
  20108. const _directive_click_outside = resolveDirective("click-outside");
  20109. return withDirectives((openBlock(), createElementBlock("div", mergeProps({
  20110. ref: "selectRef",
  20111. class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]
  20112. }, { [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true) }, { onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false) }), [createVNode(_component_el_tooltip, {
  20113. ref: "tooltipRef",
  20114. visible: _ctx.dropdownMenuVisible,
  20115. placement: _ctx.placement,
  20116. teleported: _ctx.teleported,
  20117. "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
  20118. "popper-style": _ctx.popperStyle,
  20119. "popper-options": _ctx.popperOptions,
  20120. "fallback-placements": _ctx.fallbackPlacements,
  20121. effect: _ctx.effect,
  20122. pure: "",
  20123. trigger: "click",
  20124. transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
  20125. "stop-popper-mouse-event": false,
  20126. "gpu-acceleration": false,
  20127. persistent: _ctx.persistent,
  20128. "append-to": _ctx.appendTo,
  20129. "show-arrow": _ctx.showArrow,
  20130. offset: _ctx.offset,
  20131. onBeforeShow: _ctx.handleMenuEnter,
  20132. onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false)
  20133. }, {
  20134. default: withCtx(() => [createBaseVNode("div", {
  20135. ref: "wrapperRef",
  20136. class: normalizeClass([
  20137. _ctx.nsSelect.e("wrapper"),
  20138. _ctx.nsSelect.is("focused", _ctx.isFocused),
  20139. _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
  20140. _ctx.nsSelect.is("filterable", _ctx.filterable),
  20141. _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
  20142. ]),
  20143. onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
  20144. }, [
  20145. _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
  20146. key: 0,
  20147. ref: "prefixRef",
  20148. class: normalizeClass(_ctx.nsSelect.e("prefix"))
  20149. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  20150. createBaseVNode("div", {
  20151. ref: "selectionRef",
  20152. class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)])
  20153. }, [
  20154. _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
  20155. key: 0,
  20156. data: _ctx.states.selected,
  20157. deleteTag: _ctx.deleteTag,
  20158. selectDisabled: _ctx.selectDisabled
  20159. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
  20160. return openBlock(), createElementBlock("div", {
  20161. key: _ctx.getValueKey(item),
  20162. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  20163. }, [createVNode(_component_el_tag, {
  20164. closable: !_ctx.selectDisabled && !item.isDisabled,
  20165. size: _ctx.collapseTagSize,
  20166. type: _ctx.tagType,
  20167. effect: _ctx.tagEffect,
  20168. "disable-transitions": "",
  20169. style: normalizeStyle(_ctx.tagStyle),
  20170. onClose: ($event) => _ctx.deleteTag($event, item)
  20171. }, {
  20172. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  20173. index: item.index,
  20174. label: item.currentLabel,
  20175. value: item.value
  20176. }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
  20177. _: 2
  20178. }, 1032, [
  20179. "closable",
  20180. "size",
  20181. "type",
  20182. "effect",
  20183. "style",
  20184. "onClose"
  20185. ])], 2);
  20186. }), 128)), _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
  20187. key: 0,
  20188. ref: "tagTooltipRef",
  20189. disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
  20190. "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
  20191. "bottom",
  20192. "top",
  20193. "right",
  20194. "left"
  20195. ],
  20196. effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
  20197. placement: _ctx.tagTooltip?.placement ?? "bottom",
  20198. "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
  20199. "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
  20200. teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
  20201. "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
  20202. "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
  20203. transition: _ctx.tagTooltip?.transition,
  20204. "show-after": _ctx.tagTooltip?.showAfter,
  20205. "hide-after": _ctx.tagTooltip?.hideAfter,
  20206. "auto-close": _ctx.tagTooltip?.autoClose,
  20207. offset: _ctx.tagTooltip?.offset
  20208. }, {
  20209. default: withCtx(() => [createBaseVNode("div", {
  20210. ref: "collapseItemRef",
  20211. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  20212. }, [createVNode(_component_el_tag, {
  20213. closable: false,
  20214. size: _ctx.collapseTagSize,
  20215. type: _ctx.tagType,
  20216. effect: _ctx.tagEffect,
  20217. "disable-transitions": "",
  20218. style: normalizeStyle(_ctx.collapseTagStyle)
  20219. }, {
  20220. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)]),
  20221. _: 1
  20222. }, 8, [
  20223. "size",
  20224. "type",
  20225. "effect",
  20226. "style"
  20227. ])], 2)]),
  20228. content: withCtx(() => [createBaseVNode("div", {
  20229. ref: "tagMenuRef",
  20230. class: normalizeClass(_ctx.nsSelect.e("selection"))
  20231. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
  20232. return openBlock(), createElementBlock("div", {
  20233. key: _ctx.getValueKey(item),
  20234. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  20235. }, [createVNode(_component_el_tag, {
  20236. class: "in-tooltip",
  20237. closable: !_ctx.selectDisabled && !item.isDisabled,
  20238. size: _ctx.collapseTagSize,
  20239. type: _ctx.tagType,
  20240. effect: _ctx.tagEffect,
  20241. "disable-transitions": "",
  20242. onClose: ($event) => _ctx.deleteTag($event, item)
  20243. }, {
  20244. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  20245. index: item.index,
  20246. label: item.currentLabel,
  20247. value: item.value
  20248. }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
  20249. _: 2
  20250. }, 1032, [
  20251. "closable",
  20252. "size",
  20253. "type",
  20254. "effect",
  20255. "onClose"
  20256. ])], 2);
  20257. }), 128))], 2)]),
  20258. _: 3
  20259. }, 8, [
  20260. "disabled",
  20261. "fallback-placements",
  20262. "effect",
  20263. "placement",
  20264. "popper-class",
  20265. "popper-style",
  20266. "teleported",
  20267. "append-to",
  20268. "popper-options",
  20269. "transition",
  20270. "show-after",
  20271. "hide-after",
  20272. "auto-close",
  20273. "offset"
  20274. ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
  20275. createBaseVNode("div", { class: normalizeClass([
  20276. _ctx.nsSelect.e("selected-item"),
  20277. _ctx.nsSelect.e("input-wrapper"),
  20278. _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
  20279. ]) }, [createBaseVNode("input", {
  20280. id: _ctx.inputId,
  20281. ref: "inputRef",
  20282. value: _ctx.states.inputValue,
  20283. type: "text",
  20284. name: _ctx.name,
  20285. class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
  20286. disabled: _ctx.selectDisabled,
  20287. autocomplete: _ctx.autocomplete,
  20288. style: normalizeStyle(_ctx.inputStyle),
  20289. tabindex: _ctx.tabindex,
  20290. role: "combobox",
  20291. readonly: !_ctx.filterable,
  20292. spellcheck: "false",
  20293. "aria-activedescendant": _ctx.hoverOption?.id || "",
  20294. "aria-controls": _ctx.contentId,
  20295. "aria-expanded": _ctx.dropdownMenuVisible,
  20296. "aria-label": _ctx.ariaLabel,
  20297. "aria-autocomplete": "none",
  20298. "aria-haspopup": "listbox",
  20299. onKeydown: _cache[0] || (_cache[0] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
  20300. onCompositionstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  20301. onCompositionupdate: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  20302. onCompositionend: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  20303. onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  20304. onChange: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
  20305. onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
  20306. }, null, 46, _hoisted_1$66), _ctx.filterable ? (openBlock(), createElementBlock("span", {
  20307. key: 0,
  20308. ref: "calculatorRef",
  20309. "aria-hidden": "true",
  20310. class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
  20311. textContent: toDisplayString(_ctx.states.inputValue)
  20312. }, null, 10, _hoisted_2$37)) : createCommentVNode("v-if", true)], 2),
  20313. _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
  20314. key: 1,
  20315. class: normalizeClass([
  20316. _ctx.nsSelect.e("selected-item"),
  20317. _ctx.nsSelect.e("placeholder"),
  20318. _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
  20319. ])
  20320. }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
  20321. key: 0,
  20322. index: _ctx.getOption(_ctx.modelValue).index,
  20323. label: _ctx.currentPlaceholder,
  20324. value: _ctx.modelValue
  20325. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$17, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
  20326. ], 2),
  20327. createBaseVNode("div", {
  20328. ref: "suffixRef",
  20329. class: normalizeClass(_ctx.nsSelect.e("suffix"))
  20330. }, [
  20331. _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
  20332. key: 0,
  20333. class: normalizeClass([
  20334. _ctx.nsSelect.e("caret"),
  20335. _ctx.nsSelect.e("icon"),
  20336. _ctx.iconReverse
  20337. ])
  20338. }, {
  20339. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  20340. _: 1
  20341. }, 8, ["class"])) : createCommentVNode("v-if", true),
  20342. _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  20343. key: 1,
  20344. class: normalizeClass([
  20345. _ctx.nsSelect.e("caret"),
  20346. _ctx.nsSelect.e("icon"),
  20347. _ctx.nsSelect.e("clear")
  20348. ]),
  20349. onClick: _ctx.handleClearClick
  20350. }, {
  20351. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  20352. _: 1
  20353. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  20354. _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
  20355. key: 2,
  20356. class: normalizeClass([
  20357. _ctx.nsInput.e("icon"),
  20358. _ctx.nsInput.e("validateIcon"),
  20359. _ctx.nsInput.is("loading", _ctx.validateState === "validating")
  20360. ])
  20361. }, {
  20362. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
  20363. _: 1
  20364. }, 8, ["class"])) : createCommentVNode("v-if", true)
  20365. ], 2)
  20366. ], 2)]),
  20367. content: withCtx(() => [createVNode(_component_el_select_menu, { ref: "menuRef" }, {
  20368. default: withCtx(() => [
  20369. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  20370. key: 0,
  20371. class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
  20372. onClick: _cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"]))
  20373. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  20374. withDirectives(createVNode(_component_el_scrollbar, {
  20375. id: _ctx.contentId,
  20376. ref: "scrollbarRef",
  20377. tag: "ul",
  20378. "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
  20379. "view-class": _ctx.nsSelect.be("dropdown", "list"),
  20380. class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
  20381. role: "listbox",
  20382. "aria-label": _ctx.ariaLabel,
  20383. "aria-orientation": "vertical",
  20384. onScroll: _ctx.popupScroll
  20385. }, {
  20386. default: withCtx(() => [_ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
  20387. key: 0,
  20388. value: _ctx.states.inputValue,
  20389. created: true
  20390. }, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(_component_el_options, null, {
  20391. default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
  20392. return openBlock(), createElementBlock(Fragment, { key: index }, [_ctx.getOptions(option)?.length ? (openBlock(), createBlock(_component_el_option_group, {
  20393. key: 0,
  20394. label: _ctx.getLabel(option),
  20395. disabled: _ctx.getDisabled(option)
  20396. }, {
  20397. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getOptions(option), (item) => {
  20398. return openBlock(), createBlock(_component_el_option, mergeProps({ key: _ctx.getValue(item) }, { ref_for: true }, _ctx.getOptionProps(item)), null, 16);
  20399. }), 128))]),
  20400. _: 2
  20401. }, 1032, ["label", "disabled"])) : (openBlock(), createBlock(_component_el_option, mergeProps({
  20402. key: 1,
  20403. ref_for: true
  20404. }, _ctx.getOptionProps(option)), null, 16))], 64);
  20405. }), 128))])]),
  20406. _: 3
  20407. })]),
  20408. _: 3
  20409. }, 8, [
  20410. "id",
  20411. "wrap-class",
  20412. "view-class",
  20413. "class",
  20414. "aria-label",
  20415. "onScroll"
  20416. ]), [[vShow, _ctx.states.options.size > 0 && !_ctx.loading]]),
  20417. _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
  20418. key: 1,
  20419. class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
  20420. }, [renderSlot(_ctx.$slots, "loading")], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
  20421. key: 2,
  20422. class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
  20423. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)) : createCommentVNode("v-if", true),
  20424. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  20425. key: 3,
  20426. class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
  20427. onClick: _cache[9] || (_cache[9] = withModifiers(() => {}, ["stop"]))
  20428. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  20429. ]),
  20430. _: 3
  20431. }, 512)]),
  20432. _: 3
  20433. }, 8, [
  20434. "visible",
  20435. "placement",
  20436. "teleported",
  20437. "popper-class",
  20438. "popper-style",
  20439. "popper-options",
  20440. "fallback-placements",
  20441. "effect",
  20442. "transition",
  20443. "persistent",
  20444. "append-to",
  20445. "show-arrow",
  20446. "offset",
  20447. "onBeforeShow"
  20448. ])], 16)), [[
  20449. _directive_click_outside,
  20450. _ctx.handleClickOutside,
  20451. _ctx.popperRef
  20452. ]]);
  20453. }
  20454. //#endregion
  20455. //#region node_modules/element-plus/es/components/select/index.mjs
  20456. var ElSelect = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default$1, [["render", _sfc_render$17]]), {
  20457. Option: option_default,
  20458. OptionGroup: option_group_default
  20459. });
  20460. var ElOption = withNoopInstall(option_default);
  20461. var ElOptionGroup = withNoopInstall(option_group_default);
  20462. //#endregion
  20463. //#region node_modules/element-plus/es/components/calendar/src/date-table.mjs
  20464. var getPrevMonthLastDays = (date, count) => {
  20465. const lastDay = date.subtract(1, "month").endOf("month").date();
  20466. return rangeArr(count).map((_, index) => lastDay - (count - index - 1));
  20467. };
  20468. var getMonthDays = (date) => {
  20469. return rangeArr(date.daysInMonth()).map((_, index) => index + 1);
  20470. };
  20471. var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
  20472. const start = index * 7;
  20473. return days.slice(start, start + 7);
  20474. });
  20475. /**
  20476. * @deprecated Removed after 3.0.0, Use `DateTableProps` instead.
  20477. */
  20478. var dateTableProps = buildProps({
  20479. selectedDay: { type: definePropType(Object) },
  20480. range: { type: definePropType(Array) },
  20481. date: {
  20482. type: definePropType(Object),
  20483. required: true
  20484. },
  20485. hideHeader: { type: Boolean }
  20486. });
  20487. var dateTableEmits = { pick: (value) => isObject$2(value) };
  20488. //#endregion
  20489. //#region node_modules/element-plus/es/components/calendar/src/use-date-table.mjs
  20490. var import_localeData = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  20491. (function(n, e) {
  20492. "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
  20493. })(exports, (function() {
  20494. "use strict";
  20495. return function(n, e, t) {
  20496. var r = e.prototype, o = function(n) {
  20497. return n && (n.indexOf ? n : n.s);
  20498. }, u = function(n, e, t, r, u) {
  20499. var i = n.name ? n : n.$locale(), a = o(i[e]), s = o(i[t]), f = a || s.map((function(n) {
  20500. return n.slice(0, r);
  20501. }));
  20502. if (!u) return f;
  20503. var d = i.weekStart;
  20504. return f.map((function(n, e) {
  20505. return f[(e + (d || 0)) % 7];
  20506. }));
  20507. }, i = function() {
  20508. return t.Ls[t.locale()];
  20509. }, a = function(n, e) {
  20510. return n.formats[e] || function(n) {
  20511. return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(n, e, t) {
  20512. return e || t.slice(1);
  20513. }));
  20514. }(n.formats[e.toUpperCase()]);
  20515. }, s = function() {
  20516. var n = this;
  20517. return {
  20518. months: function(e) {
  20519. return e ? e.format("MMMM") : u(n, "months");
  20520. },
  20521. monthsShort: function(e) {
  20522. return e ? e.format("MMM") : u(n, "monthsShort", "months", 3);
  20523. },
  20524. firstDayOfWeek: function() {
  20525. return n.$locale().weekStart || 0;
  20526. },
  20527. weekdays: function(e) {
  20528. return e ? e.format("dddd") : u(n, "weekdays");
  20529. },
  20530. weekdaysMin: function(e) {
  20531. return e ? e.format("dd") : u(n, "weekdaysMin", "weekdays", 2);
  20532. },
  20533. weekdaysShort: function(e) {
  20534. return e ? e.format("ddd") : u(n, "weekdaysShort", "weekdays", 3);
  20535. },
  20536. longDateFormat: function(e) {
  20537. return a(n.$locale(), e);
  20538. },
  20539. meridiem: this.$locale().meridiem,
  20540. ordinal: this.$locale().ordinal
  20541. };
  20542. };
  20543. r.localeData = function() {
  20544. return s.bind(this)();
  20545. }, t.localeData = function() {
  20546. var n = i();
  20547. return {
  20548. firstDayOfWeek: function() {
  20549. return n.weekStart || 0;
  20550. },
  20551. weekdays: function() {
  20552. return t.weekdays();
  20553. },
  20554. weekdaysShort: function() {
  20555. return t.weekdaysShort();
  20556. },
  20557. weekdaysMin: function() {
  20558. return t.weekdaysMin();
  20559. },
  20560. months: function() {
  20561. return t.months();
  20562. },
  20563. monthsShort: function() {
  20564. return t.monthsShort();
  20565. },
  20566. longDateFormat: function(e) {
  20567. return a(n, e);
  20568. },
  20569. meridiem: n.meridiem,
  20570. ordinal: n.ordinal
  20571. };
  20572. }, t.months = function() {
  20573. return u(i(), "months");
  20574. }, t.monthsShort = function() {
  20575. return u(i(), "monthsShort", "months", 3);
  20576. }, t.weekdays = function(n) {
  20577. return u(i(), "weekdays", null, null, n);
  20578. }, t.weekdaysShort = function(n) {
  20579. return u(i(), "weekdaysShort", "weekdays", 3, n);
  20580. }, t.weekdaysMin = function(n) {
  20581. return u(i(), "weekdaysMin", "weekdays", 2, n);
  20582. };
  20583. };
  20584. }));
  20585. })))(), 1);
  20586. var useDateTable = (props, emit) => {
  20587. import_dayjs_min.default.extend(import_localeData.default);
  20588. const firstDayOfWeek = import_dayjs_min.default.localeData().firstDayOfWeek();
  20589. const { t, lang } = useLocale();
  20590. const now = (0, import_dayjs_min.default)().locale(lang.value);
  20591. const isInRange = computed(() => !!props.range && !!props.range.length);
  20592. const rows = computed(() => {
  20593. let days = [];
  20594. if (isInRange.value) {
  20595. const [start, end] = props.range;
  20596. const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
  20597. text: start.date() + index,
  20598. type: "current"
  20599. }));
  20600. let remaining = currentMonthRange.length % 7;
  20601. remaining = remaining === 0 ? 0 : 7 - remaining;
  20602. const nextMonthRange = rangeArr(remaining).map((_, index) => ({
  20603. text: index + 1,
  20604. type: "next"
  20605. }));
  20606. days = currentMonthRange.concat(nextMonthRange);
  20607. } else {
  20608. const firstDay = props.date.startOf("month").day();
  20609. const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
  20610. text: day,
  20611. type: "prev"
  20612. }));
  20613. const currentMonthDays = getMonthDays(props.date).map((day) => ({
  20614. text: day,
  20615. type: "current"
  20616. }));
  20617. days = [...prevMonthDays, ...currentMonthDays];
  20618. const nextMonthDays = rangeArr(7 - (days.length % 7 || 7)).map((_, index) => ({
  20619. text: index + 1,
  20620. type: "next"
  20621. }));
  20622. days = days.concat(nextMonthDays);
  20623. }
  20624. return toNestedArr(days);
  20625. });
  20626. const weekDays = computed(() => {
  20627. const start = firstDayOfWeek;
  20628. if (start === 0) return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`));
  20629. else return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_) => t(`el.datepicker.weeks.${_}`));
  20630. });
  20631. const getFormattedDate = (day, type) => {
  20632. switch (type) {
  20633. case "prev": return props.date.startOf("month").subtract(1, "month").date(day);
  20634. case "next": return props.date.startOf("month").add(1, "month").date(day);
  20635. case "current": return props.date.date(day);
  20636. }
  20637. };
  20638. const handlePickDay = ({ text, type }) => {
  20639. emit("pick", getFormattedDate(text, type));
  20640. };
  20641. const getSlotData = ({ text, type }) => {
  20642. const day = getFormattedDate(text, type);
  20643. return {
  20644. isSelected: day.isSame(props.selectedDay),
  20645. type: `${type}-month`,
  20646. day: day.format("YYYY-MM-DD"),
  20647. date: day.toDate()
  20648. };
  20649. };
  20650. return {
  20651. now,
  20652. isInRange,
  20653. rows,
  20654. weekDays,
  20655. getFormattedDate,
  20656. handlePickDay,
  20657. getSlotData
  20658. };
  20659. };
  20660. //#endregion
  20661. //#region node_modules/element-plus/es/components/calendar/src/date-table.vue_vue_type_script_setup_true_lang.mjs
  20662. var _hoisted_1$65 = { key: 0 };
  20663. var _hoisted_2$36 = ["onClick"];
  20664. //#endregion
  20665. //#region node_modules/element-plus/es/components/calendar/src/date-table2.mjs
  20666. var date_table_default = /* @__PURE__ */ defineComponent({
  20667. name: "DateTable",
  20668. __name: "date-table",
  20669. props: dateTableProps,
  20670. emits: dateTableEmits,
  20671. setup(__props, { expose: __expose, emit: __emit }) {
  20672. const props = __props;
  20673. const { isInRange, now, rows, weekDays, getFormattedDate, handlePickDay, getSlotData } = useDateTable(props, __emit);
  20674. const nsTable = useNamespace("calendar-table");
  20675. const nsDay = useNamespace("calendar-day");
  20676. const getCellClass = ({ text, type }) => {
  20677. const classes = [type];
  20678. if (type === "current") {
  20679. const date = getFormattedDate(text, type);
  20680. if (date.isSame(props.selectedDay, "day")) classes.push(nsDay.is("selected"));
  20681. if (date.isSame(now, "day")) classes.push(nsDay.is("today"));
  20682. }
  20683. return classes;
  20684. };
  20685. __expose({ getFormattedDate });
  20686. return (_ctx, _cache) => {
  20687. return openBlock(), createElementBlock("table", {
  20688. class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
  20689. cellspacing: "0",
  20690. cellpadding: "0"
  20691. }, [!__props.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_1$65, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
  20692. return openBlock(), createElementBlock("th", {
  20693. key: day,
  20694. scope: "col"
  20695. }, toDisplayString(day), 1);
  20696. }), 128))])])) : createCommentVNode("v-if", true), createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
  20697. return openBlock(), createElementBlock("tr", {
  20698. key: index,
  20699. class: normalizeClass({
  20700. [unref(nsTable).e("row")]: true,
  20701. [unref(nsTable).em("row", "hide-border")]: index === 0 && __props.hideHeader
  20702. })
  20703. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
  20704. return openBlock(), createElementBlock("td", {
  20705. key,
  20706. class: normalizeClass(getCellClass(cell)),
  20707. onClick: ($event) => unref(handlePickDay)(cell)
  20708. }, [createBaseVNode("div", { class: normalizeClass(unref(nsDay).b()) }, [renderSlot(_ctx.$slots, "date-cell", { data: unref(getSlotData)(cell) }, () => [createBaseVNode("span", null, toDisplayString(cell.text), 1)])], 2)], 10, _hoisted_2$36);
  20709. }), 128))], 2);
  20710. }), 128))])], 2);
  20711. };
  20712. }
  20713. });
  20714. //#endregion
  20715. //#region node_modules/element-plus/es/components/calendar/src/use-calendar.mjs
  20716. var adjacentMonth = (start, end) => {
  20717. const firstMonthLastDay = start.endOf("month");
  20718. const lastMonthFirstDay = end.startOf("month");
  20719. const lastMonthStartDay = firstMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  20720. return [[start, firstMonthLastDay], [lastMonthStartDay.startOf("week"), end]];
  20721. };
  20722. var threeConsecutiveMonth = (start, end) => {
  20723. const firstMonthLastDay = start.endOf("month");
  20724. const secondMonthFirstDay = start.add(1, "month").startOf("month");
  20725. const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
  20726. const secondMonthLastDay = secondMonthStartDay.endOf("month");
  20727. const lastMonthFirstDay = end.startOf("month");
  20728. const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  20729. return [
  20730. [start, firstMonthLastDay],
  20731. [secondMonthStartDay.startOf("week"), secondMonthLastDay],
  20732. [lastMonthStartDay.startOf("week"), end]
  20733. ];
  20734. };
  20735. var useCalendar = (props, emit, componentName) => {
  20736. const { lang } = useLocale();
  20737. const selectedDay = ref();
  20738. const now = (0, import_dayjs_min.default)().locale(lang.value);
  20739. const realSelectedDay = computed({
  20740. get() {
  20741. if (!props.modelValue) return selectedDay.value;
  20742. return date.value;
  20743. },
  20744. set(val) {
  20745. if (!val) return;
  20746. selectedDay.value = val;
  20747. const result = val.toDate();
  20748. emit(INPUT_EVENT, result);
  20749. emit(UPDATE_MODEL_EVENT, result);
  20750. }
  20751. });
  20752. const validatedRange = computed(() => {
  20753. if (!props.range || !isArray$1(props.range) || props.range.length !== 2 || props.range.some((item) => !isDate(item))) return [];
  20754. const [startDayjs, endDayjs] = props.range.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
  20755. if (startDayjs.isAfter(endDayjs)) {
  20756. debugWarn(componentName, "end time should be greater than start time");
  20757. return [];
  20758. }
  20759. if (startDayjs.isSame(endDayjs, "month")) return calculateValidatedDateRange(startDayjs, endDayjs);
  20760. else {
  20761. if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
  20762. debugWarn(componentName, "start time and end time interval must not exceed two months");
  20763. return [];
  20764. }
  20765. return calculateValidatedDateRange(startDayjs, endDayjs);
  20766. }
  20767. });
  20768. const date = computed(() => {
  20769. if (!props.modelValue) return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
  20770. else return (0, import_dayjs_min.default)(props.modelValue).locale(lang.value);
  20771. });
  20772. const prevMonthDayjs = computed(() => date.value.subtract(1, "month").date(1));
  20773. const nextMonthDayjs = computed(() => date.value.add(1, "month").date(1));
  20774. const prevYearDayjs = computed(() => date.value.subtract(1, "year").date(1));
  20775. const nextYearDayjs = computed(() => date.value.add(1, "year").date(1));
  20776. const calculateValidatedDateRange = (startDayjs, endDayjs) => {
  20777. const firstDay = startDayjs.startOf("week");
  20778. const lastDay = endDayjs.endOf("week");
  20779. const firstMonth = firstDay.get("month");
  20780. const lastMonth = lastDay.get("month");
  20781. if (firstMonth === lastMonth) return [[firstDay, lastDay]];
  20782. else if ((firstMonth + 1) % 12 === lastMonth) return adjacentMonth(firstDay, lastDay);
  20783. else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) return threeConsecutiveMonth(firstDay, lastDay);
  20784. else {
  20785. debugWarn(componentName, "start time and end time interval must not exceed two months");
  20786. return [];
  20787. }
  20788. };
  20789. const pickDay = (day) => {
  20790. realSelectedDay.value = day;
  20791. };
  20792. const selectDate = (type) => {
  20793. const day = {
  20794. "prev-month": prevMonthDayjs.value,
  20795. "next-month": nextMonthDayjs.value,
  20796. "prev-year": prevYearDayjs.value,
  20797. "next-year": nextYearDayjs.value,
  20798. today: now
  20799. }[type];
  20800. if (!day.isSame(date.value, "day")) pickDay(day);
  20801. };
  20802. const handleDateChange = (date) => {
  20803. if (date === "today") selectDate("today");
  20804. else pickDay(date);
  20805. };
  20806. return {
  20807. calculateValidatedDateRange,
  20808. date,
  20809. realSelectedDay,
  20810. pickDay,
  20811. selectDate,
  20812. validatedRange,
  20813. handleDateChange
  20814. };
  20815. };
  20816. //#endregion
  20817. //#region node_modules/element-plus/es/components/calendar/src/select-controller2.mjs
  20818. var select_controller_default = /* @__PURE__ */ defineComponent({
  20819. name: "SelectController",
  20820. __name: "select-controller",
  20821. props: buildProps({
  20822. date: {
  20823. type: definePropType(Object),
  20824. required: true
  20825. },
  20826. formatter: { type: definePropType(Function) }
  20827. }),
  20828. emits: { "date-change": (date) => isObject$2(date) || isString(date) },
  20829. setup(__props, { emit: __emit }) {
  20830. const props = __props;
  20831. const emit = __emit;
  20832. const nsSelect = useNamespace("calendar-select");
  20833. const { t, lang } = useLocale();
  20834. const monthOptions = Array.from({ length: 12 }, (_, index) => {
  20835. const actualMonth = index + 1;
  20836. return {
  20837. value: actualMonth,
  20838. label: isFunction$1(props.formatter) ? props.formatter(actualMonth, "month") : actualMonth
  20839. };
  20840. });
  20841. const yearValue = computed(() => props.date.year());
  20842. const monthValue = computed(() => props.date.month() + 1);
  20843. const yearOptions = computed(() => {
  20844. const years = [];
  20845. for (let i = -10; i < 10; i++) {
  20846. const year = yearValue.value + i;
  20847. if (year > 0) {
  20848. const label = isFunction$1(props.formatter) ? props.formatter(year, "year") : year;
  20849. years.push({
  20850. value: year,
  20851. label
  20852. });
  20853. }
  20854. }
  20855. return years;
  20856. });
  20857. const handleYearChange = (year) => {
  20858. emit("date-change", (0, import_dayjs_min.default)(new Date(year, monthValue.value - 1, 1)).locale(lang.value));
  20859. };
  20860. const handleMonthChange = (month) => {
  20861. emit("date-change", (0, import_dayjs_min.default)(new Date(yearValue.value, month - 1, 1)).locale(lang.value));
  20862. };
  20863. const selectToday = () => {
  20864. emit("date-change", "today");
  20865. };
  20866. return (_ctx, _cache) => {
  20867. return openBlock(), createElementBlock(Fragment, null, [
  20868. createVNode(unref(ElSelect), {
  20869. "model-value": yearValue.value,
  20870. size: "small",
  20871. class: normalizeClass(unref(nsSelect).e("year")),
  20872. "validate-event": false,
  20873. options: yearOptions.value,
  20874. onChange: handleYearChange
  20875. }, null, 8, [
  20876. "model-value",
  20877. "class",
  20878. "options"
  20879. ]),
  20880. createVNode(unref(ElSelect), {
  20881. "model-value": monthValue.value,
  20882. size: "small",
  20883. class: normalizeClass(unref(nsSelect).e("month")),
  20884. "validate-event": false,
  20885. options: unref(monthOptions),
  20886. onChange: handleMonthChange
  20887. }, null, 8, [
  20888. "model-value",
  20889. "class",
  20890. "options"
  20891. ]),
  20892. createVNode(unref(ElButton), {
  20893. size: "small",
  20894. onClick: selectToday
  20895. }, {
  20896. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
  20897. _: 1
  20898. })
  20899. ], 64);
  20900. };
  20901. }
  20902. });
  20903. //#endregion
  20904. //#region node_modules/element-plus/es/components/calendar/src/calendar.vue_vue_type_script_setup_true_lang.mjs
  20905. var COMPONENT_NAME$12 = "ElCalendar";
  20906. //#endregion
  20907. //#region node_modules/element-plus/es/components/calendar/index.mjs
  20908. var ElCalendar = withInstall(/* @__PURE__ */ defineComponent({
  20909. name: COMPONENT_NAME$12,
  20910. __name: "calendar",
  20911. props: calendarProps,
  20912. emits: calendarEmits,
  20913. setup(__props, { expose: __expose, emit: __emit }) {
  20914. const ns = useNamespace("calendar");
  20915. const { calculateValidatedDateRange, date, pickDay, realSelectedDay, selectDate, validatedRange, handleDateChange } = useCalendar(__props, __emit, COMPONENT_NAME$12);
  20916. const { t } = useLocale();
  20917. const i18nDate = computed(() => {
  20918. const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
  20919. return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
  20920. });
  20921. __expose({
  20922. selectedDay: realSelectedDay,
  20923. pickDay,
  20924. selectDate,
  20925. calculateValidatedDateRange
  20926. });
  20927. return (_ctx, _cache) => {
  20928. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [renderSlot(_ctx.$slots, "header", { date: i18nDate.value }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, toDisplayString(i18nDate.value), 3), unref(validatedRange).length === 0 && __props.controllerType === "button" ? (openBlock(), createElementBlock("div", {
  20929. key: 0,
  20930. class: normalizeClass(unref(ns).e("button-group"))
  20931. }, [createVNode(unref(ElButtonGroup), null, {
  20932. default: withCtx(() => [
  20933. createVNode(unref(ElButton), {
  20934. size: "small",
  20935. onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month"))
  20936. }, {
  20937. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)]),
  20938. _: 1
  20939. }),
  20940. createVNode(unref(ElButton), {
  20941. size: "small",
  20942. onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today"))
  20943. }, {
  20944. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
  20945. _: 1
  20946. }),
  20947. createVNode(unref(ElButton), {
  20948. size: "small",
  20949. onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month"))
  20950. }, {
  20951. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)]),
  20952. _: 1
  20953. })
  20954. ]),
  20955. _: 1
  20956. })], 2)) : unref(validatedRange).length === 0 && __props.controllerType === "select" ? (openBlock(), createElementBlock("div", {
  20957. key: 1,
  20958. class: normalizeClass(unref(ns).e("select-controller"))
  20959. }, [createVNode(select_controller_default, {
  20960. date: unref(date),
  20961. formatter: __props.formatter,
  20962. onDateChange: unref(handleDateChange)
  20963. }, null, 8, [
  20964. "date",
  20965. "formatter",
  20966. "onDateChange"
  20967. ])], 2)) : createCommentVNode("v-if", true)])], 2), unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
  20968. key: 0,
  20969. class: normalizeClass(unref(ns).e("body"))
  20970. }, [createVNode(date_table_default, {
  20971. date: unref(date),
  20972. "selected-day": unref(realSelectedDay),
  20973. onPick: unref(pickDay)
  20974. }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
  20975. name: "date-cell",
  20976. fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))]),
  20977. key: "0"
  20978. } : void 0]), 1032, [
  20979. "date",
  20980. "selected-day",
  20981. "onPick"
  20982. ])], 2)) : (openBlock(), createElementBlock("div", {
  20983. key: 1,
  20984. class: normalizeClass(unref(ns).e("body"))
  20985. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
  20986. return openBlock(), createBlock(date_table_default, {
  20987. key: index,
  20988. date: range_[0],
  20989. "selected-day": unref(realSelectedDay),
  20990. range: range_,
  20991. "hide-header": index !== 0,
  20992. onPick: unref(pickDay)
  20993. }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
  20994. name: "date-cell",
  20995. fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", mergeProps({ ref_for: true }, data))]),
  20996. key: "0"
  20997. } : void 0]), 1032, [
  20998. "date",
  20999. "selected-day",
  21000. "range",
  21001. "hide-header",
  21002. "onPick"
  21003. ]);
  21004. }), 128))], 2))], 2);
  21005. };
  21006. }
  21007. }));
  21008. //#endregion
  21009. //#region node_modules/element-plus/es/components/card/src/card.mjs
  21010. /**
  21011. * @deprecated Removed after 3.0.0, Use `CardProps` instead.
  21012. */
  21013. var cardProps = buildProps({
  21014. header: {
  21015. type: String,
  21016. default: ""
  21017. },
  21018. footer: {
  21019. type: String,
  21020. default: ""
  21021. },
  21022. bodyStyle: {
  21023. type: definePropType([
  21024. String,
  21025. Object,
  21026. Array
  21027. ]),
  21028. default: ""
  21029. },
  21030. headerClass: String,
  21031. bodyClass: String,
  21032. footerClass: String,
  21033. shadow: {
  21034. type: String,
  21035. values: [
  21036. "always",
  21037. "hover",
  21038. "never"
  21039. ],
  21040. default: void 0
  21041. }
  21042. });
  21043. var cardContextKey = Symbol("cardContextKey");
  21044. //#endregion
  21045. //#region node_modules/element-plus/es/components/card/index.mjs
  21046. var ElCard = withInstall(/* @__PURE__ */ defineComponent({
  21047. name: "ElCard",
  21048. __name: "card",
  21049. props: cardProps,
  21050. setup(__props) {
  21051. const globalConfig = useGlobalConfig("card");
  21052. const ns = useNamespace("card");
  21053. return (_ctx, _cache) => {
  21054. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).is(`${__props.shadow || unref(globalConfig)?.shadow || "always"}-shadow`)]) }, [
  21055. _ctx.$slots.header || __props.header ? (openBlock(), createElementBlock("div", {
  21056. key: 0,
  21057. class: normalizeClass([unref(ns).e("header"), __props.headerClass])
  21058. }, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(__props.header), 1)])], 2)) : createCommentVNode("v-if", true),
  21059. createBaseVNode("div", {
  21060. class: normalizeClass([unref(ns).e("body"), __props.bodyClass]),
  21061. style: normalizeStyle(__props.bodyStyle)
  21062. }, [renderSlot(_ctx.$slots, "default")], 6),
  21063. _ctx.$slots.footer || __props.footer ? (openBlock(), createElementBlock("div", {
  21064. key: 1,
  21065. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  21066. }, [renderSlot(_ctx.$slots, "footer", {}, () => [createTextVNode(toDisplayString(__props.footer), 1)])], 2)) : createCommentVNode("v-if", true)
  21067. ], 2);
  21068. };
  21069. }
  21070. }));
  21071. //#endregion
  21072. //#region node_modules/element-plus/es/components/carousel/src/carousel.mjs
  21073. /**
  21074. * @deprecated Removed after 3.0.0, Use `CarouselProps` instead.
  21075. */
  21076. var carouselProps = buildProps({
  21077. initialIndex: {
  21078. type: Number,
  21079. default: 0
  21080. },
  21081. height: {
  21082. type: String,
  21083. default: ""
  21084. },
  21085. trigger: {
  21086. type: String,
  21087. values: ["hover", "click"],
  21088. default: "hover"
  21089. },
  21090. autoplay: {
  21091. type: Boolean,
  21092. default: true
  21093. },
  21094. interval: {
  21095. type: Number,
  21096. default: 3e3
  21097. },
  21098. indicatorPosition: {
  21099. type: String,
  21100. values: [
  21101. "",
  21102. "none",
  21103. "outside"
  21104. ],
  21105. default: ""
  21106. },
  21107. arrow: {
  21108. type: String,
  21109. values: [
  21110. "always",
  21111. "hover",
  21112. "never"
  21113. ],
  21114. default: "hover"
  21115. },
  21116. type: {
  21117. type: String,
  21118. values: ["", "card"],
  21119. default: ""
  21120. },
  21121. cardScale: {
  21122. type: Number,
  21123. default: .83
  21124. },
  21125. loop: {
  21126. type: Boolean,
  21127. default: true
  21128. },
  21129. direction: {
  21130. type: String,
  21131. values: ["horizontal", "vertical"],
  21132. default: "horizontal"
  21133. },
  21134. pauseOnHover: {
  21135. type: Boolean,
  21136. default: true
  21137. },
  21138. motionBlur: Boolean
  21139. });
  21140. var carouselEmits = { change: (current, prev) => [current, prev].every(isNumber) };
  21141. //#endregion
  21142. //#region node_modules/element-plus/es/components/carousel/src/constants.mjs
  21143. var carouselContextKey = Symbol("carouselContextKey");
  21144. var CAROUSEL_ITEM_NAME = "ElCarouselItem";
  21145. //#endregion
  21146. //#region node_modules/element-plus/es/components/carousel/src/carousel-item.mjs
  21147. /**
  21148. * @deprecated Removed after 3.0.0, Use `CarouselItemProps` instead.
  21149. */
  21150. var carouselItemProps = buildProps({
  21151. name: {
  21152. type: String,
  21153. default: ""
  21154. },
  21155. label: {
  21156. type: [String, Number],
  21157. default: ""
  21158. }
  21159. });
  21160. //#endregion
  21161. //#region node_modules/element-plus/es/components/carousel/src/use-carousel.mjs
  21162. var THROTTLE_TIME = 300;
  21163. var useCarousel = (props, emit, componentName) => {
  21164. const { children: items, addChild: addItem, removeChild: removeItem, ChildrenSorter: ItemsSorter } = useOrderedChildren(getCurrentInstance(), CAROUSEL_ITEM_NAME);
  21165. const slots = useSlots();
  21166. const activeIndex = ref(-1);
  21167. const timer = ref(null);
  21168. const hover = ref(false);
  21169. const root = ref();
  21170. const containerHeight = ref(0);
  21171. const isItemsTwoLength = ref(true);
  21172. const arrowDisplay = computed(() => props.arrow !== "never" && !unref(isVertical));
  21173. const hasLabel = computed(() => {
  21174. return items.value.some((item) => item.props.label.toString().length > 0);
  21175. });
  21176. const isCardType = computed(() => props.type === "card");
  21177. const isVertical = computed(() => props.direction === "vertical");
  21178. const containerStyle = computed(() => {
  21179. if (props.height !== "auto") return { height: props.height };
  21180. return {
  21181. height: `${containerHeight.value}px`,
  21182. overflow: "hidden"
  21183. };
  21184. });
  21185. const throttledArrowClick = throttle((index) => {
  21186. setActiveItem(index);
  21187. }, THROTTLE_TIME, { trailing: true });
  21188. const throttledIndicatorHover = throttle((index) => {
  21189. handleIndicatorHover(index);
  21190. }, THROTTLE_TIME);
  21191. const isTwoLengthShow = (index) => {
  21192. if (!isItemsTwoLength.value) return true;
  21193. return activeIndex.value <= 1 ? index <= 1 : index > 1;
  21194. };
  21195. function pauseTimer() {
  21196. if (timer.value) {
  21197. clearInterval(timer.value);
  21198. timer.value = null;
  21199. }
  21200. }
  21201. function startTimer() {
  21202. if (props.interval <= 0 || !props.autoplay || timer.value) return;
  21203. timer.value = setInterval(() => playSlides(), props.interval);
  21204. }
  21205. const playSlides = () => {
  21206. if (activeIndex.value < items.value.length - 1) activeIndex.value = activeIndex.value + 1;
  21207. else if (props.loop) activeIndex.value = 0;
  21208. };
  21209. function setActiveItem(index) {
  21210. if (isString(index)) {
  21211. const filteredItems = items.value.filter((item) => item.props.name === index);
  21212. if (filteredItems.length > 0) index = items.value.indexOf(filteredItems[0]);
  21213. }
  21214. index = Number(index);
  21215. if (Number.isNaN(index) || index !== Math.floor(index)) {
  21216. debugWarn(componentName, "index must be integer.");
  21217. return;
  21218. }
  21219. const itemCount = items.value.length;
  21220. const oldIndex = activeIndex.value;
  21221. if (index < 0) activeIndex.value = props.loop ? itemCount - 1 : 0;
  21222. else if (index >= itemCount) activeIndex.value = props.loop ? 0 : itemCount - 1;
  21223. else activeIndex.value = index;
  21224. if (oldIndex === activeIndex.value) resetItemPosition(oldIndex);
  21225. resetTimer();
  21226. }
  21227. function resetItemPosition(oldIndex) {
  21228. items.value.forEach((item, index) => {
  21229. item.translateItem(index, activeIndex.value, oldIndex);
  21230. });
  21231. }
  21232. function itemInStage(item, index) {
  21233. const _items = unref(items);
  21234. const itemCount = _items.length;
  21235. if (itemCount === 0 || !item.states.inStage) return false;
  21236. const nextItemIndex = index + 1;
  21237. const prevItemIndex = index - 1;
  21238. const lastItemIndex = itemCount - 1;
  21239. const isLastItemActive = _items[lastItemIndex].states.active;
  21240. const isFirstItemActive = _items[0].states.active;
  21241. const isNextItemActive = _items[nextItemIndex]?.states?.active;
  21242. const isPrevItemActive = _items[prevItemIndex]?.states?.active;
  21243. if (index === lastItemIndex && isFirstItemActive || isNextItemActive) return "left";
  21244. else if (index === 0 && isLastItemActive || isPrevItemActive) return "right";
  21245. return false;
  21246. }
  21247. function handleMouseEnter() {
  21248. hover.value = true;
  21249. if (props.pauseOnHover) pauseTimer();
  21250. }
  21251. function handleMouseLeave() {
  21252. hover.value = false;
  21253. startTimer();
  21254. }
  21255. function handleButtonEnter(arrow) {
  21256. if (unref(isVertical)) return;
  21257. items.value.forEach((item, index) => {
  21258. if (arrow === itemInStage(item, index)) item.states.hover = true;
  21259. });
  21260. }
  21261. function handleButtonLeave() {
  21262. if (unref(isVertical)) return;
  21263. items.value.forEach((item) => {
  21264. item.states.hover = false;
  21265. });
  21266. }
  21267. function handleIndicatorClick(index) {
  21268. activeIndex.value = index;
  21269. }
  21270. function handleIndicatorHover(index) {
  21271. if (props.trigger === "hover" && index !== activeIndex.value) activeIndex.value = index;
  21272. }
  21273. function prev() {
  21274. setActiveItem(activeIndex.value - 1);
  21275. }
  21276. function next() {
  21277. setActiveItem(activeIndex.value + 1);
  21278. }
  21279. function resetTimer() {
  21280. pauseTimer();
  21281. if (!props.pauseOnHover || !hover.value) startTimer();
  21282. }
  21283. function setContainerHeight(height) {
  21284. if (props.height !== "auto") return;
  21285. containerHeight.value = height;
  21286. }
  21287. function PlaceholderItem() {
  21288. const defaultSlots = slots.default?.();
  21289. if (!defaultSlots) return null;
  21290. const normalizeSlots = flattedChildren(defaultSlots).filter((slot) => {
  21291. return isVNode(slot) && slot.type.name === "ElCarouselItem";
  21292. });
  21293. if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {
  21294. isItemsTwoLength.value = true;
  21295. return normalizeSlots;
  21296. }
  21297. isItemsTwoLength.value = false;
  21298. return null;
  21299. }
  21300. watch(() => activeIndex.value, (current, prev) => {
  21301. resetItemPosition(prev);
  21302. if (isItemsTwoLength.value) {
  21303. current = current % 2;
  21304. prev = prev % 2;
  21305. }
  21306. if (prev > -1) emit(CHANGE_EVENT, current, prev);
  21307. });
  21308. const exposeActiveIndex = computed({
  21309. get: () => {
  21310. return isItemsTwoLength.value ? activeIndex.value % 2 : activeIndex.value;
  21311. },
  21312. set: (value) => activeIndex.value = value
  21313. });
  21314. watch(() => props.autoplay, (autoplay) => {
  21315. autoplay ? startTimer() : pauseTimer();
  21316. });
  21317. watch(() => props.loop, () => {
  21318. setActiveItem(activeIndex.value);
  21319. });
  21320. watch(() => props.interval, () => {
  21321. resetTimer();
  21322. });
  21323. const resizeObserver = shallowRef();
  21324. onMounted(() => {
  21325. watch(() => items.value, () => {
  21326. if (items.value.length > 0) setActiveItem(props.initialIndex);
  21327. }, { immediate: true });
  21328. resizeObserver.value = useResizeObserver(root.value, () => {
  21329. resetItemPosition();
  21330. });
  21331. startTimer();
  21332. });
  21333. onBeforeUnmount(() => {
  21334. pauseTimer();
  21335. if (root.value && resizeObserver.value) resizeObserver.value.stop();
  21336. });
  21337. provide(carouselContextKey, {
  21338. root,
  21339. isCardType,
  21340. isVertical,
  21341. items,
  21342. loop: props.loop,
  21343. cardScale: props.cardScale,
  21344. addItem,
  21345. removeItem,
  21346. setActiveItem,
  21347. setContainerHeight
  21348. });
  21349. return {
  21350. root,
  21351. activeIndex,
  21352. exposeActiveIndex,
  21353. arrowDisplay,
  21354. hasLabel,
  21355. hover,
  21356. isCardType,
  21357. items,
  21358. isVertical,
  21359. containerStyle,
  21360. isItemsTwoLength,
  21361. handleButtonEnter,
  21362. handleButtonLeave,
  21363. handleIndicatorClick,
  21364. handleMouseEnter,
  21365. handleMouseLeave,
  21366. setActiveItem,
  21367. prev,
  21368. next,
  21369. PlaceholderItem,
  21370. isTwoLengthShow,
  21371. ItemsSorter,
  21372. throttledArrowClick,
  21373. throttledIndicatorHover
  21374. };
  21375. };
  21376. //#endregion
  21377. //#region node_modules/element-plus/es/components/carousel/src/carousel.vue_vue_type_script_setup_true_lang.mjs
  21378. var _hoisted_1$64 = ["aria-label"];
  21379. var _hoisted_2$35 = ["aria-label"];
  21380. var _hoisted_3$16 = ["onMouseenter", "onClick"];
  21381. var _hoisted_4$12 = ["aria-label"];
  21382. var _hoisted_5$9 = { key: 0 };
  21383. var _hoisted_6$4 = {
  21384. key: 2,
  21385. xmlns: "http://www.w3.org/2000/svg",
  21386. version: "1.1",
  21387. style: { "display": "none" }
  21388. };
  21389. var COMPONENT_NAME$11 = "ElCarousel";
  21390. //#endregion
  21391. //#region node_modules/element-plus/es/components/carousel/src/carousel2.mjs
  21392. var carousel_default = /* @__PURE__ */ defineComponent({
  21393. name: COMPONENT_NAME$11,
  21394. __name: "carousel",
  21395. props: carouselProps,
  21396. emits: carouselEmits,
  21397. setup(__props, { expose: __expose, emit: __emit }) {
  21398. const props = __props;
  21399. const { root, activeIndex, exposeActiveIndex, arrowDisplay, hasLabel, hover, isCardType, items, isVertical, containerStyle, handleButtonEnter, handleButtonLeave, handleIndicatorClick, handleMouseEnter, handleMouseLeave, setActiveItem, prev, next, PlaceholderItem, isTwoLengthShow, ItemsSorter, throttledArrowClick, throttledIndicatorHover } = useCarousel(props, __emit, COMPONENT_NAME$11);
  21400. const ns = useNamespace("carousel");
  21401. const { t } = useLocale();
  21402. const carouselClasses = computed(() => {
  21403. const classes = [ns.b(), ns.m(props.direction)];
  21404. if (unref(isCardType)) classes.push(ns.m("card"));
  21405. classes.push(ns.is("vertical-outside", unref(isVertical) && props.indicatorPosition === "outside"));
  21406. return classes;
  21407. });
  21408. const indicatorsClasses = computed(() => {
  21409. const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
  21410. if (unref(hasLabel)) classes.push(ns.em("indicators", "labels"));
  21411. if (props.indicatorPosition === "outside") classes.push(ns.em("indicators", "outside"));
  21412. if (unref(isVertical)) classes.push(ns.em("indicators", "right"));
  21413. return classes;
  21414. });
  21415. function handleTransitionStart(e) {
  21416. if (!props.motionBlur) return;
  21417. const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
  21418. e.currentTarget.classList.add(kls);
  21419. }
  21420. function handleTransitionEnd(e) {
  21421. if (!props.motionBlur) return;
  21422. const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
  21423. e.currentTarget.classList.remove(kls);
  21424. }
  21425. __expose({
  21426. activeIndex: exposeActiveIndex,
  21427. setActiveItem,
  21428. prev,
  21429. next
  21430. });
  21431. return (_ctx, _cache) => {
  21432. return openBlock(), createElementBlock("div", {
  21433. ref_key: "root",
  21434. ref: root,
  21435. class: normalizeClass(carouselClasses.value),
  21436. onMouseenter: _cache[6] || (_cache[6] = withModifiers((...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), ["stop"])),
  21437. onMouseleave: _cache[7] || (_cache[7] = withModifiers((...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), ["stop"]))
  21438. }, [
  21439. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  21440. key: 0,
  21441. name: "carousel-arrow-left",
  21442. persisted: ""
  21443. }, {
  21444. default: withCtx(() => [withDirectives(createBaseVNode("button", {
  21445. type: "button",
  21446. class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]),
  21447. "aria-label": unref(t)("el.carousel.leftArrow"),
  21448. onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")),
  21449. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  21450. onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"]))
  21451. }, [createVNode(unref(ElIcon), null, {
  21452. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  21453. _: 1
  21454. })], 42, _hoisted_1$64), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) > 0)]])]),
  21455. _: 1
  21456. })) : createCommentVNode("v-if", true),
  21457. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  21458. key: 1,
  21459. name: "carousel-arrow-right",
  21460. persisted: ""
  21461. }, {
  21462. default: withCtx(() => [withDirectives(createBaseVNode("button", {
  21463. type: "button",
  21464. class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]),
  21465. "aria-label": unref(t)("el.carousel.rightArrow"),
  21466. onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")),
  21467. onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  21468. onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"]))
  21469. }, [createVNode(unref(ElIcon), null, {
  21470. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  21471. _: 1
  21472. })], 42, _hoisted_2$35), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) < unref(items).length - 1)]])]),
  21473. _: 1
  21474. })) : createCommentVNode("v-if", true),
  21475. createBaseVNode("div", {
  21476. class: normalizeClass(unref(ns).e("container")),
  21477. style: normalizeStyle(unref(containerStyle)),
  21478. onTransitionstart: handleTransitionStart,
  21479. onTransitionend: handleTransitionEnd
  21480. }, [createVNode(unref(PlaceholderItem)), renderSlot(_ctx.$slots, "default")], 38),
  21481. createVNode(unref(ItemsSorter), null, {
  21482. default: withCtx(() => [__props.indicatorPosition !== "none" ? (openBlock(), createElementBlock("ul", {
  21483. key: 0,
  21484. class: normalizeClass(indicatorsClasses.value)
  21485. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
  21486. return withDirectives((openBlock(), createElementBlock("li", {
  21487. key: index,
  21488. class: normalizeClass([
  21489. unref(ns).e("indicator"),
  21490. unref(ns).em("indicator", __props.direction),
  21491. unref(ns).is("active", index === unref(activeIndex))
  21492. ]),
  21493. onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
  21494. onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
  21495. }, [createBaseVNode("button", {
  21496. class: normalizeClass(unref(ns).e("button")),
  21497. "aria-label": unref(t)("el.carousel.indicator", { index: index + 1 })
  21498. }, [unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)], 10, _hoisted_4$12)], 42, _hoisted_3$16)), [[vShow, unref(isTwoLengthShow)(index)]]);
  21499. }), 128))], 2)) : createCommentVNode("v-if", true)]),
  21500. _: 1
  21501. }),
  21502. __props.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6$4, [..._cache[8] || (_cache[8] = [createBaseVNode("defs", null, [createBaseVNode("filter", { id: "elCarouselHorizontal" }, [createBaseVNode("feGaussianBlur", {
  21503. in: "SourceGraphic",
  21504. stdDeviation: "12,0"
  21505. })]), createBaseVNode("filter", { id: "elCarouselVertical" }, [createBaseVNode("feGaussianBlur", {
  21506. in: "SourceGraphic",
  21507. stdDeviation: "0,10"
  21508. })])], -1)])])) : createCommentVNode("v-if", true)
  21509. ], 34);
  21510. };
  21511. }
  21512. });
  21513. //#endregion
  21514. //#region node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs
  21515. var useCarouselItem = (props) => {
  21516. const carouselContext = inject(carouselContextKey);
  21517. const instance = getCurrentInstance();
  21518. if (!carouselContext) debugWarn(CAROUSEL_ITEM_NAME, "usage: <el-carousel></el-carousel-item></el-carousel>");
  21519. if (!instance) debugWarn(CAROUSEL_ITEM_NAME, "compositional hook can only be invoked inside setups");
  21520. const carouselItemRef = ref();
  21521. const hover = ref(false);
  21522. const translate = ref(0);
  21523. const scale = ref(1);
  21524. const active = ref(false);
  21525. const ready = ref(false);
  21526. const inStage = ref(false);
  21527. const animating = ref(false);
  21528. const { isCardType, isVertical, cardScale } = carouselContext;
  21529. function processIndex(index, activeIndex, length) {
  21530. const lastItemIndex = length - 1;
  21531. const prevItemIndex = activeIndex - 1;
  21532. const nextItemIndex = activeIndex + 1;
  21533. const halfItemIndex = length / 2;
  21534. if (activeIndex === 0 && index === lastItemIndex) return -1;
  21535. else if (activeIndex === lastItemIndex && index === 0) return length;
  21536. else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) return length + 1;
  21537. else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) return -2;
  21538. return index;
  21539. }
  21540. function calcCardTranslate(index, activeIndex) {
  21541. const parentWidth = unref(isVertical) ? carouselContext.root.value?.offsetHeight || 0 : carouselContext.root.value?.offsetWidth || 0;
  21542. if (inStage.value) return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4;
  21543. else if (index < activeIndex) return -(1 + cardScale) * parentWidth / 4;
  21544. else return (3 + cardScale) * parentWidth / 4;
  21545. }
  21546. function calcTranslate(index, activeIndex, isVertical) {
  21547. const rootEl = carouselContext.root.value;
  21548. if (!rootEl) return 0;
  21549. return ((isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0) * (index - activeIndex);
  21550. }
  21551. const translateItem = (index, activeIndex, oldIndex) => {
  21552. const _isCardType = unref(isCardType);
  21553. const carouselItemLength = carouselContext.items.value.length ?? NaN;
  21554. const isActive = index === activeIndex;
  21555. if (!_isCardType && !isUndefined(oldIndex)) animating.value = isActive || index === oldIndex;
  21556. if (!isActive && carouselItemLength > 2 && carouselContext.loop) index = processIndex(index, activeIndex, carouselItemLength);
  21557. const _isVertical = unref(isVertical);
  21558. active.value = isActive;
  21559. if (_isCardType) {
  21560. inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
  21561. translate.value = calcCardTranslate(index, activeIndex);
  21562. scale.value = unref(active) ? 1 : cardScale;
  21563. } else translate.value = calcTranslate(index, activeIndex, _isVertical);
  21564. ready.value = true;
  21565. if (isActive && carouselItemRef.value) carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
  21566. };
  21567. function handleItemClick() {
  21568. if (carouselContext && unref(isCardType)) {
  21569. const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
  21570. carouselContext.setActiveItem(index);
  21571. }
  21572. }
  21573. const carouselItemContext = {
  21574. props,
  21575. states: reactive({
  21576. hover,
  21577. translate,
  21578. scale,
  21579. active,
  21580. ready,
  21581. inStage,
  21582. animating
  21583. }),
  21584. uid: instance.uid,
  21585. getVnode: () => instance.vnode,
  21586. translateItem
  21587. };
  21588. carouselContext.addItem(carouselItemContext);
  21589. onBeforeUnmount(() => {
  21590. carouselContext.removeItem(carouselItemContext);
  21591. });
  21592. return {
  21593. carouselItemRef,
  21594. active,
  21595. animating,
  21596. hover,
  21597. inStage,
  21598. isVertical,
  21599. translate,
  21600. isCardType,
  21601. scale,
  21602. ready,
  21603. handleItemClick
  21604. };
  21605. };
  21606. //#endregion
  21607. //#region node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs
  21608. var carousel_item_default = /* @__PURE__ */ defineComponent({
  21609. name: CAROUSEL_ITEM_NAME,
  21610. __name: "carousel-item",
  21611. props: carouselItemProps,
  21612. setup(__props) {
  21613. const props = __props;
  21614. const ns = useNamespace("carousel");
  21615. const { carouselItemRef, active, animating, hover, inStage, isVertical, translate, isCardType, scale, ready, handleItemClick } = useCarouselItem(props);
  21616. const itemKls = computed(() => [
  21617. ns.e("item"),
  21618. ns.is("active", active.value),
  21619. ns.is("in-stage", inStage.value),
  21620. ns.is("hover", hover.value),
  21621. ns.is("animating", animating.value),
  21622. {
  21623. [ns.em("item", "card")]: isCardType.value,
  21624. [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
  21625. }
  21626. ]);
  21627. const itemStyle = computed(() => {
  21628. return { transform: [`${`translate${unref(isVertical) ? "Y" : "X"}`}(${unref(translate)}px)`, `scale(${unref(scale)})`].join(" ") };
  21629. });
  21630. return (_ctx, _cache) => {
  21631. return withDirectives((openBlock(), createElementBlock("div", {
  21632. ref_key: "carouselItemRef",
  21633. ref: carouselItemRef,
  21634. class: normalizeClass(itemKls.value),
  21635. style: normalizeStyle(itemStyle.value),
  21636. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args))
  21637. }, [unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
  21638. key: 0,
  21639. class: normalizeClass(unref(ns).e("mask"))
  21640. }, null, 2)), [[vShow, !unref(active)]]) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 6)), [[vShow, unref(ready)]]);
  21641. };
  21642. }
  21643. });
  21644. //#endregion
  21645. //#region node_modules/element-plus/es/components/carousel/index.mjs
  21646. var ElCarousel = withInstall(carousel_default, { CarouselItem: carousel_item_default });
  21647. var ElCarouselItem = withNoopInstall(carousel_item_default);
  21648. //#endregion
  21649. //#region node_modules/element-plus/es/components/cascader-panel/src/config.mjs
  21650. var CommonProps = buildProps({
  21651. modelValue: { type: definePropType([
  21652. Number,
  21653. String,
  21654. Array,
  21655. Object
  21656. ]) },
  21657. options: {
  21658. type: definePropType(Array),
  21659. default: () => []
  21660. },
  21661. props: {
  21662. type: definePropType(Object),
  21663. default: () => ({})
  21664. }
  21665. });
  21666. var DefaultProps = {
  21667. expandTrigger: "click",
  21668. multiple: false,
  21669. checkStrictly: false,
  21670. emitPath: true,
  21671. lazy: false,
  21672. lazyLoad: NOOP,
  21673. value: "value",
  21674. label: "label",
  21675. children: "children",
  21676. leaf: "leaf",
  21677. disabled: "disabled",
  21678. hoverThreshold: 500,
  21679. checkOnClickNode: false,
  21680. checkOnClickLeaf: true,
  21681. showPrefix: true
  21682. };
  21683. /**
  21684. * @deprecated Removed after 3.0.0, Use `CascaderPanelProps` instead.
  21685. */
  21686. var cascaderPanelProps = buildProps({
  21687. ...CommonProps,
  21688. border: {
  21689. type: Boolean,
  21690. default: true
  21691. },
  21692. renderLabel: { type: Function }
  21693. });
  21694. var emitChangeFn$2 = (value) => true;
  21695. var cascaderPanelEmits = {
  21696. [UPDATE_MODEL_EVENT]: emitChangeFn$2,
  21697. [CHANGE_EVENT]: emitChangeFn$2,
  21698. close: () => true,
  21699. "expand-change": (value) => value
  21700. };
  21701. var useCascaderConfig = (props) => {
  21702. return computed(() => ({
  21703. ...DefaultProps,
  21704. ...props.props
  21705. }));
  21706. };
  21707. //#endregion
  21708. //#region node_modules/element-plus/es/components/checkbox/src/checkbox.mjs
  21709. /**
  21710. * @deprecated Removed after 3.0.0, Use `CheckboxProps` instead.
  21711. */
  21712. var checkboxProps = {
  21713. modelValue: {
  21714. type: [
  21715. Number,
  21716. String,
  21717. Boolean
  21718. ],
  21719. default: void 0
  21720. },
  21721. label: {
  21722. type: [
  21723. String,
  21724. Boolean,
  21725. Number,
  21726. Object
  21727. ],
  21728. default: void 0
  21729. },
  21730. value: {
  21731. type: [
  21732. String,
  21733. Boolean,
  21734. Number,
  21735. Object
  21736. ],
  21737. default: void 0
  21738. },
  21739. indeterminate: Boolean,
  21740. disabled: {
  21741. type: Boolean,
  21742. default: void 0
  21743. },
  21744. checked: Boolean,
  21745. name: {
  21746. type: String,
  21747. default: void 0
  21748. },
  21749. trueValue: {
  21750. type: [String, Number],
  21751. default: void 0
  21752. },
  21753. falseValue: {
  21754. type: [String, Number],
  21755. default: void 0
  21756. },
  21757. trueLabel: {
  21758. type: [String, Number],
  21759. default: void 0
  21760. },
  21761. falseLabel: {
  21762. type: [String, Number],
  21763. default: void 0
  21764. },
  21765. id: {
  21766. type: String,
  21767. default: void 0
  21768. },
  21769. border: Boolean,
  21770. size: useSizeProp,
  21771. tabindex: [String, Number],
  21772. validateEvent: {
  21773. type: Boolean,
  21774. default: true
  21775. },
  21776. ariaLabel: String,
  21777. ...useAriaProps(["ariaControls"])
  21778. };
  21779. var checkboxEmits = {
  21780. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  21781. change: (val) => isString(val) || isNumber(val) || isBoolean(val)
  21782. };
  21783. var checkboxPropsDefaults = {
  21784. modelValue: void 0,
  21785. label: void 0,
  21786. value: void 0,
  21787. disabled: void 0,
  21788. name: void 0,
  21789. trueValue: void 0,
  21790. falseValue: void 0,
  21791. trueLabel: void 0,
  21792. falseLabel: void 0,
  21793. id: void 0,
  21794. validateEvent: true
  21795. };
  21796. //#endregion
  21797. //#region node_modules/element-plus/es/components/checkbox/src/constants.mjs
  21798. var checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
  21799. //#endregion
  21800. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group.mjs
  21801. /**
  21802. * @deprecated Removed after 3.0.0, Use `CheckboxGroupProps` instead.
  21803. */
  21804. var checkboxGroupProps = buildProps({
  21805. modelValue: {
  21806. type: definePropType(Array),
  21807. default: () => []
  21808. },
  21809. disabled: {
  21810. type: Boolean,
  21811. default: void 0
  21812. },
  21813. min: Number,
  21814. max: Number,
  21815. size: useSizeProp,
  21816. fill: String,
  21817. textColor: String,
  21818. tag: {
  21819. type: String,
  21820. default: "div"
  21821. },
  21822. validateEvent: {
  21823. type: Boolean,
  21824. default: true
  21825. },
  21826. options: { type: definePropType(Array) },
  21827. props: {
  21828. type: definePropType(Object),
  21829. default: () => checkboxDefaultProps
  21830. },
  21831. type: {
  21832. type: String,
  21833. values: ["checkbox", "button"],
  21834. default: "checkbox"
  21835. },
  21836. ...useAriaProps(["ariaLabel"])
  21837. });
  21838. var checkboxGroupEmits = {
  21839. [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
  21840. change: (val) => isArray$1(val)
  21841. };
  21842. var checkboxDefaultProps = {
  21843. label: "label",
  21844. value: "value",
  21845. disabled: "disabled"
  21846. };
  21847. //#endregion
  21848. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-disabled.mjs
  21849. var useCheckboxDisabled = ({ model, isChecked }) => {
  21850. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  21851. const formContext = inject(formContextKey, void 0);
  21852. const isLimitDisabled = computed(() => {
  21853. const max = checkboxGroup?.max?.value;
  21854. const min = checkboxGroup?.min?.value;
  21855. return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
  21856. });
  21857. return {
  21858. isDisabled: useFormDisabled(computed(() => {
  21859. if (checkboxGroup === void 0) return formContext?.disabled ?? isLimitDisabled.value;
  21860. else return checkboxGroup.disabled?.value || isLimitDisabled.value;
  21861. })),
  21862. isLimitDisabled
  21863. };
  21864. };
  21865. //#endregion
  21866. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-event.mjs
  21867. var useCheckboxEvent = (props, { model, isLimitExceeded, hasOwnLabel, isDisabled, isLabeledByFormItem }) => {
  21868. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  21869. const { formItem } = useFormItem();
  21870. const { emit } = getCurrentInstance();
  21871. function getLabeledValue(value) {
  21872. return [
  21873. true,
  21874. props.trueValue,
  21875. props.trueLabel
  21876. ].includes(value) ? props.trueValue ?? props.trueLabel ?? true : props.falseValue ?? props.falseLabel ?? false;
  21877. }
  21878. function emitChangeEvent(checked, e) {
  21879. emit(CHANGE_EVENT, getLabeledValue(checked), e);
  21880. }
  21881. function handleChange(e) {
  21882. if (isLimitExceeded.value) return;
  21883. const target = e.target;
  21884. emit(CHANGE_EVENT, getLabeledValue(target.checked), e);
  21885. }
  21886. async function onClickRoot(e) {
  21887. if (isLimitExceeded.value) return;
  21888. if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
  21889. if (!e.composedPath().some((item) => item.tagName === "LABEL")) {
  21890. model.value = getLabeledValue([
  21891. false,
  21892. props.falseValue,
  21893. props.falseLabel
  21894. ].includes(model.value));
  21895. await nextTick();
  21896. emitChangeEvent(model.value, e);
  21897. }
  21898. }
  21899. }
  21900. const validateEvent = computed(() => checkboxGroup?.validateEvent || props.validateEvent);
  21901. watch(() => props.modelValue, () => {
  21902. if (validateEvent.value) formItem?.validate("change").catch((err) => debugWarn(err));
  21903. });
  21904. return {
  21905. handleChange,
  21906. onClickRoot
  21907. };
  21908. };
  21909. //#endregion
  21910. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-model.mjs
  21911. var useCheckboxModel = (props) => {
  21912. const selfModel = ref(false);
  21913. const { emit } = getCurrentInstance();
  21914. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  21915. const isGroup = computed(() => isUndefined(checkboxGroup) === false);
  21916. const isLimitExceeded = ref(false);
  21917. const model = computed({
  21918. get() {
  21919. return isGroup.value ? checkboxGroup?.modelValue?.value : props.modelValue ?? selfModel.value;
  21920. },
  21921. set(val) {
  21922. if (isGroup.value && isArray$1(val)) {
  21923. isLimitExceeded.value = checkboxGroup?.max?.value !== void 0 && val.length > checkboxGroup?.max.value && val.length > model.value.length;
  21924. isLimitExceeded.value === false && checkboxGroup?.changeEvent?.(val);
  21925. } else {
  21926. emit(UPDATE_MODEL_EVENT, val);
  21927. selfModel.value = val;
  21928. }
  21929. }
  21930. });
  21931. return {
  21932. model,
  21933. isGroup,
  21934. isLimitExceeded
  21935. };
  21936. };
  21937. //#endregion
  21938. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-status.mjs
  21939. var useCheckboxStatus = (props, slots, { model }) => {
  21940. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  21941. const isFocused = ref(false);
  21942. const actualValue = computed(() => {
  21943. if (!isPropAbsent(props.value)) return props.value;
  21944. return props.label;
  21945. });
  21946. const isChecked = computed(() => {
  21947. const value = model.value;
  21948. if (isBoolean(value)) return value;
  21949. else if (isArray$1(value)) if (isObject$2(actualValue.value)) return value.map(toRaw).some((o) => isEqual$1(o, actualValue.value));
  21950. else return value.map(toRaw).includes(actualValue.value);
  21951. else if (value !== null && value !== void 0) return value === props.trueValue || value === props.trueLabel;
  21952. else return !!value;
  21953. });
  21954. return {
  21955. checkboxButtonSize: useFormSize(computed(() => checkboxGroup?.size?.value), { prop: true }),
  21956. isChecked,
  21957. isFocused,
  21958. checkboxSize: useFormSize(computed(() => checkboxGroup?.size?.value)),
  21959. hasOwnLabel: computed(() => {
  21960. return !!slots.default || !isPropAbsent(actualValue.value);
  21961. }),
  21962. actualValue
  21963. };
  21964. };
  21965. //#endregion
  21966. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox.mjs
  21967. var useCheckbox = (props, slots) => {
  21968. const { formItem: elFormItem } = useFormItem();
  21969. const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
  21970. const { isFocused, isChecked, checkboxButtonSize, checkboxSize, hasOwnLabel, actualValue } = useCheckboxStatus(props, slots, { model });
  21971. const { isDisabled } = useCheckboxDisabled({
  21972. model,
  21973. isChecked
  21974. });
  21975. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
  21976. formItemContext: elFormItem,
  21977. disableIdGeneration: hasOwnLabel,
  21978. disableIdManagement: isGroup
  21979. });
  21980. const { handleChange, onClickRoot } = useCheckboxEvent(props, {
  21981. model,
  21982. isLimitExceeded,
  21983. hasOwnLabel,
  21984. isDisabled,
  21985. isLabeledByFormItem
  21986. });
  21987. const setStoreValue = () => {
  21988. function addToStore() {
  21989. if (isArray$1(model.value) && !model.value.includes(actualValue.value)) model.value.push(actualValue.value);
  21990. else model.value = props.trueValue ?? props.trueLabel ?? true;
  21991. }
  21992. props.checked && addToStore();
  21993. };
  21994. setStoreValue();
  21995. useDeprecated({
  21996. from: "label act as value",
  21997. replacement: "value",
  21998. version: "3.0.0",
  21999. scope: "el-checkbox",
  22000. ref: "https://element-plus.org/en-US/component/checkbox.html"
  22001. }, computed(() => isGroup.value && isPropAbsent(props.value)));
  22002. useDeprecated({
  22003. from: "true-label",
  22004. replacement: "true-value",
  22005. version: "3.0.0",
  22006. scope: "el-checkbox",
  22007. ref: "https://element-plus.org/en-US/component/checkbox.html"
  22008. }, computed(() => !!props.trueLabel));
  22009. useDeprecated({
  22010. from: "false-label",
  22011. replacement: "false-value",
  22012. version: "3.0.0",
  22013. scope: "el-checkbox",
  22014. ref: "https://element-plus.org/en-US/component/checkbox.html"
  22015. }, computed(() => !!props.falseLabel));
  22016. return {
  22017. inputId,
  22018. isLabeledByFormItem,
  22019. isChecked,
  22020. isDisabled,
  22021. isFocused,
  22022. checkboxButtonSize,
  22023. checkboxSize,
  22024. hasOwnLabel,
  22025. model,
  22026. actualValue,
  22027. handleChange,
  22028. onClickRoot
  22029. };
  22030. };
  22031. //#endregion
  22032. //#region node_modules/element-plus/es/components/checkbox/src/checkbox.vue_vue_type_script_setup_true_lang.mjs
  22033. var _hoisted_1$63 = [
  22034. "id",
  22035. "indeterminate",
  22036. "name",
  22037. "tabindex",
  22038. "disabled"
  22039. ];
  22040. //#endregion
  22041. //#region node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs
  22042. var checkbox_default = /* @__PURE__ */ defineComponent({
  22043. name: "ElCheckbox",
  22044. __name: "checkbox",
  22045. props: checkboxProps,
  22046. emits: checkboxEmits,
  22047. setup(__props) {
  22048. const props = __props;
  22049. const { inputId, isLabeledByFormItem, isChecked, isDisabled, isFocused, checkboxSize, hasOwnLabel, model, actualValue, handleChange, onClickRoot } = useCheckbox(props, useSlots());
  22050. const inputBindings = computed(() => {
  22051. if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
  22052. "true-value": props.trueValue ?? props.trueLabel ?? true,
  22053. "false-value": props.falseValue ?? props.falseLabel ?? false
  22054. };
  22055. return { value: actualValue.value };
  22056. });
  22057. const ns = useNamespace("checkbox");
  22058. const compKls = computed(() => {
  22059. return [
  22060. ns.b(),
  22061. ns.m(checkboxSize.value),
  22062. ns.is("disabled", isDisabled.value),
  22063. ns.is("bordered", props.border),
  22064. ns.is("checked", isChecked.value)
  22065. ];
  22066. });
  22067. const spanKls = computed(() => {
  22068. return [
  22069. ns.e("input"),
  22070. ns.is("disabled", isDisabled.value),
  22071. ns.is("checked", isChecked.value),
  22072. ns.is("indeterminate", props.indeterminate),
  22073. ns.is("focus", isFocused.value)
  22074. ];
  22075. });
  22076. return (_ctx, _cache) => {
  22077. return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
  22078. for: !unref(hasOwnLabel) && unref(isLabeledByFormItem) ? null : unref(inputId),
  22079. class: normalizeClass(compKls.value),
  22080. "aria-controls": __props.indeterminate ? __props.ariaControls : null,
  22081. "aria-checked": __props.indeterminate ? "mixed" : void 0,
  22082. "aria-label": __props.ariaLabel,
  22083. onClick: unref(onClickRoot)
  22084. }, {
  22085. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(spanKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
  22086. id: unref(inputId),
  22087. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  22088. class: unref(ns).e("original"),
  22089. type: "checkbox",
  22090. indeterminate: __props.indeterminate,
  22091. name: __props.name,
  22092. tabindex: __props.tabindex,
  22093. disabled: unref(isDisabled)
  22094. }, inputBindings.value, {
  22095. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  22096. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  22097. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
  22098. onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  22099. }), null, 16, _hoisted_1$63), [[vModelCheckbox, unref(model)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
  22100. key: 0,
  22101. class: normalizeClass(unref(ns).e("label"))
  22102. }, [renderSlot(_ctx.$slots, "default"), !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.label), 1)], 64)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)]),
  22103. _: 3
  22104. }, 8, [
  22105. "for",
  22106. "class",
  22107. "aria-controls",
  22108. "aria-checked",
  22109. "aria-label",
  22110. "onClick"
  22111. ]);
  22112. };
  22113. }
  22114. });
  22115. //#endregion
  22116. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.vue_vue_type_script_setup_true_lang.mjs
  22117. var _hoisted_1$62 = [
  22118. "name",
  22119. "tabindex",
  22120. "disabled"
  22121. ];
  22122. //#endregion
  22123. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs
  22124. var checkbox_button_default = /* @__PURE__ */ defineComponent({
  22125. name: "ElCheckboxButton",
  22126. __name: "checkbox-button",
  22127. props: checkboxProps,
  22128. emits: checkboxEmits,
  22129. setup(__props) {
  22130. const props = __props;
  22131. const { isFocused, isChecked, isDisabled, checkboxButtonSize, model, actualValue, handleChange } = useCheckbox(props, useSlots());
  22132. const inputBindings = computed(() => {
  22133. if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
  22134. "true-value": props.trueValue ?? props.trueLabel ?? true,
  22135. "false-value": props.falseValue ?? props.falseLabel ?? false
  22136. };
  22137. return { value: actualValue.value };
  22138. });
  22139. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  22140. const ns = useNamespace("checkbox");
  22141. const activeStyle = computed(() => {
  22142. const fillValue = checkboxGroup?.fill?.value ?? "";
  22143. return {
  22144. backgroundColor: fillValue,
  22145. borderColor: fillValue,
  22146. color: checkboxGroup?.textColor?.value ?? "",
  22147. boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
  22148. };
  22149. });
  22150. const labelKls = computed(() => {
  22151. return [
  22152. ns.b("button"),
  22153. ns.bm("button", checkboxButtonSize.value),
  22154. ns.is("disabled", isDisabled.value),
  22155. ns.is("checked", isChecked.value),
  22156. ns.is("focus", isFocused.value)
  22157. ];
  22158. });
  22159. return (_ctx, _cache) => {
  22160. return openBlock(), createElementBlock("label", { class: normalizeClass(labelKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
  22161. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  22162. class: unref(ns).be("button", "original"),
  22163. type: "checkbox",
  22164. name: __props.name,
  22165. tabindex: __props.tabindex,
  22166. disabled: unref(isDisabled)
  22167. }, inputBindings.value, {
  22168. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  22169. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  22170. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
  22171. onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  22172. }), null, 16, _hoisted_1$62), [[vModelCheckbox, unref(model)]]), _ctx.$slots.default || __props.label ? (openBlock(), createElementBlock("span", {
  22173. key: 0,
  22174. class: normalizeClass(unref(ns).be("button", "inner")),
  22175. style: normalizeStyle(unref(isChecked) ? activeStyle.value : void 0)
  22176. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 6)) : createCommentVNode("v-if", true)], 2);
  22177. };
  22178. }
  22179. });
  22180. //#endregion
  22181. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group2.mjs
  22182. var checkbox_group_default = /* @__PURE__ */ defineComponent({
  22183. name: "ElCheckboxGroup",
  22184. __name: "checkbox-group",
  22185. props: checkboxGroupProps,
  22186. emits: checkboxGroupEmits,
  22187. setup(__props, { emit: __emit }) {
  22188. const props = __props;
  22189. const emit = __emit;
  22190. const ns = useNamespace("checkbox");
  22191. const checkboxDisabled = useFormDisabled();
  22192. const { formItem } = useFormItem();
  22193. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  22194. const changeEvent = async (value) => {
  22195. emit(UPDATE_MODEL_EVENT, value);
  22196. await nextTick();
  22197. emit(CHANGE_EVENT, value);
  22198. };
  22199. const modelValue = computed({
  22200. get() {
  22201. return props.modelValue;
  22202. },
  22203. set(val) {
  22204. changeEvent(val);
  22205. }
  22206. });
  22207. const aliasProps = computed(() => ({
  22208. ...checkboxDefaultProps,
  22209. ...props.props
  22210. }));
  22211. const getOptionProps = (option) => {
  22212. const { label, value, disabled } = aliasProps.value;
  22213. const base = {
  22214. label: option[label],
  22215. value: option[value],
  22216. disabled: option[disabled]
  22217. };
  22218. return {
  22219. ...omit(option, [
  22220. label,
  22221. value,
  22222. disabled
  22223. ]),
  22224. ...base
  22225. };
  22226. };
  22227. const optionComponent = computed(() => props.type === "button" ? checkbox_button_default : checkbox_default);
  22228. provide(checkboxGroupContextKey, {
  22229. ...pick(toRefs(props), [
  22230. "size",
  22231. "min",
  22232. "max",
  22233. "validateEvent",
  22234. "fill",
  22235. "textColor"
  22236. ]),
  22237. disabled: checkboxDisabled,
  22238. modelValue,
  22239. changeEvent
  22240. });
  22241. watch(() => props.modelValue, (newVal, oldValue) => {
  22242. if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch((err) => debugWarn(err));
  22243. });
  22244. return (_ctx, _cache) => {
  22245. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  22246. id: unref(groupId),
  22247. class: normalizeClass(unref(ns).b("group")),
  22248. role: "group",
  22249. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "checkbox-group" : void 0,
  22250. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem)?.labelId : void 0
  22251. }, {
  22252. default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  22253. return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
  22254. }), 128))])]),
  22255. _: 3
  22256. }, 8, [
  22257. "id",
  22258. "class",
  22259. "aria-label",
  22260. "aria-labelledby"
  22261. ]);
  22262. };
  22263. }
  22264. });
  22265. //#endregion
  22266. //#region node_modules/element-plus/es/components/checkbox/index.mjs
  22267. var ElCheckbox = withInstall(checkbox_default, {
  22268. CheckboxButton: checkbox_button_default,
  22269. CheckboxGroup: checkbox_group_default
  22270. });
  22271. var ElCheckboxButton = withNoopInstall(checkbox_button_default);
  22272. var ElCheckboxGroup = withNoopInstall(checkbox_group_default);
  22273. //#endregion
  22274. //#region node_modules/element-plus/es/components/radio/src/radio.mjs
  22275. /**
  22276. * @deprecated Removed after 3.0.0, Use `RadioPropsBase` instead.
  22277. */
  22278. var radioPropsBase = buildProps({
  22279. modelValue: {
  22280. type: [
  22281. String,
  22282. Number,
  22283. Boolean
  22284. ],
  22285. default: void 0
  22286. },
  22287. size: useSizeProp,
  22288. disabled: {
  22289. type: Boolean,
  22290. default: void 0
  22291. },
  22292. label: {
  22293. type: [
  22294. String,
  22295. Number,
  22296. Boolean
  22297. ],
  22298. default: void 0
  22299. },
  22300. value: {
  22301. type: [
  22302. String,
  22303. Number,
  22304. Boolean
  22305. ],
  22306. default: void 0
  22307. },
  22308. name: {
  22309. type: String,
  22310. default: void 0
  22311. }
  22312. });
  22313. /**
  22314. * @deprecated Removed after 3.0.0, Use `RadioProps` instead.
  22315. */
  22316. var radioProps = buildProps({
  22317. ...radioPropsBase,
  22318. border: Boolean
  22319. });
  22320. var radioEmits = {
  22321. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  22322. [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
  22323. };
  22324. /**
  22325. * @description default values for RadioProps
  22326. */
  22327. var radioPropsDefaults = {
  22328. modelValue: void 0,
  22329. disabled: void 0,
  22330. label: void 0,
  22331. value: void 0,
  22332. name: void 0,
  22333. border: false
  22334. };
  22335. //#endregion
  22336. //#region node_modules/element-plus/es/components/radio/src/constants.mjs
  22337. var radioGroupKey = Symbol("radioGroupKey");
  22338. //#endregion
  22339. //#region node_modules/element-plus/es/components/radio/src/radio-button.mjs
  22340. /**
  22341. * @deprecated Removed after 3.0.0, Use `RadioButtonProps` instead.
  22342. */
  22343. var radioButtonProps = buildProps({ ...radioPropsBase });
  22344. /**
  22345. * @description default values for RadioButtonProps
  22346. */
  22347. var radioButtonPropsDefaults = {
  22348. modelValue: void 0,
  22349. disabled: void 0,
  22350. label: void 0,
  22351. value: void 0,
  22352. name: void 0
  22353. };
  22354. //#endregion
  22355. //#region node_modules/element-plus/es/components/radio/src/radio-group.mjs
  22356. var radioDefaultProps = {
  22357. label: "label",
  22358. value: "value",
  22359. disabled: "disabled"
  22360. };
  22361. /**
  22362. * @deprecated Removed after 3.0.0, Use `RadioGroupProps` instead.
  22363. */
  22364. var radioGroupProps = buildProps({
  22365. id: {
  22366. type: String,
  22367. default: void 0
  22368. },
  22369. size: useSizeProp,
  22370. disabled: {
  22371. type: Boolean,
  22372. default: void 0
  22373. },
  22374. modelValue: {
  22375. type: [
  22376. String,
  22377. Number,
  22378. Boolean
  22379. ],
  22380. default: void 0
  22381. },
  22382. fill: {
  22383. type: String,
  22384. default: ""
  22385. },
  22386. textColor: {
  22387. type: String,
  22388. default: ""
  22389. },
  22390. name: {
  22391. type: String,
  22392. default: void 0
  22393. },
  22394. validateEvent: {
  22395. type: Boolean,
  22396. default: true
  22397. },
  22398. options: { type: definePropType(Array) },
  22399. props: {
  22400. type: definePropType(Object),
  22401. default: () => radioDefaultProps
  22402. },
  22403. type: {
  22404. type: String,
  22405. values: ["radio", "button"],
  22406. default: "radio"
  22407. },
  22408. ...useAriaProps(["ariaLabel"])
  22409. });
  22410. var radioGroupEmits = radioEmits;
  22411. /**
  22412. * @description default values for RadioGroupProps
  22413. */
  22414. var radioGroupPropsDefaults = {
  22415. id: void 0,
  22416. disabled: void 0,
  22417. modelValue: void 0,
  22418. fill: "",
  22419. textColor: "",
  22420. name: void 0,
  22421. validateEvent: true,
  22422. props: () => radioDefaultProps,
  22423. type: "radio"
  22424. };
  22425. //#endregion
  22426. //#region node_modules/element-plus/es/components/radio/src/use-radio.mjs
  22427. var useRadio = (props, emit) => {
  22428. const radioRef = ref();
  22429. const radioGroup = inject(radioGroupKey, void 0);
  22430. const isGroup = computed(() => !!radioGroup);
  22431. const actualValue = computed(() => {
  22432. if (!isPropAbsent(props.value)) return props.value;
  22433. return props.label;
  22434. });
  22435. const modelValue = computed({
  22436. get() {
  22437. return isGroup.value ? radioGroup.modelValue : props.modelValue;
  22438. },
  22439. set(val) {
  22440. if (isGroup.value) radioGroup.changeEvent(val);
  22441. else emit && emit("update:modelValue", val);
  22442. radioRef.value.checked = props.modelValue === actualValue.value;
  22443. }
  22444. });
  22445. const size = useFormSize(computed(() => radioGroup?.size));
  22446. const disabled = useFormDisabled(computed(() => radioGroup?.disabled));
  22447. const focus = ref(false);
  22448. const tabIndex = computed(() => {
  22449. return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
  22450. });
  22451. useDeprecated({
  22452. from: "label act as value",
  22453. replacement: "value",
  22454. version: "3.0.0",
  22455. scope: "el-radio",
  22456. ref: "https://element-plus.org/en-US/component/radio.html"
  22457. }, computed(() => isGroup.value && isPropAbsent(props.value)));
  22458. return {
  22459. radioRef,
  22460. isGroup,
  22461. radioGroup,
  22462. focus,
  22463. size,
  22464. disabled,
  22465. tabIndex,
  22466. modelValue,
  22467. actualValue
  22468. };
  22469. };
  22470. //#endregion
  22471. //#region node_modules/element-plus/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs
  22472. var _hoisted_1$61 = [
  22473. "value",
  22474. "name",
  22475. "disabled",
  22476. "checked"
  22477. ];
  22478. //#endregion
  22479. //#region node_modules/element-plus/es/components/radio/src/radio2.mjs
  22480. var radio_default = /* @__PURE__ */ defineComponent({
  22481. name: "ElRadio",
  22482. __name: "radio",
  22483. props: radioProps,
  22484. emits: radioEmits,
  22485. setup(__props, { emit: __emit }) {
  22486. const props = __props;
  22487. const emit = __emit;
  22488. const ns = useNamespace("radio");
  22489. const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
  22490. function handleChange() {
  22491. nextTick(() => emit(CHANGE_EVENT, modelValue.value));
  22492. }
  22493. return (_ctx, _cache) => {
  22494. return openBlock(), createElementBlock("label", { class: normalizeClass([
  22495. unref(ns).b(),
  22496. unref(ns).is("disabled", unref(disabled)),
  22497. unref(ns).is("focus", unref(focus)),
  22498. unref(ns).is("bordered", __props.border),
  22499. unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
  22500. unref(ns).m(unref(size))
  22501. ]) }, [createBaseVNode("span", { class: normalizeClass([
  22502. unref(ns).e("input"),
  22503. unref(ns).is("disabled", unref(disabled)),
  22504. unref(ns).is("checked", unref(modelValue) === unref(actualValue))
  22505. ]) }, [withDirectives(createBaseVNode("input", {
  22506. ref_key: "radioRef",
  22507. ref: radioRef,
  22508. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  22509. class: normalizeClass(unref(ns).e("original")),
  22510. value: unref(actualValue),
  22511. name: __props.name || unref(radioGroup)?.name,
  22512. disabled: unref(disabled),
  22513. checked: unref(modelValue) === unref(actualValue),
  22514. type: "radio",
  22515. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  22516. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
  22517. onChange: handleChange,
  22518. onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
  22519. }, null, 42, _hoisted_1$61), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), createBaseVNode("span", {
  22520. class: normalizeClass(unref(ns).e("label")),
  22521. onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  22522. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 34)], 2);
  22523. };
  22524. }
  22525. });
  22526. //#endregion
  22527. //#region node_modules/element-plus/es/components/radio/src/radio-button.vue_vue_type_script_setup_true_lang.mjs
  22528. var _hoisted_1$60 = [
  22529. "value",
  22530. "name",
  22531. "disabled"
  22532. ];
  22533. //#endregion
  22534. //#region node_modules/element-plus/es/components/radio/src/radio-button2.mjs
  22535. var radio_button_default = /* @__PURE__ */ defineComponent({
  22536. name: "ElRadioButton",
  22537. __name: "radio-button",
  22538. props: radioButtonProps,
  22539. setup(__props) {
  22540. const props = __props;
  22541. const ns = useNamespace("radio");
  22542. const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
  22543. const activeStyle = computed(() => {
  22544. return {
  22545. backgroundColor: radioGroup?.fill || "",
  22546. borderColor: radioGroup?.fill || "",
  22547. boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : "",
  22548. color: radioGroup?.textColor || ""
  22549. };
  22550. });
  22551. return (_ctx, _cache) => {
  22552. return openBlock(), createElementBlock("label", { class: normalizeClass([
  22553. unref(ns).b("button"),
  22554. unref(ns).is("active", unref(modelValue) === unref(actualValue)),
  22555. unref(ns).is("disabled", unref(disabled)),
  22556. unref(ns).is("focus", unref(focus)),
  22557. unref(ns).bm("button", unref(size))
  22558. ]) }, [withDirectives(createBaseVNode("input", {
  22559. ref_key: "radioRef",
  22560. ref: radioRef,
  22561. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  22562. class: normalizeClass(unref(ns).be("button", "original-radio")),
  22563. value: unref(actualValue),
  22564. type: "radio",
  22565. name: __props.name || unref(radioGroup)?.name,
  22566. disabled: unref(disabled),
  22567. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  22568. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
  22569. onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
  22570. }, null, 42, _hoisted_1$60), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", {
  22571. class: normalizeClass(unref(ns).be("button", "inner")),
  22572. style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
  22573. onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  22574. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 38)], 2);
  22575. };
  22576. }
  22577. });
  22578. //#endregion
  22579. //#region node_modules/element-plus/es/components/radio/src/radio-group.vue_vue_type_script_setup_true_lang.mjs
  22580. var _hoisted_1$59 = [
  22581. "id",
  22582. "aria-label",
  22583. "aria-labelledby"
  22584. ];
  22585. //#endregion
  22586. //#region node_modules/element-plus/es/components/radio/src/radio-group2.mjs
  22587. var radio_group_default = /* @__PURE__ */ defineComponent({
  22588. name: "ElRadioGroup",
  22589. __name: "radio-group",
  22590. props: radioGroupProps,
  22591. emits: radioGroupEmits,
  22592. setup(__props, { emit: __emit }) {
  22593. const props = __props;
  22594. const emit = __emit;
  22595. const ns = useNamespace("radio");
  22596. const radioId = useId();
  22597. const radioGroupRef = ref();
  22598. const { formItem } = useFormItem();
  22599. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  22600. const changeEvent = (value) => {
  22601. emit(UPDATE_MODEL_EVENT, value);
  22602. nextTick(() => emit(CHANGE_EVENT, value));
  22603. };
  22604. onMounted(() => {
  22605. const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
  22606. const firstLabel = radios[0];
  22607. if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) firstLabel.tabIndex = 0;
  22608. });
  22609. const name = computed(() => {
  22610. return props.name || radioId.value;
  22611. });
  22612. const aliasProps = computed(() => ({
  22613. ...radioDefaultProps,
  22614. ...props.props
  22615. }));
  22616. const getOptionProps = (option) => {
  22617. const { label, value, disabled } = aliasProps.value;
  22618. const base = {
  22619. label: option[label],
  22620. value: option[value],
  22621. disabled: option[disabled]
  22622. };
  22623. return {
  22624. ...omit(option, [
  22625. label,
  22626. value,
  22627. disabled
  22628. ]),
  22629. ...base
  22630. };
  22631. };
  22632. const optionComponent = computed(() => props.type === "button" ? radio_button_default : radio_default);
  22633. provide(radioGroupKey, reactive({
  22634. ...toRefs(props),
  22635. changeEvent,
  22636. name
  22637. }));
  22638. watch(() => props.modelValue, (newVal, oldValue) => {
  22639. if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch((err) => debugWarn(err));
  22640. });
  22641. return (_ctx, _cache) => {
  22642. return openBlock(), createElementBlock("div", {
  22643. id: unref(groupId),
  22644. ref_key: "radioGroupRef",
  22645. ref: radioGroupRef,
  22646. class: normalizeClass(unref(ns).b("group")),
  22647. role: "radiogroup",
  22648. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "radio-group" : void 0,
  22649. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
  22650. }, [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  22651. return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
  22652. }), 128))])], 10, _hoisted_1$59);
  22653. };
  22654. }
  22655. });
  22656. //#endregion
  22657. //#region node_modules/element-plus/es/components/radio/index.mjs
  22658. var ElRadio = withInstall(radio_default, {
  22659. RadioButton: radio_button_default,
  22660. RadioGroup: radio_group_default
  22661. });
  22662. var ElRadioGroup = withNoopInstall(radio_group_default);
  22663. var ElRadioButton = withNoopInstall(radio_button_default);
  22664. //#endregion
  22665. //#region node_modules/element-plus/es/components/cascader-panel/src/types.mjs
  22666. var CASCADER_PANEL_INJECTION_KEY = Symbol();
  22667. //#endregion
  22668. //#region node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
  22669. function isVNodeEmpty(vnodes) {
  22670. return !!(isArray$1(vnodes) ? vnodes.every(({ type }) => type === Comment) : vnodes?.type === Comment);
  22671. }
  22672. var node_content_default = /* @__PURE__ */ defineComponent({
  22673. name: "NodeContent",
  22674. props: { node: {
  22675. type: Object,
  22676. required: true
  22677. } },
  22678. setup(props) {
  22679. const ns = useNamespace("cascader-node");
  22680. const { renderLabelFn } = inject(CASCADER_PANEL_INJECTION_KEY);
  22681. const { node } = props;
  22682. const { data, label: nodeLabel } = node;
  22683. const label = () => {
  22684. const renderLabel = renderLabelFn?.({
  22685. node,
  22686. data
  22687. });
  22688. return isVNodeEmpty(renderLabel) ? nodeLabel : renderLabel ?? nodeLabel;
  22689. };
  22690. return () => createVNode("span", { "class": ns.e("label") }, [label()]);
  22691. }
  22692. });
  22693. //#endregion
  22694. //#region node_modules/element-plus/es/components/cascader-panel/src/node.vue_vue_type_script_setup_true_lang.mjs
  22695. var _hoisted_1$58 = [
  22696. "id",
  22697. "aria-haspopup",
  22698. "aria-owns",
  22699. "aria-expanded",
  22700. "tabindex"
  22701. ];
  22702. //#endregion
  22703. //#region node_modules/element-plus/es/components/cascader-panel/src/node2.mjs
  22704. var node_default = /* @__PURE__ */ defineComponent({
  22705. name: "ElCascaderNode",
  22706. __name: "node",
  22707. props: {
  22708. node: {
  22709. type: Object,
  22710. required: true
  22711. },
  22712. menuId: String
  22713. },
  22714. emits: ["expand"],
  22715. setup(__props, { emit: __emit }) {
  22716. const props = __props;
  22717. const emit = __emit;
  22718. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  22719. const ns = useNamespace("cascader-node");
  22720. const isHoverMenu = computed(() => panel.isHoverMenu);
  22721. const multiple = computed(() => panel.config.multiple);
  22722. const checkStrictly = computed(() => panel.config.checkStrictly);
  22723. const showPrefix = computed(() => panel.config.showPrefix);
  22724. const checkedNodeId = computed(() => panel.checkedNodes[0]?.uid);
  22725. const isDisabled = computed(() => props.node.isDisabled);
  22726. const isLeaf = computed(() => props.node.isLeaf);
  22727. const expandable = computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);
  22728. const inExpandingPath = computed(() => isInPath(panel.expandingNode));
  22729. const inCheckedPath = computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
  22730. const isInPath = (node) => {
  22731. const { level, uid } = props.node;
  22732. return node?.pathNodes[level - 1]?.uid === uid;
  22733. };
  22734. const doExpand = () => {
  22735. if (inExpandingPath.value) return;
  22736. panel.expandNode(props.node);
  22737. };
  22738. const doCheck = (checked) => {
  22739. const { node } = props;
  22740. if (checked === node.checked) return;
  22741. panel.handleCheckChange(node, checked);
  22742. };
  22743. const doLoad = () => {
  22744. panel.lazyLoad(props.node, () => {
  22745. if (!isLeaf.value) doExpand();
  22746. });
  22747. };
  22748. const handleHoverExpand = (e) => {
  22749. if (!isHoverMenu.value) return;
  22750. handleExpand();
  22751. !isLeaf.value && emit("expand", e);
  22752. };
  22753. const handleExpand = () => {
  22754. const { node } = props;
  22755. if (!expandable.value || node.loading) return;
  22756. node.loaded ? doExpand() : doLoad();
  22757. };
  22758. const handleClick = () => {
  22759. if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) handleCheck(true);
  22760. else if ((panel.config.checkOnClickNode && (multiple.value || checkStrictly.value) || isLeaf.value && panel.config.checkOnClickLeaf) && !isDisabled.value) handleSelectCheck(!props.node.checked);
  22761. else if (!isHoverMenu.value) handleExpand();
  22762. };
  22763. const handleSelectCheck = (checked) => {
  22764. if (checkStrictly.value) {
  22765. doCheck(checked);
  22766. if (props.node.loaded) doExpand();
  22767. } else handleCheck(checked);
  22768. };
  22769. const handleCheck = (checked) => {
  22770. if (!props.node.loaded) doLoad();
  22771. else {
  22772. doCheck(checked);
  22773. !checkStrictly.value && doExpand();
  22774. }
  22775. };
  22776. return (_ctx, _cache) => {
  22777. return openBlock(), createElementBlock("li", {
  22778. id: `${__props.menuId}-${__props.node.uid}`,
  22779. role: "menuitem",
  22780. "aria-haspopup": !isLeaf.value,
  22781. "aria-owns": isLeaf.value ? void 0 : __props.menuId,
  22782. "aria-expanded": inExpandingPath.value,
  22783. tabindex: expandable.value ? -1 : void 0,
  22784. class: normalizeClass([
  22785. unref(ns).b(),
  22786. unref(ns).is("selectable", checkStrictly.value),
  22787. unref(ns).is("active", __props.node.checked),
  22788. unref(ns).is("disabled", !expandable.value),
  22789. inExpandingPath.value && "in-active-path",
  22790. inCheckedPath.value && "in-checked-path"
  22791. ]),
  22792. onMouseenter: handleHoverExpand,
  22793. onFocus: handleHoverExpand,
  22794. onClick: handleClick
  22795. }, [
  22796. createCommentVNode(" prefix "),
  22797. multiple.value && showPrefix.value ? (openBlock(), createBlock(unref(ElCheckbox), {
  22798. key: 0,
  22799. "model-value": __props.node.checked,
  22800. indeterminate: __props.node.indeterminate,
  22801. disabled: isDisabled.value,
  22802. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
  22803. "onUpdate:modelValue": handleSelectCheck
  22804. }, null, 8, [
  22805. "model-value",
  22806. "indeterminate",
  22807. "disabled"
  22808. ])) : checkStrictly.value && showPrefix.value ? (openBlock(), createBlock(unref(ElRadio), {
  22809. key: 1,
  22810. "model-value": checkedNodeId.value,
  22811. label: __props.node.uid,
  22812. disabled: isDisabled.value,
  22813. "onUpdate:modelValue": handleSelectCheck,
  22814. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  22815. }, {
  22816. default: withCtx(() => [createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "), _cache[2] || (_cache[2] = createBaseVNode("span", null, null, -1))]),
  22817. _: 1
  22818. }, 8, [
  22819. "model-value",
  22820. "label",
  22821. "disabled"
  22822. ])) : isLeaf.value && __props.node.checked ? (openBlock(), createBlock(unref(ElIcon), {
  22823. key: 2,
  22824. class: normalizeClass(unref(ns).e("prefix"))
  22825. }, {
  22826. default: withCtx(() => [createVNode(unref(check_default))]),
  22827. _: 1
  22828. }, 8, ["class"])) : createCommentVNode("v-if", true),
  22829. createCommentVNode(" content "),
  22830. createVNode(unref(node_content_default), { node: __props.node }, null, 8, ["node"]),
  22831. createCommentVNode(" postfix "),
  22832. !isLeaf.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [__props.node.loading ? (openBlock(), createBlock(unref(ElIcon), {
  22833. key: 0,
  22834. class: normalizeClass([unref(ns).is("loading"), unref(ns).e("postfix")])
  22835. }, {
  22836. default: withCtx(() => [createVNode(unref(loading_default))]),
  22837. _: 1
  22838. }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
  22839. key: 1,
  22840. class: normalizeClass(["arrow-right", unref(ns).e("postfix")])
  22841. }, {
  22842. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  22843. _: 1
  22844. }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
  22845. ], 42, _hoisted_1$58);
  22846. };
  22847. }
  22848. });
  22849. //#endregion
  22850. //#region node_modules/element-plus/es/components/cascader-panel/src/menu.mjs
  22851. var menu_default$1 = /* @__PURE__ */ defineComponent({
  22852. name: "ElCascaderMenu",
  22853. __name: "menu",
  22854. props: {
  22855. nodes: {
  22856. type: Array,
  22857. required: true
  22858. },
  22859. index: {
  22860. type: Number,
  22861. required: true
  22862. }
  22863. },
  22864. setup(__props) {
  22865. const props = __props;
  22866. const instance = getCurrentInstance();
  22867. const ns = useNamespace("cascader-menu");
  22868. const { t } = useLocale();
  22869. const id = useId();
  22870. let activeNode;
  22871. let hoverTimer;
  22872. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  22873. const hoverZone = ref();
  22874. const isEmpty = computed(() => !props.nodes.length);
  22875. const isLoading = computed(() => !panel.initialLoaded);
  22876. const menuId = computed(() => `${id.value}-${props.index}`);
  22877. const handleExpand = (e) => {
  22878. activeNode = e.target;
  22879. };
  22880. const handleMouseMove = (e) => {
  22881. if (!panel.isHoverMenu || !activeNode || !hoverZone.value) return;
  22882. if (activeNode.contains(e.target)) {
  22883. clearHoverTimer();
  22884. const el = instance.vnode.el;
  22885. const { left } = el.getBoundingClientRect();
  22886. const { offsetWidth, offsetHeight } = el;
  22887. const startX = e.clientX - left;
  22888. const top = activeNode.offsetTop;
  22889. const bottom = top + activeNode.offsetHeight;
  22890. const scrollTop = el.querySelector(`.${ns.e("wrap")}`)?.scrollTop || 0;
  22891. hoverZone.value.innerHTML = `
  22892. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} ${scrollTop} V${top} Z" />
  22893. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight + scrollTop} V${bottom} Z" />
  22894. `;
  22895. } else if (!hoverTimer) hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
  22896. };
  22897. const clearHoverTimer = () => {
  22898. if (!hoverTimer) return;
  22899. clearTimeout(hoverTimer);
  22900. hoverTimer = void 0;
  22901. };
  22902. const clearHoverZone = () => {
  22903. if (!hoverZone.value) return;
  22904. hoverZone.value.innerHTML = "";
  22905. clearHoverTimer();
  22906. };
  22907. return (_ctx, _cache) => {
  22908. return openBlock(), createBlock(unref(ElScrollbar), {
  22909. key: menuId.value,
  22910. tag: "ul",
  22911. role: "menu",
  22912. class: normalizeClass(unref(ns).b()),
  22913. "wrap-class": unref(ns).e("wrap"),
  22914. "view-class": [unref(ns).e("list"), unref(ns).is("empty", isEmpty.value)],
  22915. onMousemove: handleMouseMove,
  22916. onMouseleave: clearHoverZone
  22917. }, {
  22918. default: withCtx(() => [
  22919. (openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes, (node) => {
  22920. return openBlock(), createBlock(node_default, {
  22921. key: node.uid,
  22922. node,
  22923. "menu-id": menuId.value,
  22924. onExpand: handleExpand
  22925. }, null, 8, ["node", "menu-id"]);
  22926. }), 128)),
  22927. isLoading.value ? (openBlock(), createElementBlock("div", {
  22928. key: 0,
  22929. class: normalizeClass(unref(ns).e("empty-text"))
  22930. }, [createVNode(unref(ElIcon), {
  22931. size: "14",
  22932. class: normalizeClass(unref(ns).is("loading"))
  22933. }, {
  22934. default: withCtx(() => [createVNode(unref(loading_default))]),
  22935. _: 1
  22936. }, 8, ["class"]), createTextVNode(" " + toDisplayString(unref(t)("el.cascader.loading")), 1)], 2)) : isEmpty.value ? (openBlock(), createElementBlock("div", {
  22937. key: 1,
  22938. class: normalizeClass(unref(ns).e("empty-text"))
  22939. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(t)("el.cascader.noData")), 1)])], 2)) : unref(panel)?.isHoverMenu ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" eslint-disable vue/html-self-closing "), (openBlock(), createElementBlock("svg", {
  22940. ref_key: "hoverZone",
  22941. ref: hoverZone,
  22942. class: normalizeClass(unref(ns).e("hover-zone"))
  22943. }, null, 2))], 2112)) : createCommentVNode("v-if", true),
  22944. createCommentVNode(" eslint-enable vue/html-self-closing ")
  22945. ]),
  22946. _: 3
  22947. }, 8, [
  22948. "class",
  22949. "wrap-class",
  22950. "view-class"
  22951. ]);
  22952. };
  22953. }
  22954. });
  22955. //#endregion
  22956. //#region node_modules/element-plus/es/components/cascader-panel/src/node.mjs
  22957. var uid = 0;
  22958. var calculatePathNodes = (node) => {
  22959. const nodes = [node];
  22960. let { parent } = node;
  22961. while (parent) {
  22962. nodes.unshift(parent);
  22963. parent = parent.parent;
  22964. }
  22965. return nodes;
  22966. };
  22967. var Node$2 = class Node {
  22968. constructor(data, config, parent, root = false) {
  22969. this.data = data;
  22970. this.config = config;
  22971. this.parent = parent;
  22972. this.root = root;
  22973. this.uid = uid++;
  22974. this.checked = false;
  22975. this.indeterminate = false;
  22976. this.loading = false;
  22977. const { value: valueKey, label: labelKey, children: childrenKey } = config;
  22978. const childrenData = data[childrenKey];
  22979. const pathNodes = calculatePathNodes(this);
  22980. this.level = root ? 0 : parent ? parent.level + 1 : 1;
  22981. this.value = data[valueKey];
  22982. this.label = data[labelKey];
  22983. this.pathNodes = pathNodes;
  22984. this.pathValues = pathNodes.map((node) => node.value);
  22985. this.pathLabels = pathNodes.map((node) => node.label);
  22986. this.childrenData = childrenData;
  22987. this.children = (childrenData || []).map((child) => new Node(child, config, this));
  22988. this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
  22989. this.text = "";
  22990. }
  22991. get isDisabled() {
  22992. const { data, parent, config } = this;
  22993. const { disabled, checkStrictly } = config;
  22994. return (isFunction$1(disabled) ? disabled(data, this) : !!data[disabled]) || !checkStrictly && !!parent?.isDisabled;
  22995. }
  22996. get isLeaf() {
  22997. const { data, config, childrenData, loaded } = this;
  22998. const { lazy, leaf } = config;
  22999. const isLeaf = isFunction$1(leaf) ? leaf(data, this) : data[leaf];
  23000. return isUndefined(isLeaf) ? lazy && !loaded ? false : !(isArray$1(childrenData) && childrenData.length) : !!isLeaf;
  23001. }
  23002. get valueByOption() {
  23003. return this.config.emitPath ? this.pathValues : this.value;
  23004. }
  23005. appendChild(childData) {
  23006. const { childrenData, children } = this;
  23007. const node = new Node(childData, this.config, this);
  23008. if (isArray$1(childrenData)) childrenData.push(childData);
  23009. else this.childrenData = [childData];
  23010. children.push(node);
  23011. return node;
  23012. }
  23013. calcText(allLevels, separator) {
  23014. const text = allLevels ? this.pathLabels.join(separator) : this.label;
  23015. this.text = text;
  23016. return text;
  23017. }
  23018. broadcast(checked) {
  23019. this.children.forEach((child) => {
  23020. if (child) {
  23021. child.broadcast(checked);
  23022. child.onParentCheck?.(checked);
  23023. }
  23024. });
  23025. }
  23026. emit() {
  23027. const { parent } = this;
  23028. if (parent) {
  23029. parent.onChildCheck?.();
  23030. parent.emit();
  23031. }
  23032. }
  23033. onParentCheck(checked) {
  23034. if (!this.isDisabled) this.setCheckState(checked);
  23035. }
  23036. onChildCheck() {
  23037. const { children } = this;
  23038. const validChildren = children.filter((child) => !child.isDisabled);
  23039. const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
  23040. this.setCheckState(checked);
  23041. }
  23042. setCheckState(checked) {
  23043. const totalNum = this.children.length;
  23044. const checkedNum = this.children.reduce((c, p) => {
  23045. return c + (p.checked ? 1 : p.indeterminate ? .5 : 0);
  23046. }, 0);
  23047. this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
  23048. this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
  23049. }
  23050. doCheck(checked) {
  23051. if (this.checked === checked) return;
  23052. const { checkStrictly, multiple } = this.config;
  23053. if (checkStrictly || !multiple) this.checked = checked;
  23054. else {
  23055. this.broadcast(checked);
  23056. this.setCheckState(checked);
  23057. this.emit();
  23058. }
  23059. }
  23060. };
  23061. //#endregion
  23062. //#region node_modules/element-plus/es/components/cascader-panel/src/store.mjs
  23063. var flatNodes = (nodes, leafOnly) => {
  23064. return nodes.reduce((res, node) => {
  23065. if (node.isLeaf) res.push(node);
  23066. else {
  23067. !leafOnly && res.push(node);
  23068. res = res.concat(flatNodes(node.children, leafOnly));
  23069. }
  23070. return res;
  23071. }, []);
  23072. };
  23073. var Store = class {
  23074. constructor(data, config) {
  23075. this.config = config;
  23076. const nodes = (data || []).map((nodeData) => new Node$2(nodeData, this.config));
  23077. this.nodes = nodes;
  23078. this.allNodes = flatNodes(nodes, false);
  23079. this.leafNodes = flatNodes(nodes, true);
  23080. }
  23081. getNodes() {
  23082. return this.nodes;
  23083. }
  23084. getFlattedNodes(leafOnly) {
  23085. return leafOnly ? this.leafNodes : this.allNodes;
  23086. }
  23087. appendNode(nodeData, parentNode) {
  23088. const node = parentNode ? parentNode.appendChild(nodeData) : new Node$2(nodeData, this.config);
  23089. if (!parentNode) this.nodes.push(node);
  23090. this.appendAllNodesAndLeafNodes(node);
  23091. }
  23092. appendNodes(nodeDataList, parentNode) {
  23093. if (nodeDataList.length > 0) nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
  23094. else parentNode && parentNode.isLeaf && this.leafNodes.push(parentNode);
  23095. }
  23096. appendAllNodesAndLeafNodes(node) {
  23097. this.allNodes.push(node);
  23098. node.isLeaf && this.leafNodes.push(node);
  23099. if (node.children) node.children.forEach((subNode) => {
  23100. this.appendAllNodesAndLeafNodes(subNode);
  23101. });
  23102. }
  23103. getNodeByValue(value, leafOnly = false) {
  23104. if (isPropAbsent(value)) return null;
  23105. return this.getFlattedNodes(leafOnly).find((node) => isEqual$1(node.value, value) || isEqual$1(node.pathValues, value)) || null;
  23106. }
  23107. getSameNode(node) {
  23108. if (!node) return null;
  23109. return this.getFlattedNodes(false).find(({ value, level }) => isEqual$1(node.value, value) && node.level === level) || null;
  23110. }
  23111. };
  23112. //#endregion
  23113. //#region node_modules/element-plus/es/components/cascader-panel/src/utils.mjs
  23114. var getMenuIndex = (el) => {
  23115. if (!el) return 0;
  23116. const pieces = el.id.split("-");
  23117. return Number(pieces[pieces.length - 2]);
  23118. };
  23119. var checkNode = (el) => {
  23120. if (!el) return;
  23121. const input = el.querySelector("input");
  23122. if (input) input.click();
  23123. else if (isLeaf(el)) el.click();
  23124. };
  23125. var sortByOriginalOrder = (oldNodes, newNodes) => {
  23126. const newNodesCopy = newNodes.slice(0);
  23127. const newIds = newNodesCopy.map((node) => node.uid);
  23128. const res = oldNodes.reduce((acc, item) => {
  23129. const index = newIds.indexOf(item.uid);
  23130. if (index > -1) {
  23131. acc.push(item);
  23132. newNodesCopy.splice(index, 1);
  23133. newIds.splice(index, 1);
  23134. }
  23135. return acc;
  23136. }, []);
  23137. res.push(...newNodesCopy);
  23138. return res;
  23139. };
  23140. //#endregion
  23141. //#region node_modules/element-plus/es/components/cascader-panel/index.mjs
  23142. var ElCascaderPanel = withInstall(/* @__PURE__ */ defineComponent({
  23143. name: "ElCascaderPanel",
  23144. __name: "index",
  23145. props: cascaderPanelProps,
  23146. emits: cascaderPanelEmits,
  23147. setup(__props, { expose: __expose, emit: __emit }) {
  23148. const props = __props;
  23149. const emit = __emit;
  23150. let manualChecked = false;
  23151. const ns = useNamespace("cascader");
  23152. const config = useCascaderConfig(props);
  23153. const slots = useSlots();
  23154. let store;
  23155. const initialLoaded = ref(true);
  23156. const initialLoadedOnce = ref(false);
  23157. const menuList = ref([]);
  23158. const checkedValue = ref();
  23159. const menus = ref([]);
  23160. const expandingNode = ref();
  23161. const checkedNodes = ref([]);
  23162. const isHoverMenu = computed(() => config.value.expandTrigger === "hover");
  23163. const renderLabelFn = computed(() => props.renderLabel || slots.default);
  23164. const initStore = () => {
  23165. const { options } = props;
  23166. const cfg = config.value;
  23167. manualChecked = false;
  23168. store = new Store(options, cfg);
  23169. menus.value = [store.getNodes()];
  23170. if (cfg.lazy && isEmpty(props.options)) {
  23171. initialLoaded.value = false;
  23172. lazyLoad(void 0, (list) => {
  23173. if (list) {
  23174. store = new Store(list, cfg);
  23175. menus.value = [store.getNodes()];
  23176. }
  23177. initialLoaded.value = true;
  23178. syncCheckedValue(false, true);
  23179. });
  23180. } else syncCheckedValue(false, true);
  23181. };
  23182. const lazyLoad = (node, cb) => {
  23183. const cfg = config.value;
  23184. node = node || new Node$2({}, cfg, void 0, true);
  23185. node.loading = true;
  23186. const resolve = (dataList) => {
  23187. const _node = node;
  23188. const parent = _node.root ? null : _node;
  23189. _node.loading = false;
  23190. _node.loaded = true;
  23191. _node.childrenData = _node.childrenData || [];
  23192. dataList && store?.appendNodes(dataList, parent);
  23193. dataList && cb?.(dataList);
  23194. if (node.level === 0) initialLoadedOnce.value = true;
  23195. };
  23196. const reject = () => {
  23197. node.loading = false;
  23198. node.loaded = false;
  23199. if (node.level === 0) initialLoaded.value = true;
  23200. };
  23201. cfg.lazyLoad(node, resolve, reject);
  23202. };
  23203. const expandNode = (node, silent) => {
  23204. const { level } = node;
  23205. const newMenus = menus.value.slice(0, level);
  23206. let newExpandingNode;
  23207. if (node.isLeaf) newExpandingNode = node.pathNodes[level - 2];
  23208. else {
  23209. newExpandingNode = node;
  23210. newMenus.push(node.children);
  23211. }
  23212. if (expandingNode.value?.uid !== newExpandingNode?.uid) {
  23213. expandingNode.value = node;
  23214. menus.value = newMenus;
  23215. !silent && emit("expand-change", node?.pathValues || []);
  23216. }
  23217. };
  23218. const handleCheckChange = (node, checked, emitClose = true) => {
  23219. const { checkStrictly, multiple } = config.value;
  23220. const oldNode = checkedNodes.value[0];
  23221. manualChecked = true;
  23222. !multiple && oldNode?.doCheck(false);
  23223. node.doCheck(checked);
  23224. calculateCheckedValue();
  23225. emitClose && !multiple && !checkStrictly && emit("close");
  23226. !emitClose && !multiple && expandParentNode(node);
  23227. };
  23228. const expandParentNode = (node) => {
  23229. if (!node) return;
  23230. node = node.parent;
  23231. expandParentNode(node);
  23232. node && expandNode(node);
  23233. };
  23234. const getFlattedNodes = (leafOnly) => store?.getFlattedNodes(leafOnly);
  23235. const getCheckedNodes = (leafOnly) => {
  23236. return getFlattedNodes(leafOnly)?.filter(({ checked }) => checked !== false);
  23237. };
  23238. const clearCheckedNodes = () => {
  23239. checkedNodes.value.forEach((node) => node.doCheck(false));
  23240. calculateCheckedValue();
  23241. menus.value = menus.value.slice(0, 1);
  23242. expandingNode.value = void 0;
  23243. emit("expand-change", []);
  23244. };
  23245. const calculateCheckedValue = () => {
  23246. const { checkStrictly, multiple } = config.value;
  23247. const oldNodes = checkedNodes.value;
  23248. const nodes = sortByOriginalOrder(oldNodes, getCheckedNodes(!checkStrictly));
  23249. const values = nodes.map((node) => node.valueByOption);
  23250. checkedNodes.value = nodes;
  23251. checkedValue.value = multiple ? values : values[0] ?? null;
  23252. };
  23253. const syncCheckedValue = (loaded = false, forced = false) => {
  23254. const { modelValue } = props;
  23255. const { lazy, multiple, checkStrictly } = config.value;
  23256. const leafOnly = !checkStrictly;
  23257. if (!initialLoaded.value || manualChecked || !forced && isEqual$1(modelValue, checkedValue.value)) return;
  23258. if (lazy && !loaded) {
  23259. const nodes = unique(flattenDeep(castArray(modelValue))).map((val) => store?.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
  23260. if (nodes.length) nodes.forEach((node) => {
  23261. lazyLoad(node, () => syncCheckedValue(false, forced));
  23262. });
  23263. else syncCheckedValue(true, forced);
  23264. } else {
  23265. syncMenuState(unique((multiple ? castArray(modelValue) : [modelValue]).map((val) => store?.getNodeByValue(val, leafOnly))), forced);
  23266. checkedValue.value = cloneDeep(modelValue ?? void 0);
  23267. }
  23268. };
  23269. const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
  23270. const { checkStrictly } = config.value;
  23271. const oldNodes = checkedNodes.value;
  23272. const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
  23273. const oldExpandingNode = store?.getSameNode(expandingNode.value);
  23274. const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
  23275. if (newExpandingNode) newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
  23276. else expandingNode.value = void 0;
  23277. oldNodes.forEach((node) => node.doCheck(false));
  23278. reactive(newNodes).forEach((node) => node.doCheck(true));
  23279. checkedNodes.value = newNodes;
  23280. nextTick(scrollToExpandingNode);
  23281. };
  23282. const scrollToExpandingNode = () => {
  23283. if (!isClient) return;
  23284. menuList.value.forEach((menu) => {
  23285. const menuElement = menu?.$el;
  23286. if (menuElement) {
  23287. const container = menuElement.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
  23288. let activeNode = menuElement.querySelector(`.${ns.b("node")}.in-active-path`);
  23289. if (!activeNode) {
  23290. const activeElements = menuElement.querySelectorAll(`.${ns.b("node")}.${ns.is("active")}`);
  23291. activeNode = activeElements[activeElements.length - 1];
  23292. }
  23293. scrollIntoView(container, activeNode);
  23294. }
  23295. });
  23296. };
  23297. const handleKeyDown = (e) => {
  23298. const target = e.target;
  23299. const code = getEventCode(e);
  23300. switch (code) {
  23301. case EVENT_CODE.up:
  23302. case EVENT_CODE.down:
  23303. e.preventDefault();
  23304. focusNode(getSibling(target, code === EVENT_CODE.up ? -1 : 1, `.${ns.b("node")}[tabindex="-1"]`));
  23305. break;
  23306. case EVENT_CODE.left: {
  23307. e.preventDefault();
  23308. const expandedNode = menuList.value[getMenuIndex(target) - 1]?.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
  23309. focusNode(expandedNode);
  23310. break;
  23311. }
  23312. case EVENT_CODE.right: {
  23313. e.preventDefault();
  23314. const firstNode = menuList.value[getMenuIndex(target) + 1]?.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
  23315. focusNode(firstNode);
  23316. break;
  23317. }
  23318. case EVENT_CODE.enter:
  23319. case EVENT_CODE.numpadEnter:
  23320. checkNode(target);
  23321. break;
  23322. }
  23323. };
  23324. provide(CASCADER_PANEL_INJECTION_KEY, reactive({
  23325. config,
  23326. expandingNode,
  23327. checkedNodes,
  23328. isHoverMenu,
  23329. initialLoaded,
  23330. renderLabelFn,
  23331. lazyLoad,
  23332. expandNode,
  23333. handleCheckChange
  23334. }));
  23335. watch(config, (newVal, oldVal) => {
  23336. if (isEqual$1(newVal, oldVal)) return;
  23337. initStore();
  23338. }, { immediate: true });
  23339. watch(() => props.options, initStore, { deep: true });
  23340. watch(() => props.modelValue, () => {
  23341. manualChecked = false;
  23342. syncCheckedValue();
  23343. }, { deep: true });
  23344. watch(() => checkedValue.value, (val) => {
  23345. if (!isEqual$1(val, props.modelValue)) {
  23346. emit(UPDATE_MODEL_EVENT, val);
  23347. emit(CHANGE_EVENT, val);
  23348. }
  23349. });
  23350. const loadLazyRootNodes = () => {
  23351. if (initialLoadedOnce.value) return;
  23352. initStore();
  23353. };
  23354. onBeforeUpdate(() => menuList.value = []);
  23355. onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());
  23356. __expose({
  23357. menuList,
  23358. menus,
  23359. checkedNodes,
  23360. handleKeyDown,
  23361. handleCheckChange,
  23362. getFlattedNodes,
  23363. getCheckedNodes,
  23364. clearCheckedNodes,
  23365. calculateCheckedValue,
  23366. scrollToExpandingNode,
  23367. loadLazyRootNodes
  23368. });
  23369. return (_ctx, _cache) => {
  23370. return openBlock(), createElementBlock("div", {
  23371. class: normalizeClass([unref(ns).b("panel"), unref(ns).is("bordered", __props.border)]),
  23372. onKeydown: handleKeyDown
  23373. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (menu, index) => {
  23374. return openBlock(), createBlock(menu_default$1, {
  23375. key: index,
  23376. ref_for: true,
  23377. ref: (item) => menuList.value[index] = item,
  23378. index,
  23379. nodes: [...menu]
  23380. }, {
  23381. empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
  23382. _: 3
  23383. }, 8, ["index", "nodes"]);
  23384. }), 128))], 34);
  23385. };
  23386. }
  23387. }));
  23388. //#endregion
  23389. //#region node_modules/element-plus/es/components/cascader/src/cascader.mjs
  23390. /**
  23391. * @deprecated Removed after 3.0.0, Use `CascaderComponentProps` instead.
  23392. */
  23393. var cascaderProps = buildProps({
  23394. ...CommonProps,
  23395. size: useSizeProp,
  23396. placeholder: String,
  23397. disabled: {
  23398. type: Boolean,
  23399. default: void 0
  23400. },
  23401. clearable: Boolean,
  23402. clearIcon: {
  23403. type: iconPropType,
  23404. default: circle_close_default
  23405. },
  23406. filterable: Boolean,
  23407. filterMethod: {
  23408. type: definePropType(Function),
  23409. default: (node, keyword) => node.text.includes(keyword)
  23410. },
  23411. separator: {
  23412. type: String,
  23413. default: " / "
  23414. },
  23415. showAllLevels: {
  23416. type: Boolean,
  23417. default: true
  23418. },
  23419. collapseTags: Boolean,
  23420. maxCollapseTags: {
  23421. type: Number,
  23422. default: 1
  23423. },
  23424. collapseTagsTooltip: Boolean,
  23425. maxCollapseTagsTooltipHeight: { type: [String, Number] },
  23426. debounce: {
  23427. type: Number,
  23428. default: 300
  23429. },
  23430. beforeFilter: {
  23431. type: definePropType(Function),
  23432. default: () => true
  23433. },
  23434. placement: {
  23435. type: definePropType(String),
  23436. values: Ee,
  23437. default: "bottom-start"
  23438. },
  23439. fallbackPlacements: {
  23440. type: definePropType(Array),
  23441. default: [
  23442. "bottom-start",
  23443. "bottom",
  23444. "top-start",
  23445. "top",
  23446. "right",
  23447. "left"
  23448. ]
  23449. },
  23450. popperClass: useTooltipContentProps.popperClass,
  23451. popperStyle: useTooltipContentProps.popperStyle,
  23452. teleported: useTooltipContentProps.teleported,
  23453. effect: {
  23454. type: definePropType(String),
  23455. default: "light"
  23456. },
  23457. tagType: {
  23458. ...tagProps.type,
  23459. default: "info"
  23460. },
  23461. tagEffect: {
  23462. ...tagProps.effect,
  23463. default: "light"
  23464. },
  23465. validateEvent: {
  23466. type: Boolean,
  23467. default: true
  23468. },
  23469. persistent: {
  23470. type: Boolean,
  23471. default: true
  23472. },
  23473. showCheckedStrategy: {
  23474. type: String,
  23475. values: ["parent", "child"],
  23476. default: "child"
  23477. },
  23478. checkOnClickNode: Boolean,
  23479. showPrefix: {
  23480. type: Boolean,
  23481. default: true
  23482. },
  23483. ...useEmptyValuesProps
  23484. });
  23485. var emitChangeFn$1 = (value) => true;
  23486. var cascaderEmits = {
  23487. [UPDATE_MODEL_EVENT]: emitChangeFn$1,
  23488. [CHANGE_EVENT]: emitChangeFn$1,
  23489. focus: (evt) => evt instanceof FocusEvent,
  23490. blur: (evt) => evt instanceof FocusEvent,
  23491. clear: () => true,
  23492. visibleChange: (val) => isBoolean(val),
  23493. expandChange: (val) => !!val,
  23494. removeTag: (val) => !!val
  23495. };
  23496. //#endregion
  23497. //#region node_modules/element-plus/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs
  23498. var _hoisted_1$57 = ["placeholder"];
  23499. var _hoisted_2$34 = ["onClick"];
  23500. //#endregion
  23501. //#region node_modules/element-plus/es/components/cascader/index.mjs
  23502. var ElCascader = withInstall(/* @__PURE__ */ defineComponent({
  23503. name: "ElCascader",
  23504. __name: "cascader",
  23505. props: cascaderProps,
  23506. emits: cascaderEmits,
  23507. setup(__props, { expose: __expose, emit: __emit }) {
  23508. const popperOptions = { modifiers: [{
  23509. name: "arrowPosition",
  23510. enabled: true,
  23511. phase: "main",
  23512. fn: ({ state }) => {
  23513. const { modifiersData, placement } = state;
  23514. if ([
  23515. "right",
  23516. "left",
  23517. "bottom",
  23518. "top"
  23519. ].includes(placement)) return;
  23520. if (modifiersData.arrow) modifiersData.arrow.x = 35;
  23521. },
  23522. requires: ["arrow"]
  23523. }] };
  23524. const props = __props;
  23525. const emit = __emit;
  23526. const attrs = useAttrs$1();
  23527. const slots = useSlots();
  23528. let inputInitialHeight = 0;
  23529. let pressDeleteCount = 0;
  23530. const nsCascader = useNamespace("cascader");
  23531. const nsInput = useNamespace("input");
  23532. const sizeMapPadding = {
  23533. small: 7,
  23534. default: 11,
  23535. large: 15
  23536. };
  23537. const { t } = useLocale();
  23538. const { formItem } = useFormItem();
  23539. const isDisabled = useFormDisabled();
  23540. const { valueOnClear } = useEmptyValues(props);
  23541. const { isComposing, handleComposition } = useComposition({ afterComposition(event) {
  23542. const text = event.target?.value;
  23543. handleInput(text);
  23544. } });
  23545. const tooltipRef = ref();
  23546. const tagTooltipRef = ref();
  23547. const inputRef = ref();
  23548. const tagWrapper = ref();
  23549. const cascaderPanelRef = ref();
  23550. const suggestionPanel = ref();
  23551. const popperVisible = ref(false);
  23552. const inputHover = ref(false);
  23553. const filtering = ref(false);
  23554. const inputValue = ref("");
  23555. const searchInputValue = ref("");
  23556. const tags = ref([]);
  23557. const suggestions = ref([]);
  23558. const showTagList = computed(() => {
  23559. if (!props.props.multiple) return [];
  23560. return props.collapseTags ? tags.value.slice(0, props.maxCollapseTags) : tags.value;
  23561. });
  23562. const collapseTagList = computed(() => {
  23563. if (!props.props.multiple) return [];
  23564. return props.collapseTags ? tags.value.slice(props.maxCollapseTags) : [];
  23565. });
  23566. const cascaderStyle = computed(() => {
  23567. return attrs.style;
  23568. });
  23569. const inputPlaceholder = computed(() => props.placeholder ?? t("el.cascader.placeholder"));
  23570. const currentPlaceholder = computed(() => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
  23571. const realSize = useFormSize();
  23572. const tagSize = computed(() => realSize.value === "small" ? "small" : "default");
  23573. const multiple = computed(() => !!props.props.multiple);
  23574. const readonly = computed(() => !props.filterable || multiple.value);
  23575. const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);
  23576. const checkedNodes = computed(() => cascaderPanelRef.value?.checkedNodes || []);
  23577. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  23578. disabled: isDisabled,
  23579. beforeBlur(event) {
  23580. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  23581. },
  23582. afterBlur() {
  23583. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  23584. }
  23585. });
  23586. const clearBtnVisible = computed(() => {
  23587. if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value) return false;
  23588. return !!checkedNodes.value.length;
  23589. });
  23590. const presentText = computed(() => {
  23591. const { showAllLevels, separator } = props;
  23592. const nodes = checkedNodes.value;
  23593. return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
  23594. });
  23595. const validateState = computed(() => formItem?.validateState || "");
  23596. const checkedValue = computed({
  23597. get() {
  23598. return cloneDeep(props.modelValue);
  23599. },
  23600. set(val) {
  23601. const value = val ?? valueOnClear.value;
  23602. emit(UPDATE_MODEL_EVENT, value);
  23603. emit(CHANGE_EVENT, value);
  23604. if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
  23605. }
  23606. });
  23607. const cascaderKls = computed(() => {
  23608. return [
  23609. nsCascader.b(),
  23610. nsCascader.m(realSize.value),
  23611. nsCascader.is("disabled", isDisabled.value),
  23612. attrs.class
  23613. ];
  23614. });
  23615. const cascaderIconKls = computed(() => {
  23616. return [
  23617. nsInput.e("icon"),
  23618. "icon-arrow-down",
  23619. nsCascader.is("reverse", popperVisible.value)
  23620. ];
  23621. });
  23622. const inputClass = computed(() => nsCascader.is("focus", isFocused.value));
  23623. const contentRef = computed(() => {
  23624. return tooltipRef.value?.popperRef?.contentRef;
  23625. });
  23626. const handleClickOutside = (event) => {
  23627. if (isFocused.value) handleBlur(new FocusEvent("blur", event));
  23628. togglePopperVisible(false);
  23629. };
  23630. const togglePopperVisible = (visible) => {
  23631. if (isDisabled.value) return;
  23632. visible = visible ?? !popperVisible.value;
  23633. if (visible !== popperVisible.value) {
  23634. popperVisible.value = visible;
  23635. inputRef.value?.input?.setAttribute("aria-expanded", `${visible}`);
  23636. if (visible) {
  23637. updatePopperPosition();
  23638. cascaderPanelRef.value && nextTick(cascaderPanelRef.value.scrollToExpandingNode);
  23639. } else if (props.filterable) syncPresentTextValue();
  23640. emit("visibleChange", visible);
  23641. }
  23642. };
  23643. const updatePopperPosition = () => {
  23644. nextTick(() => {
  23645. tooltipRef.value?.updatePopper();
  23646. });
  23647. };
  23648. const hideSuggestionPanel = () => {
  23649. filtering.value = false;
  23650. };
  23651. const genTag = (node) => {
  23652. const { showAllLevels, separator } = props;
  23653. return {
  23654. node,
  23655. key: node.uid,
  23656. text: node.calcText(showAllLevels, separator),
  23657. hitState: false,
  23658. closable: !isDisabled.value && !node.isDisabled
  23659. };
  23660. };
  23661. const deleteTag = (tag) => {
  23662. const node = tag.node;
  23663. node.doCheck(false);
  23664. cascaderPanelRef.value?.calculateCheckedValue();
  23665. emit("removeTag", node.valueByOption);
  23666. };
  23667. const getStrategyCheckedNodes = () => {
  23668. switch (props.showCheckedStrategy) {
  23669. case "child": return checkedNodes.value;
  23670. case "parent": {
  23671. const clickedNodes = getCheckedNodes(false);
  23672. const clickedNodesValue = clickedNodes.map((o) => o.value);
  23673. return clickedNodes.filter((o) => !o.parent || !clickedNodesValue.includes(o.parent.value));
  23674. }
  23675. default: return [];
  23676. }
  23677. };
  23678. const calculatePresentTags = () => {
  23679. if (!multiple.value) return;
  23680. const nodes = getStrategyCheckedNodes();
  23681. const allTags = [];
  23682. nodes.forEach((node) => allTags.push(genTag(node)));
  23683. tags.value = allTags;
  23684. };
  23685. const calculateSuggestions = () => {
  23686. const { filterMethod, showAllLevels, separator } = props;
  23687. const res = cascaderPanelRef.value?.getFlattedNodes(!props.props.checkStrictly)?.filter((node) => {
  23688. if (node.isDisabled) return false;
  23689. node.calcText(showAllLevels, separator);
  23690. return filterMethod(node, searchKeyword.value);
  23691. });
  23692. if (multiple.value) tags.value.forEach((tag) => {
  23693. tag.hitState = false;
  23694. });
  23695. filtering.value = true;
  23696. suggestions.value = res;
  23697. updatePopperPosition();
  23698. };
  23699. const focusFirstNode = () => {
  23700. let firstNode;
  23701. if (filtering.value && suggestionPanel.value) firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
  23702. else firstNode = cascaderPanelRef.value?.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
  23703. if (firstNode) {
  23704. firstNode.focus();
  23705. !filtering.value && firstNode.click();
  23706. }
  23707. };
  23708. const updateStyle = () => {
  23709. const inputInner = inputRef.value?.input;
  23710. const tagWrapperEl = tagWrapper.value;
  23711. const suggestionPanelEl = suggestionPanel.value?.$el;
  23712. if (!isClient || !inputInner) return;
  23713. if (suggestionPanelEl) {
  23714. const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
  23715. suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
  23716. }
  23717. if (tagWrapperEl) {
  23718. const { offsetHeight } = tagWrapperEl;
  23719. const height = tags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
  23720. inputInner.style.height = height;
  23721. if (slots.prefix) {
  23722. const prefix = inputRef.value?.$el.querySelector(`.${nsInput.e("prefix")}`);
  23723. let left = 0;
  23724. if (prefix) {
  23725. left = prefix.offsetWidth;
  23726. if (left > 0) left += sizeMapPadding[realSize.value || "default"];
  23727. }
  23728. tagWrapperEl.style.left = `${left}px`;
  23729. } else tagWrapperEl.style.left = `0`;
  23730. updatePopperPosition();
  23731. }
  23732. };
  23733. const getCheckedNodes = (leafOnly) => {
  23734. return cascaderPanelRef.value?.getCheckedNodes(leafOnly);
  23735. };
  23736. const handleExpandChange = (value) => {
  23737. updatePopperPosition();
  23738. emit("expandChange", value);
  23739. };
  23740. const handleKeyDown = (e) => {
  23741. if (isComposing.value) return;
  23742. switch (getEventCode(e)) {
  23743. case EVENT_CODE.enter:
  23744. case EVENT_CODE.numpadEnter:
  23745. togglePopperVisible();
  23746. break;
  23747. case EVENT_CODE.down:
  23748. togglePopperVisible(true);
  23749. nextTick(focusFirstNode);
  23750. e.preventDefault();
  23751. break;
  23752. case EVENT_CODE.esc:
  23753. if (popperVisible.value === true) {
  23754. e.preventDefault();
  23755. e.stopPropagation();
  23756. togglePopperVisible(false);
  23757. }
  23758. break;
  23759. case EVENT_CODE.tab:
  23760. togglePopperVisible(false);
  23761. break;
  23762. }
  23763. };
  23764. const handleClear = () => {
  23765. cascaderPanelRef.value?.clearCheckedNodes();
  23766. if (!popperVisible.value && props.filterable) syncPresentTextValue();
  23767. togglePopperVisible(false);
  23768. emit("clear");
  23769. };
  23770. const syncPresentTextValue = () => {
  23771. const { value } = presentText;
  23772. inputValue.value = value;
  23773. searchInputValue.value = value;
  23774. };
  23775. const handleSuggestionClick = (node) => {
  23776. const { checked } = node;
  23777. if (multiple.value) cascaderPanelRef.value?.handleCheckChange(node, !checked, false);
  23778. else {
  23779. !checked && cascaderPanelRef.value?.handleCheckChange(node, true, false);
  23780. togglePopperVisible(false);
  23781. }
  23782. };
  23783. const handleSuggestionKeyDown = (e) => {
  23784. const target = e.target;
  23785. const code = getEventCode(e);
  23786. switch (code) {
  23787. case EVENT_CODE.up:
  23788. case EVENT_CODE.down:
  23789. e.preventDefault();
  23790. focusNode(getSibling(target, code === EVENT_CODE.up ? -1 : 1, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
  23791. break;
  23792. case EVENT_CODE.enter:
  23793. case EVENT_CODE.numpadEnter:
  23794. target.click();
  23795. break;
  23796. }
  23797. };
  23798. const handleDelete = () => {
  23799. const lastTag = tags.value[tags.value.length - 1];
  23800. pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
  23801. if (!lastTag || !pressDeleteCount || props.collapseTags && tags.value.length > 1) return;
  23802. if (lastTag.hitState) deleteTag(lastTag);
  23803. else lastTag.hitState = true;
  23804. };
  23805. const handleFilter = useDebounceFn(() => {
  23806. const { value } = searchKeyword;
  23807. if (!value) return;
  23808. const passed = props.beforeFilter(value);
  23809. if (isPromise(passed)) passed.then(calculateSuggestions).catch(() => {});
  23810. else if (passed !== false) calculateSuggestions();
  23811. else hideSuggestionPanel();
  23812. }, computed(() => props.debounce));
  23813. const handleInput = (val, e) => {
  23814. !popperVisible.value && togglePopperVisible(true);
  23815. if (e?.isComposing) return;
  23816. val ? handleFilter() : hideSuggestionPanel();
  23817. };
  23818. const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
  23819. const focus = () => {
  23820. inputRef.value?.focus();
  23821. };
  23822. const blur = () => {
  23823. inputRef.value?.blur();
  23824. };
  23825. watch(filtering, updatePopperPosition);
  23826. watch([
  23827. checkedNodes,
  23828. isDisabled,
  23829. () => props.collapseTags,
  23830. () => props.maxCollapseTags
  23831. ], calculatePresentTags);
  23832. watch(tags, () => {
  23833. nextTick(() => updateStyle());
  23834. });
  23835. watch(realSize, async () => {
  23836. await nextTick();
  23837. const inputInner = inputRef.value.input;
  23838. inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
  23839. updateStyle();
  23840. });
  23841. watch(presentText, syncPresentTextValue, { immediate: true });
  23842. watch(() => popperVisible.value, (val) => {
  23843. if (val && props.props.lazy && props.props.lazyLoad) cascaderPanelRef.value?.loadLazyRootNodes();
  23844. });
  23845. onMounted(() => {
  23846. const inputInner = inputRef.value.input;
  23847. const inputInnerHeight = getInputInnerHeight(inputInner);
  23848. inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
  23849. useResizeObserver(inputInner, updateStyle);
  23850. });
  23851. __expose({
  23852. getCheckedNodes,
  23853. cascaderPanelRef,
  23854. togglePopperVisible,
  23855. contentRef,
  23856. presentText,
  23857. focus,
  23858. blur
  23859. });
  23860. return (_ctx, _cache) => {
  23861. return openBlock(), createBlock(unref(ElTooltip), {
  23862. ref_key: "tooltipRef",
  23863. ref: tooltipRef,
  23864. visible: popperVisible.value,
  23865. teleported: __props.teleported,
  23866. "popper-class": [unref(nsCascader).e("dropdown"), __props.popperClass],
  23867. "popper-style": __props.popperStyle,
  23868. "popper-options": popperOptions,
  23869. "fallback-placements": __props.fallbackPlacements,
  23870. "stop-popper-mouse-event": false,
  23871. "gpu-acceleration": false,
  23872. placement: __props.placement,
  23873. transition: `${unref(nsCascader).namespace.value}-zoom-in-top`,
  23874. effect: __props.effect,
  23875. pure: "",
  23876. persistent: __props.persistent,
  23877. onHide: hideSuggestionPanel
  23878. }, {
  23879. default: withCtx(() => [withDirectives((openBlock(), createElementBlock("div", {
  23880. ref_key: "wrapperRef",
  23881. ref: wrapperRef,
  23882. class: normalizeClass(cascaderKls.value),
  23883. style: normalizeStyle(cascaderStyle.value),
  23884. onClick: _cache[8] || (_cache[8] = () => togglePopperVisible(readonly.value ? void 0 : true)),
  23885. onKeydown: handleKeyDown,
  23886. onMouseenter: _cache[9] || (_cache[9] = ($event) => inputHover.value = true),
  23887. onMouseleave: _cache[10] || (_cache[10] = ($event) => inputHover.value = false)
  23888. }, [createVNode(unref(ElInput), {
  23889. ref_key: "inputRef",
  23890. ref: inputRef,
  23891. modelValue: inputValue.value,
  23892. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
  23893. placeholder: currentPlaceholder.value,
  23894. readonly: readonly.value,
  23895. disabled: unref(isDisabled),
  23896. "validate-event": false,
  23897. size: unref(realSize),
  23898. class: normalizeClass(inputClass.value),
  23899. tabindex: multiple.value && __props.filterable && !unref(isDisabled) ? -1 : void 0,
  23900. onCompositionstart: unref(handleComposition),
  23901. onCompositionupdate: unref(handleComposition),
  23902. onCompositionend: unref(handleComposition),
  23903. onInput: handleInput
  23904. }, createSlots({
  23905. suffix: withCtx(() => [clearBtnVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
  23906. key: "clear",
  23907. class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]),
  23908. onClick: withModifiers(handleClear, ["stop"])
  23909. }, {
  23910. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  23911. _: 1
  23912. }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
  23913. key: "arrow-down",
  23914. class: normalizeClass(cascaderIconKls.value),
  23915. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => togglePopperVisible(), ["stop"]))
  23916. }, {
  23917. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  23918. _: 1
  23919. }, 8, ["class"]))]),
  23920. _: 2
  23921. }, [_ctx.$slots.prefix ? {
  23922. name: "prefix",
  23923. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  23924. key: "0"
  23925. } : void 0]), 1032, [
  23926. "modelValue",
  23927. "placeholder",
  23928. "readonly",
  23929. "disabled",
  23930. "size",
  23931. "class",
  23932. "tabindex",
  23933. "onCompositionstart",
  23934. "onCompositionupdate",
  23935. "onCompositionend"
  23936. ]), multiple.value ? (openBlock(), createElementBlock("div", {
  23937. key: 0,
  23938. ref_key: "tagWrapper",
  23939. ref: tagWrapper,
  23940. class: normalizeClass([unref(nsCascader).e("tags"), unref(nsCascader).is("validate", Boolean(validateState.value))])
  23941. }, [
  23942. renderSlot(_ctx.$slots, "tag", {
  23943. data: tags.value,
  23944. deleteTag
  23945. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(showTagList.value, (tag) => {
  23946. return openBlock(), createBlock(unref(ElTag), {
  23947. key: tag.key,
  23948. type: __props.tagType,
  23949. size: tagSize.value,
  23950. effect: __props.tagEffect,
  23951. hit: tag.hitState,
  23952. closable: tag.closable,
  23953. "disable-transitions": "",
  23954. onClose: ($event) => deleteTag(tag)
  23955. }, {
  23956. default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
  23957. _: 2
  23958. }, 1032, [
  23959. "type",
  23960. "size",
  23961. "effect",
  23962. "hit",
  23963. "closable",
  23964. "onClose"
  23965. ]);
  23966. }), 128))]),
  23967. __props.collapseTags && tags.value.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
  23968. key: 0,
  23969. ref_key: "tagTooltipRef",
  23970. ref: tagTooltipRef,
  23971. disabled: popperVisible.value || !__props.collapseTagsTooltip,
  23972. "fallback-placements": [
  23973. "bottom",
  23974. "top",
  23975. "right",
  23976. "left"
  23977. ],
  23978. placement: "bottom",
  23979. "popper-class": __props.popperClass,
  23980. "popper-style": __props.popperStyle,
  23981. effect: __props.effect,
  23982. persistent: __props.persistent
  23983. }, {
  23984. default: withCtx(() => [createVNode(unref(ElTag), {
  23985. closable: false,
  23986. size: tagSize.value,
  23987. type: __props.tagType,
  23988. effect: __props.tagEffect,
  23989. "disable-transitions": ""
  23990. }, {
  23991. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(nsCascader).e("tags-text")) }, " + " + toDisplayString(tags.value.length - __props.maxCollapseTags), 3)]),
  23992. _: 1
  23993. }, 8, [
  23994. "size",
  23995. "type",
  23996. "effect"
  23997. ])]),
  23998. content: withCtx(() => [createVNode(unref(ElScrollbar), { "max-height": __props.maxCollapseTagsTooltipHeight }, {
  23999. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsCascader).e("collapse-tags")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(collapseTagList.value, (tag, idx) => {
  24000. return openBlock(), createElementBlock("div", {
  24001. key: idx,
  24002. class: normalizeClass(unref(nsCascader).e("collapse-tag"))
  24003. }, [(openBlock(), createBlock(unref(ElTag), {
  24004. key: tag.key,
  24005. class: "in-tooltip",
  24006. type: __props.tagType,
  24007. size: tagSize.value,
  24008. effect: __props.tagEffect,
  24009. hit: tag.hitState,
  24010. closable: tag.closable,
  24011. "disable-transitions": "",
  24012. onClose: ($event) => deleteTag(tag)
  24013. }, {
  24014. default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
  24015. _: 2
  24016. }, 1032, [
  24017. "type",
  24018. "size",
  24019. "effect",
  24020. "hit",
  24021. "closable",
  24022. "onClose"
  24023. ]))], 2);
  24024. }), 128))], 2)]),
  24025. _: 1
  24026. }, 8, ["max-height"])]),
  24027. _: 1
  24028. }, 8, [
  24029. "disabled",
  24030. "popper-class",
  24031. "popper-style",
  24032. "effect",
  24033. "persistent"
  24034. ])) : createCommentVNode("v-if", true),
  24035. __props.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", {
  24036. key: 1,
  24037. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event),
  24038. type: "text",
  24039. class: normalizeClass(unref(nsCascader).e("search-input")),
  24040. placeholder: presentText.value ? "" : inputPlaceholder.value,
  24041. onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)),
  24042. onClick: _cache[4] || (_cache[4] = withModifiers(($event) => togglePopperVisible(true), ["stop"])),
  24043. onKeydown: withKeys(handleDelete, ["delete"]),
  24044. onCompositionstart: _cache[5] || (_cache[5] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
  24045. onCompositionupdate: _cache[6] || (_cache[6] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
  24046. onCompositionend: _cache[7] || (_cache[7] = (...args) => unref(handleComposition) && unref(handleComposition)(...args))
  24047. }, null, 42, _hoisted_1$57)), [[vModelText, searchInputValue.value]]) : createCommentVNode("v-if", true)
  24048. ], 2)) : createCommentVNode("v-if", true)], 38)), [[
  24049. unref(ClickOutside),
  24050. handleClickOutside,
  24051. contentRef.value
  24052. ]])]),
  24053. content: withCtx(() => [
  24054. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  24055. key: 0,
  24056. class: normalizeClass(unref(nsCascader).e("header")),
  24057. onClick: _cache[11] || (_cache[11] = withModifiers(() => {}, ["stop"]))
  24058. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  24059. withDirectives(createVNode(unref(ElCascaderPanel), {
  24060. ref_key: "cascaderPanelRef",
  24061. ref: cascaderPanelRef,
  24062. modelValue: checkedValue.value,
  24063. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => checkedValue.value = $event),
  24064. options: __props.options,
  24065. props: props.props,
  24066. border: false,
  24067. "render-label": _ctx.$slots.default,
  24068. onExpandChange: handleExpandChange,
  24069. onClose: _cache[13] || (_cache[13] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false)))
  24070. }, {
  24071. empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
  24072. _: 3
  24073. }, 8, [
  24074. "modelValue",
  24075. "options",
  24076. "props",
  24077. "render-label"
  24078. ]), [[vShow, !filtering.value]]),
  24079. __props.filterable ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), {
  24080. key: 1,
  24081. ref_key: "suggestionPanel",
  24082. ref: suggestionPanel,
  24083. tag: "ul",
  24084. class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
  24085. "view-class": unref(nsCascader).e("suggestion-list"),
  24086. onKeydown: handleSuggestionKeyDown
  24087. }, {
  24088. default: withCtx(() => [suggestions.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(suggestions.value, (item) => {
  24089. return openBlock(), createElementBlock("li", {
  24090. key: item.uid,
  24091. class: normalizeClass([unref(nsCascader).e("suggestion-item"), unref(nsCascader).is("checked", item.checked)]),
  24092. tabindex: -1,
  24093. onClick: ($event) => handleSuggestionClick(item)
  24094. }, [renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [createBaseVNode("span", null, toDisplayString(item.text), 1), item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  24095. default: withCtx(() => [createVNode(unref(check_default))]),
  24096. _: 1
  24097. })) : createCommentVNode("v-if", true)])], 10, _hoisted_2$34);
  24098. }), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [createBaseVNode("li", { class: normalizeClass(unref(nsCascader).e("empty-text")) }, toDisplayString(unref(t)("el.cascader.noMatch")), 3)])]),
  24099. _: 3
  24100. }, 8, ["class", "view-class"])), [[vShow, filtering.value]]) : createCommentVNode("v-if", true),
  24101. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  24102. key: 2,
  24103. class: normalizeClass(unref(nsCascader).e("footer")),
  24104. onClick: _cache[14] || (_cache[14] = withModifiers(() => {}, ["stop"]))
  24105. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  24106. ]),
  24107. _: 3
  24108. }, 8, [
  24109. "visible",
  24110. "teleported",
  24111. "popper-class",
  24112. "popper-style",
  24113. "fallback-placements",
  24114. "placement",
  24115. "transition",
  24116. "effect",
  24117. "persistent"
  24118. ]);
  24119. };
  24120. }
  24121. }));
  24122. //#endregion
  24123. //#region node_modules/element-plus/es/components/check-tag/src/check-tag.mjs
  24124. /**
  24125. * @deprecated Removed after 3.0.0, Use `CheckTagProps` instead.
  24126. */
  24127. var checkTagProps = buildProps({
  24128. checked: Boolean,
  24129. disabled: Boolean,
  24130. type: {
  24131. type: String,
  24132. values: [
  24133. "primary",
  24134. "success",
  24135. "info",
  24136. "warning",
  24137. "danger"
  24138. ],
  24139. default: "primary"
  24140. }
  24141. });
  24142. var checkTagEmits = {
  24143. "update:checked": (value) => isBoolean(value),
  24144. [CHANGE_EVENT]: (value) => isBoolean(value)
  24145. };
  24146. //#endregion
  24147. //#region node_modules/element-plus/es/components/check-tag/index.mjs
  24148. var ElCheckTag = withInstall(/* @__PURE__ */ defineComponent({
  24149. name: "ElCheckTag",
  24150. __name: "check-tag",
  24151. props: checkTagProps,
  24152. emits: checkTagEmits,
  24153. setup(__props, { emit: __emit }) {
  24154. const props = __props;
  24155. const emit = __emit;
  24156. const ns = useNamespace("check-tag");
  24157. const containerKls = computed(() => [
  24158. ns.b(),
  24159. ns.is("checked", props.checked),
  24160. ns.is("disabled", props.disabled),
  24161. ns.m(props.type || "primary")
  24162. ]);
  24163. const handleChange = () => {
  24164. if (props.disabled) return;
  24165. const checked = !props.checked;
  24166. emit(CHANGE_EVENT, checked);
  24167. emit("update:checked", checked);
  24168. };
  24169. return (_ctx, _cache) => {
  24170. return openBlock(), createElementBlock("span", {
  24171. class: normalizeClass(containerKls.value),
  24172. onClick: handleChange
  24173. }, [renderSlot(_ctx.$slots, "default")], 2);
  24174. };
  24175. }
  24176. }));
  24177. //#endregion
  24178. //#region node_modules/element-plus/es/components/col/src/col.mjs
  24179. /**
  24180. * @deprecated Removed after 3.0.0, Use `ColProps` instead.
  24181. */
  24182. var colProps = buildProps({
  24183. tag: {
  24184. type: String,
  24185. default: "div"
  24186. },
  24187. span: {
  24188. type: Number,
  24189. default: 24
  24190. },
  24191. offset: {
  24192. type: Number,
  24193. default: 0
  24194. },
  24195. pull: {
  24196. type: Number,
  24197. default: 0
  24198. },
  24199. push: {
  24200. type: Number,
  24201. default: 0
  24202. },
  24203. xs: {
  24204. type: definePropType([Number, Object]),
  24205. default: () => mutable({})
  24206. },
  24207. sm: {
  24208. type: definePropType([Number, Object]),
  24209. default: () => mutable({})
  24210. },
  24211. md: {
  24212. type: definePropType([Number, Object]),
  24213. default: () => mutable({})
  24214. },
  24215. lg: {
  24216. type: definePropType([Number, Object]),
  24217. default: () => mutable({})
  24218. },
  24219. xl: {
  24220. type: definePropType([Number, Object]),
  24221. default: () => mutable({})
  24222. }
  24223. });
  24224. //#endregion
  24225. //#region node_modules/element-plus/es/components/row/src/row.mjs
  24226. var RowJustify = [
  24227. "start",
  24228. "center",
  24229. "end",
  24230. "space-around",
  24231. "space-between",
  24232. "space-evenly"
  24233. ];
  24234. var RowAlign = [
  24235. "top",
  24236. "middle",
  24237. "bottom"
  24238. ];
  24239. /**
  24240. * @deprecated Removed after 3.0.0, Use `RowProps` instead.
  24241. */
  24242. var rowProps = buildProps({
  24243. tag: {
  24244. type: String,
  24245. default: "div"
  24246. },
  24247. gutter: {
  24248. type: Number,
  24249. default: 0
  24250. },
  24251. justify: {
  24252. type: String,
  24253. values: RowJustify,
  24254. default: "start"
  24255. },
  24256. align: {
  24257. type: String,
  24258. values: RowAlign
  24259. }
  24260. });
  24261. //#endregion
  24262. //#region node_modules/element-plus/es/components/row/src/constants.mjs
  24263. var rowContextKey = Symbol("rowContextKey");
  24264. //#endregion
  24265. //#region node_modules/element-plus/es/components/row/index.mjs
  24266. var ElRow = withInstall(/* @__PURE__ */ defineComponent({
  24267. name: "ElRow",
  24268. __name: "row",
  24269. props: rowProps,
  24270. setup(__props) {
  24271. const props = __props;
  24272. const ns = useNamespace("row");
  24273. provide(rowContextKey, { gutter: computed(() => props.gutter) });
  24274. const style = computed(() => {
  24275. const styles = {};
  24276. if (!props.gutter) return styles;
  24277. styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
  24278. return styles;
  24279. });
  24280. const rowKls = computed(() => [
  24281. ns.b(),
  24282. ns.is(`justify-${props.justify}`, props.justify !== "start"),
  24283. ns.is(`align-${props.align}`, !!props.align)
  24284. ]);
  24285. return (_ctx, _cache) => {
  24286. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  24287. class: normalizeClass(rowKls.value),
  24288. style: normalizeStyle(style.value)
  24289. }, {
  24290. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  24291. _: 3
  24292. }, 8, ["class", "style"]);
  24293. };
  24294. }
  24295. }));
  24296. //#endregion
  24297. //#region node_modules/element-plus/es/components/col/index.mjs
  24298. var ElCol = withInstall(/* @__PURE__ */ defineComponent({
  24299. name: "ElCol",
  24300. __name: "col",
  24301. props: colProps,
  24302. setup(__props) {
  24303. const props = __props;
  24304. const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
  24305. const ns = useNamespace("col");
  24306. const style = computed(() => {
  24307. const styles = {};
  24308. if (gutter.value) styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
  24309. return styles;
  24310. });
  24311. const colKls = computed(() => {
  24312. const classes = [];
  24313. [
  24314. "span",
  24315. "offset",
  24316. "pull",
  24317. "push"
  24318. ].forEach((prop) => {
  24319. const size = props[prop];
  24320. if (isNumber(size)) {
  24321. if (prop === "span") classes.push(ns.b(`${props[prop]}`));
  24322. else if (size > 0) classes.push(ns.b(`${prop}-${props[prop]}`));
  24323. }
  24324. });
  24325. [
  24326. "xs",
  24327. "sm",
  24328. "md",
  24329. "lg",
  24330. "xl"
  24331. ].forEach((size) => {
  24332. if (isNumber(props[size])) classes.push(ns.b(`${size}-${props[size]}`));
  24333. else if (isObject$2(props[size])) Object.entries(props[size]).forEach(([prop, sizeProp]) => {
  24334. classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
  24335. });
  24336. });
  24337. if (gutter.value) classes.push(ns.is("guttered"));
  24338. return [ns.b(), classes];
  24339. });
  24340. return (_ctx, _cache) => {
  24341. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  24342. class: normalizeClass(colKls.value),
  24343. style: normalizeStyle(style.value)
  24344. }, {
  24345. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  24346. _: 3
  24347. }, 8, ["class", "style"]);
  24348. };
  24349. }
  24350. }));
  24351. //#endregion
  24352. //#region node_modules/element-plus/es/components/collapse/src/collapse.mjs
  24353. var emitChangeFn = (value) => isNumber(value) || isString(value) || isArray$1(value);
  24354. /**
  24355. * @deprecated Removed after 3.0.0, Use `CollapseProps` instead.
  24356. */
  24357. var collapseProps = buildProps({
  24358. accordion: Boolean,
  24359. modelValue: {
  24360. type: definePropType([
  24361. Array,
  24362. String,
  24363. Number
  24364. ]),
  24365. default: () => mutable([])
  24366. },
  24367. expandIconPosition: {
  24368. type: definePropType([String]),
  24369. default: "right"
  24370. },
  24371. beforeCollapse: { type: definePropType(Function) }
  24372. });
  24373. var collapseEmits = {
  24374. [UPDATE_MODEL_EVENT]: emitChangeFn,
  24375. [CHANGE_EVENT]: emitChangeFn
  24376. };
  24377. //#endregion
  24378. //#region node_modules/element-plus/es/components/collapse/src/constants.mjs
  24379. var collapseContextKey = Symbol("collapseContextKey");
  24380. //#endregion
  24381. //#region node_modules/element-plus/es/components/collapse/src/collapse-item.mjs
  24382. /**
  24383. * @deprecated Removed after 3.0.0, Use `CollapseItemProps` instead.
  24384. */
  24385. var collapseItemProps = buildProps({
  24386. title: {
  24387. type: String,
  24388. default: ""
  24389. },
  24390. name: {
  24391. type: definePropType([String, Number]),
  24392. default: void 0
  24393. },
  24394. icon: {
  24395. type: iconPropType,
  24396. default: arrow_right_default
  24397. },
  24398. disabled: Boolean
  24399. });
  24400. //#endregion
  24401. //#region node_modules/element-plus/es/components/collapse-transition/index.mjs
  24402. var ElCollapseTransition = withInstall(/* @__PURE__ */ defineComponent({
  24403. name: "ElCollapseTransition",
  24404. __name: "collapse-transition",
  24405. setup(__props) {
  24406. const ns = useNamespace("collapse-transition");
  24407. const reset = (el) => {
  24408. el.style.maxHeight = "";
  24409. el.style.overflow = el.dataset.oldOverflow;
  24410. el.style.paddingTop = el.dataset.oldPaddingTop;
  24411. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  24412. };
  24413. const on = {
  24414. beforeEnter(el) {
  24415. if (!el.dataset) el.dataset = {};
  24416. el.dataset.oldPaddingTop = el.style.paddingTop;
  24417. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  24418. if (el.style.height) el.dataset.elExistsHeight = el.style.height;
  24419. el.style.maxHeight = 0;
  24420. el.style.paddingTop = 0;
  24421. el.style.paddingBottom = 0;
  24422. },
  24423. enter(el) {
  24424. requestAnimationFrame(() => {
  24425. el.dataset.oldOverflow = el.style.overflow;
  24426. if (el.dataset.elExistsHeight) el.style.maxHeight = el.dataset.elExistsHeight;
  24427. else if (el.scrollHeight !== 0) el.style.maxHeight = `${el.scrollHeight}px`;
  24428. else el.style.maxHeight = 0;
  24429. el.style.paddingTop = el.dataset.oldPaddingTop;
  24430. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  24431. el.style.overflow = "hidden";
  24432. });
  24433. },
  24434. afterEnter(el) {
  24435. el.style.maxHeight = "";
  24436. el.style.overflow = el.dataset.oldOverflow;
  24437. },
  24438. enterCancelled(el) {
  24439. reset(el);
  24440. },
  24441. beforeLeave(el) {
  24442. if (!el.dataset) el.dataset = {};
  24443. el.dataset.oldPaddingTop = el.style.paddingTop;
  24444. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  24445. el.dataset.oldOverflow = el.style.overflow;
  24446. el.style.maxHeight = `${el.scrollHeight}px`;
  24447. el.style.overflow = "hidden";
  24448. },
  24449. leave(el) {
  24450. if (el.scrollHeight !== 0) {
  24451. el.style.maxHeight = 0;
  24452. el.style.paddingTop = 0;
  24453. el.style.paddingBottom = 0;
  24454. }
  24455. },
  24456. afterLeave(el) {
  24457. reset(el);
  24458. },
  24459. leaveCancelled(el) {
  24460. reset(el);
  24461. }
  24462. };
  24463. return (_ctx, _cache) => {
  24464. return openBlock(), createBlock(Transition, mergeProps({ name: unref(ns).b() }, toHandlers(on)), {
  24465. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  24466. _: 3
  24467. }, 16, ["name"]);
  24468. };
  24469. }
  24470. }));
  24471. //#endregion
  24472. //#region node_modules/element-plus/es/components/collapse/src/use-collapse.mjs
  24473. var SCOPE$7 = "ElCollapse";
  24474. var useCollapse = (props, emit) => {
  24475. const activeNames = ref(castArray$1(props.modelValue));
  24476. const setActiveNames = (_activeNames) => {
  24477. activeNames.value = _activeNames;
  24478. const value = props.accordion ? activeNames.value[0] : activeNames.value;
  24479. emit(UPDATE_MODEL_EVENT, value);
  24480. emit(CHANGE_EVENT, value);
  24481. };
  24482. const handleChange = (name) => {
  24483. if (props.accordion) setActiveNames([activeNames.value[0] === name ? "" : name]);
  24484. else {
  24485. const _activeNames = [...activeNames.value];
  24486. const index = _activeNames.indexOf(name);
  24487. if (index > -1) _activeNames.splice(index, 1);
  24488. else _activeNames.push(name);
  24489. setActiveNames(_activeNames);
  24490. }
  24491. };
  24492. const handleItemClick = async (name) => {
  24493. const { beforeCollapse } = props;
  24494. if (!beforeCollapse) {
  24495. handleChange(name);
  24496. return;
  24497. }
  24498. const shouldChange = beforeCollapse(name);
  24499. if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(SCOPE$7, "beforeCollapse must return type `Promise<boolean>` or `boolean`");
  24500. if (isPromise(shouldChange)) shouldChange.then((result) => {
  24501. if (result !== false) handleChange(name);
  24502. }).catch((e) => {
  24503. debugWarn(SCOPE$7, `some error occurred: ${e}`);
  24504. });
  24505. else if (shouldChange) handleChange(name);
  24506. };
  24507. watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
  24508. provide(collapseContextKey, {
  24509. activeNames,
  24510. handleItemClick
  24511. });
  24512. return {
  24513. activeNames,
  24514. setActiveNames
  24515. };
  24516. };
  24517. var useCollapseDOM = (props) => {
  24518. const ns = useNamespace("collapse");
  24519. return { rootKls: computed(() => [ns.b(), ns.b(`icon-position-${props.expandIconPosition}`)]) };
  24520. };
  24521. //#endregion
  24522. //#region node_modules/element-plus/es/components/collapse/src/collapse2.mjs
  24523. var collapse_default = /* @__PURE__ */ defineComponent({
  24524. name: "ElCollapse",
  24525. __name: "collapse",
  24526. props: collapseProps,
  24527. emits: collapseEmits,
  24528. setup(__props, { expose: __expose, emit: __emit }) {
  24529. const props = __props;
  24530. const { activeNames, setActiveNames } = useCollapse(props, __emit);
  24531. const { rootKls } = useCollapseDOM(props);
  24532. __expose({
  24533. activeNames,
  24534. setActiveNames
  24535. });
  24536. return (_ctx, _cache) => {
  24537. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [renderSlot(_ctx.$slots, "default")], 2);
  24538. };
  24539. }
  24540. });
  24541. //#endregion
  24542. //#region node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs
  24543. var useCollapseItem = (props) => {
  24544. const collapse = inject(collapseContextKey);
  24545. const { namespace } = useNamespace("collapse");
  24546. const focusing = ref(false);
  24547. const isClick = ref(false);
  24548. const idInjection = useIdInjection();
  24549. const id = computed(() => idInjection.current++);
  24550. const name = computed(() => {
  24551. return props.name ?? `${namespace.value}-id-${idInjection.prefix}-${unref(id)}`;
  24552. });
  24553. const isActive = computed(() => collapse?.activeNames.value.includes(unref(name)));
  24554. const handleFocus = () => {
  24555. setTimeout(() => {
  24556. if (!isClick.value) focusing.value = true;
  24557. else isClick.value = false;
  24558. }, 50);
  24559. };
  24560. const handleHeaderClick = (e) => {
  24561. if (props.disabled) return;
  24562. if (e.target?.closest("input, textarea, select")) return;
  24563. collapse?.handleItemClick(unref(name));
  24564. focusing.value = false;
  24565. isClick.value = true;
  24566. };
  24567. const handleEnterClick = (e) => {
  24568. if (e.target?.closest("input, textarea, select")) return;
  24569. e.preventDefault();
  24570. collapse?.handleItemClick(unref(name));
  24571. };
  24572. return {
  24573. focusing,
  24574. id,
  24575. isActive,
  24576. handleFocus,
  24577. handleHeaderClick,
  24578. handleEnterClick
  24579. };
  24580. };
  24581. var useCollapseItemDOM = (props, { focusing, isActive, id }) => {
  24582. const ns = useNamespace("collapse");
  24583. const rootKls = computed(() => [
  24584. ns.b("item"),
  24585. ns.is("active", unref(isActive)),
  24586. ns.is("disabled", props.disabled)
  24587. ]);
  24588. const headKls = computed(() => [
  24589. ns.be("item", "header"),
  24590. ns.is("active", unref(isActive)),
  24591. { focusing: unref(focusing) && !props.disabled }
  24592. ]);
  24593. const arrowKls = computed(() => [ns.be("item", "arrow"), ns.is("active", unref(isActive))]);
  24594. return {
  24595. itemTitleKls: computed(() => [ns.be("item", "title")]),
  24596. arrowKls,
  24597. headKls,
  24598. rootKls,
  24599. itemWrapperKls: computed(() => ns.be("item", "wrap")),
  24600. itemContentKls: computed(() => ns.be("item", "content")),
  24601. scopedContentId: computed(() => ns.b(`content-${unref(id)}`)),
  24602. scopedHeadId: computed(() => ns.b(`head-${unref(id)}`))
  24603. };
  24604. };
  24605. //#endregion
  24606. //#region node_modules/element-plus/es/components/collapse/src/collapse-item.vue_vue_type_script_setup_true_lang.mjs
  24607. var _hoisted_1$56 = [
  24608. "id",
  24609. "aria-expanded",
  24610. "aria-controls",
  24611. "aria-describedby",
  24612. "tabindex",
  24613. "aria-disabled"
  24614. ];
  24615. var _hoisted_2$33 = [
  24616. "id",
  24617. "aria-hidden",
  24618. "aria-labelledby"
  24619. ];
  24620. //#endregion
  24621. //#region node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs
  24622. var collapse_item_default = /* @__PURE__ */ defineComponent({
  24623. name: "ElCollapseItem",
  24624. __name: "collapse-item",
  24625. props: collapseItemProps,
  24626. setup(__props, { expose: __expose }) {
  24627. const props = __props;
  24628. const { focusing, id, isActive, handleFocus, handleHeaderClick, handleEnterClick } = useCollapseItem(props);
  24629. const { arrowKls, headKls, rootKls, itemTitleKls, itemWrapperKls, itemContentKls, scopedContentId, scopedHeadId } = useCollapseItemDOM(props, {
  24630. focusing,
  24631. isActive,
  24632. id
  24633. });
  24634. __expose({ isActive });
  24635. return (_ctx, _cache) => {
  24636. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  24637. id: unref(scopedHeadId),
  24638. class: normalizeClass(unref(headKls)),
  24639. "aria-expanded": unref(isActive),
  24640. "aria-controls": unref(scopedContentId),
  24641. "aria-describedby": unref(scopedContentId),
  24642. tabindex: __props.disabled ? void 0 : 0,
  24643. "aria-disabled": __props.disabled,
  24644. role: "button",
  24645. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
  24646. onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop"]), ["space", "enter"])),
  24647. onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  24648. onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
  24649. }, [createBaseVNode("span", { class: normalizeClass(unref(itemTitleKls)) }, [renderSlot(_ctx.$slots, "title", { isActive: unref(isActive) }, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(arrowKls)) }, {
  24650. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  24651. _: 1
  24652. }, 8, ["class"])])], 42, _hoisted_1$56), createVNode(unref(ElCollapseTransition), null, {
  24653. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  24654. id: unref(scopedContentId),
  24655. role: "region",
  24656. class: normalizeClass(unref(itemWrapperKls)),
  24657. "aria-hidden": !unref(isActive),
  24658. "aria-labelledby": unref(scopedHeadId)
  24659. }, [createBaseVNode("div", { class: normalizeClass(unref(itemContentKls)) }, [renderSlot(_ctx.$slots, "default")], 2)], 10, _hoisted_2$33), [[vShow, unref(isActive)]])]),
  24660. _: 3
  24661. })], 2);
  24662. };
  24663. }
  24664. });
  24665. //#endregion
  24666. //#region node_modules/element-plus/es/components/collapse/index.mjs
  24667. var ElCollapse = withInstall(collapse_default, { CollapseItem: collapse_item_default });
  24668. var ElCollapseItem = withNoopInstall(collapse_item_default);
  24669. //#endregion
  24670. //#region node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel.mjs
  24671. /**
  24672. * @deprecated Removed after 3.0.0, Use `ColorPickerPanelProps` instead.
  24673. */
  24674. var colorPickerPanelProps = buildProps({
  24675. modelValue: {
  24676. type: definePropType(String),
  24677. default: void 0
  24678. },
  24679. border: {
  24680. type: Boolean,
  24681. default: true
  24682. },
  24683. showAlpha: Boolean,
  24684. colorFormat: { type: definePropType(String) },
  24685. disabled: Boolean,
  24686. predefine: { type: definePropType(Array) },
  24687. validateEvent: {
  24688. type: Boolean,
  24689. default: true
  24690. }
  24691. });
  24692. var colorPickerPanelEmits = { [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val) };
  24693. var ROOT_COMMON_COLOR_INJECTION_KEY = Symbol("colorCommonPickerKey");
  24694. var colorPickerPanelContextKey = Symbol("colorPickerPanelContextKey");
  24695. //#endregion
  24696. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/slider.mjs
  24697. /**
  24698. * @deprecated Removed after 3.0.0, Use `AlphaSliderProps` instead.
  24699. */
  24700. var alphaSliderProps = buildProps({
  24701. color: {
  24702. type: definePropType(Object),
  24703. required: true
  24704. },
  24705. vertical: Boolean,
  24706. disabled: Boolean
  24707. });
  24708. /**
  24709. * @deprecated Removed after 3.0.0, Use `HueSliderProps` instead.
  24710. */
  24711. var hueSliderProps = alphaSliderProps;
  24712. //#endregion
  24713. //#region node_modules/element-plus/es/utils/dom/position.mjs
  24714. var getOffsetTop = (el) => {
  24715. let offset = 0;
  24716. let parent = el;
  24717. while (parent) {
  24718. offset += parent.offsetTop;
  24719. parent = parent.offsetParent;
  24720. }
  24721. return offset;
  24722. };
  24723. var getOffsetTopDistance = (el, containerEl) => {
  24724. return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
  24725. };
  24726. var getClientXY = (event) => {
  24727. let clientX;
  24728. let clientY;
  24729. if (event.type === "touchend") {
  24730. clientY = event.changedTouches[0].clientY;
  24731. clientX = event.changedTouches[0].clientX;
  24732. } else if (event.type.startsWith("touch")) {
  24733. clientY = event.touches[0].clientY;
  24734. clientX = event.touches[0].clientX;
  24735. } else {
  24736. clientY = event.clientY;
  24737. clientX = event.clientX;
  24738. }
  24739. return {
  24740. clientX,
  24741. clientY
  24742. };
  24743. };
  24744. //#endregion
  24745. //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/draggable.mjs
  24746. var isDragging = false;
  24747. function draggable(element, options) {
  24748. if (!isClient) return;
  24749. const moveFn = function(event) {
  24750. options.drag?.(event);
  24751. };
  24752. const upFn = function(event) {
  24753. document.removeEventListener("mousemove", moveFn);
  24754. document.removeEventListener("mouseup", upFn);
  24755. document.removeEventListener("touchmove", moveFn);
  24756. document.removeEventListener("touchend", upFn);
  24757. document.onselectstart = null;
  24758. document.ondragstart = null;
  24759. isDragging = false;
  24760. options.end?.(event);
  24761. };
  24762. const downFn = function(event) {
  24763. if (isDragging) return;
  24764. document.onselectstart = () => false;
  24765. document.ondragstart = () => false;
  24766. document.addEventListener("mousemove", moveFn);
  24767. document.addEventListener("mouseup", upFn);
  24768. document.addEventListener("touchmove", moveFn);
  24769. document.addEventListener("touchend", upFn);
  24770. isDragging = true;
  24771. options.start?.(event);
  24772. };
  24773. element.addEventListener("mousedown", downFn);
  24774. element.addEventListener("touchstart", downFn, { passive: false });
  24775. }
  24776. //#endregion
  24777. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-slider.mjs
  24778. var useSlider = (props, { key, minValue, maxValue }) => {
  24779. const instance = getCurrentInstance();
  24780. const thumb = shallowRef();
  24781. const bar = shallowRef();
  24782. const currentValue = computed(() => props.color.get(key));
  24783. function handleClick(event) {
  24784. if (props.disabled) return;
  24785. if (event.target !== thumb.value) handleDrag(event);
  24786. thumb.value?.focus();
  24787. }
  24788. function handleDrag(event) {
  24789. if (!bar.value || !thumb.value || props.disabled) return;
  24790. const rect = instance.vnode.el.getBoundingClientRect();
  24791. const { clientX, clientY } = getClientXY(event);
  24792. let value;
  24793. if (!props.vertical) {
  24794. let left = clientX - rect.left;
  24795. left = Math.max(thumb.value.offsetWidth / 2, left);
  24796. left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
  24797. value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * maxValue);
  24798. } else {
  24799. let top = clientY - rect.top;
  24800. top = Math.max(thumb.value.offsetHeight / 2, top);
  24801. top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
  24802. value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * maxValue);
  24803. }
  24804. props.color.set(key, value);
  24805. }
  24806. function handleKeydown(event) {
  24807. if (props.disabled) return;
  24808. const { shiftKey } = event;
  24809. const code = getEventCode(event);
  24810. const step = shiftKey ? 10 : 1;
  24811. const reverse = key === "hue" ? -1 : 1;
  24812. let isPreventDefault = true;
  24813. switch (code) {
  24814. case EVENT_CODE.left:
  24815. case EVENT_CODE.down:
  24816. incrementPosition(-step * reverse);
  24817. break;
  24818. case EVENT_CODE.right:
  24819. case EVENT_CODE.up:
  24820. incrementPosition(step * reverse);
  24821. break;
  24822. case EVENT_CODE.home:
  24823. props.color.set(key, key === "hue" ? maxValue : minValue);
  24824. break;
  24825. case EVENT_CODE.end:
  24826. props.color.set(key, key === "hue" ? minValue : maxValue);
  24827. break;
  24828. case EVENT_CODE.pageDown:
  24829. incrementPosition(-4 * reverse);
  24830. break;
  24831. case EVENT_CODE.pageUp:
  24832. incrementPosition(4 * reverse);
  24833. break;
  24834. default:
  24835. isPreventDefault = false;
  24836. break;
  24837. }
  24838. isPreventDefault && event.preventDefault();
  24839. }
  24840. function incrementPosition(step) {
  24841. let next = currentValue.value + step;
  24842. next = next < minValue ? minValue : next > maxValue ? maxValue : next;
  24843. props.color.set(key, next);
  24844. }
  24845. return {
  24846. thumb,
  24847. bar,
  24848. currentValue,
  24849. handleDrag,
  24850. handleClick,
  24851. handleKeydown
  24852. };
  24853. };
  24854. var useSliderDOM = (props, { namespace, maxValue, bar, thumb, currentValue, handleDrag, getBackground }) => {
  24855. const instance = getCurrentInstance();
  24856. const ns = useNamespace(namespace);
  24857. const thumbLeft = ref(0);
  24858. const thumbTop = ref(0);
  24859. const background = ref();
  24860. function getThumbLeft() {
  24861. if (!thumb.value) return 0;
  24862. if (props.vertical) return 0;
  24863. const el = instance.vnode.el;
  24864. const value = currentValue.value;
  24865. if (!el) return 0;
  24866. return Math.round(value * (el.offsetWidth - thumb.value.offsetWidth / 2) / maxValue);
  24867. }
  24868. function getThumbTop() {
  24869. if (!thumb.value) return 0;
  24870. const el = instance.vnode.el;
  24871. if (!props.vertical) return 0;
  24872. const value = currentValue.value;
  24873. if (!el) return 0;
  24874. return Math.round(value * (el.offsetHeight - thumb.value.offsetHeight / 2) / maxValue);
  24875. }
  24876. function update() {
  24877. thumbLeft.value = getThumbLeft();
  24878. thumbTop.value = getThumbTop();
  24879. background.value = getBackground?.();
  24880. }
  24881. onMounted(() => {
  24882. if (!bar.value || !thumb.value) return;
  24883. const dragConfig = {
  24884. drag: (event) => {
  24885. handleDrag(event);
  24886. },
  24887. end: (event) => {
  24888. handleDrag(event);
  24889. }
  24890. };
  24891. draggable(bar.value, dragConfig);
  24892. draggable(thumb.value, dragConfig);
  24893. update();
  24894. });
  24895. watch(currentValue, () => update());
  24896. watch(() => props.color.value, () => update());
  24897. const rootKls = computed(() => [
  24898. ns.b(),
  24899. ns.is("vertical", props.vertical),
  24900. ns.is("disabled", props.disabled)
  24901. ]);
  24902. const barKls = computed(() => ns.e("bar"));
  24903. const thumbKls = computed(() => ns.e("thumb"));
  24904. return {
  24905. rootKls,
  24906. barKls,
  24907. barStyle: computed(() => ({ background: background.value })),
  24908. thumbKls,
  24909. thumbStyle: computed(() => ({
  24910. left: addUnit(thumbLeft.value),
  24911. top: addUnit(thumbTop.value)
  24912. })),
  24913. thumbLeft,
  24914. thumbTop,
  24915. update
  24916. };
  24917. };
  24918. //#endregion
  24919. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.vue_vue_type_script_setup_true_lang.mjs
  24920. var _hoisted_1$55 = [
  24921. "aria-label",
  24922. "aria-valuenow",
  24923. "aria-valuetext",
  24924. "aria-orientation",
  24925. "tabindex",
  24926. "aria-disabled"
  24927. ];
  24928. var minValue$1 = 0;
  24929. var maxValue$1 = 100;
  24930. //#endregion
  24931. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.mjs
  24932. var alpha_slider_default = /* @__PURE__ */ defineComponent({
  24933. name: "ElColorAlphaSlider",
  24934. __name: "alpha-slider",
  24935. props: alphaSliderProps,
  24936. setup(__props, { expose: __expose }) {
  24937. const props = __props;
  24938. const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
  24939. key: "alpha",
  24940. minValue: minValue$1,
  24941. maxValue: maxValue$1
  24942. });
  24943. const { rootKls, barKls, barStyle, thumbKls, thumbStyle, update } = useSliderDOM(props, {
  24944. namespace: "color-alpha-slider",
  24945. maxValue: maxValue$1,
  24946. currentValue,
  24947. bar,
  24948. thumb,
  24949. handleDrag,
  24950. getBackground
  24951. });
  24952. const { t } = useLocale();
  24953. const ariaLabel = computed(() => t("el.colorpicker.alphaLabel"));
  24954. const ariaValuetext = computed(() => {
  24955. return t("el.colorpicker.alphaDescription", {
  24956. alpha: currentValue.value,
  24957. color: props.color.value
  24958. });
  24959. });
  24960. function getBackground() {
  24961. if (props.color && props.color.value) {
  24962. const { r, g, b } = props.color.toRgb();
  24963. return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`;
  24964. }
  24965. return "";
  24966. }
  24967. __expose({
  24968. update,
  24969. bar,
  24970. thumb
  24971. });
  24972. return (_ctx, _cache) => {
  24973. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  24974. ref_key: "bar",
  24975. ref: bar,
  24976. class: normalizeClass(unref(barKls)),
  24977. style: normalizeStyle(unref(barStyle)),
  24978. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  24979. }, null, 6), createBaseVNode("div", {
  24980. ref_key: "thumb",
  24981. ref: thumb,
  24982. class: normalizeClass(unref(thumbKls)),
  24983. style: normalizeStyle(unref(thumbStyle)),
  24984. "aria-label": ariaLabel.value,
  24985. "aria-valuenow": unref(currentValue),
  24986. "aria-valuetext": ariaValuetext.value,
  24987. "aria-orientation": __props.vertical ? "vertical" : "horizontal",
  24988. "aria-valuemin": minValue$1,
  24989. "aria-valuemax": maxValue$1,
  24990. role: "slider",
  24991. tabindex: __props.disabled ? void 0 : 0,
  24992. "aria-disabled": __props.disabled,
  24993. onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  24994. }, null, 46, _hoisted_1$55)], 2);
  24995. };
  24996. }
  24997. });
  24998. //#endregion
  24999. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.vue_vue_type_script_setup_true_lang.mjs
  25000. var _hoisted_1$54 = [
  25001. "aria-label",
  25002. "aria-valuenow",
  25003. "aria-valuetext",
  25004. "aria-orientation",
  25005. "tabindex",
  25006. "aria-disabled"
  25007. ];
  25008. var minValue = 0;
  25009. var maxValue = 360;
  25010. //#endregion
  25011. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.mjs
  25012. var hue_slider_default = /* @__PURE__ */ defineComponent({
  25013. name: "ElColorHueSlider",
  25014. __name: "hue-slider",
  25015. props: hueSliderProps,
  25016. setup(__props, { expose: __expose }) {
  25017. const props = __props;
  25018. const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
  25019. key: "hue",
  25020. minValue,
  25021. maxValue
  25022. });
  25023. const { rootKls, barKls, thumbKls, thumbStyle, thumbTop, update } = useSliderDOM(props, {
  25024. namespace: "color-hue-slider",
  25025. maxValue,
  25026. currentValue,
  25027. bar,
  25028. thumb,
  25029. handleDrag
  25030. });
  25031. const { t } = useLocale();
  25032. const ariaLabel = computed(() => t("el.colorpicker.hueLabel"));
  25033. const ariaValuetext = computed(() => {
  25034. return t("el.colorpicker.hueDescription", {
  25035. hue: currentValue.value,
  25036. color: props.color.value
  25037. });
  25038. });
  25039. __expose({
  25040. bar,
  25041. thumb,
  25042. thumbTop,
  25043. update
  25044. });
  25045. return (_ctx, _cache) => {
  25046. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  25047. ref_key: "bar",
  25048. ref: bar,
  25049. class: normalizeClass(unref(barKls)),
  25050. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  25051. }, null, 2), createBaseVNode("div", {
  25052. ref_key: "thumb",
  25053. ref: thumb,
  25054. class: normalizeClass(unref(thumbKls)),
  25055. style: normalizeStyle(unref(thumbStyle)),
  25056. "aria-label": ariaLabel.value,
  25057. "aria-valuenow": unref(currentValue),
  25058. "aria-valuetext": ariaValuetext.value,
  25059. "aria-orientation": __props.vertical ? "vertical" : "horizontal",
  25060. "aria-valuemin": minValue,
  25061. "aria-valuemax": maxValue,
  25062. role: "slider",
  25063. tabindex: __props.disabled ? void 0 : 0,
  25064. "aria-disabled": __props.disabled,
  25065. onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  25066. }, null, 46, _hoisted_1$54)], 2);
  25067. };
  25068. }
  25069. });
  25070. //#endregion
  25071. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/predefine.mjs
  25072. /**
  25073. * @deprecated Removed after 3.0.0, Use `PredefineProps` instead.
  25074. */
  25075. var predefineProps = buildProps({
  25076. colors: {
  25077. type: definePropType(Array),
  25078. required: true
  25079. },
  25080. color: {
  25081. type: definePropType(Object),
  25082. required: true
  25083. },
  25084. enableAlpha: {
  25085. type: Boolean,
  25086. required: true
  25087. },
  25088. disabled: Boolean
  25089. });
  25090. //#endregion
  25091. //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/color.mjs
  25092. var Color = class {
  25093. constructor(options = {}) {
  25094. this._hue = 0;
  25095. this._saturation = 100;
  25096. this._value = 100;
  25097. this._alpha = 100;
  25098. this._tiny = new TinyColor();
  25099. this._isValid = false;
  25100. this.enableAlpha = false;
  25101. this.format = "";
  25102. this.value = "";
  25103. for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
  25104. if (options.value) this.fromString(options.value);
  25105. else this.doOnChange();
  25106. }
  25107. set(prop, value) {
  25108. if (arguments.length === 1 && typeof prop === "object") {
  25109. for (const p in prop) if (hasOwn(prop, p)) this.set(p, prop[p]);
  25110. return;
  25111. }
  25112. this[`_${prop}`] = value;
  25113. this._isValid = true;
  25114. this.doOnChange();
  25115. }
  25116. get(prop) {
  25117. if ([
  25118. "hue",
  25119. "saturation",
  25120. "value",
  25121. "alpha"
  25122. ].includes(prop)) return Math.round(this[`_${prop}`]);
  25123. return this[`_${prop}`];
  25124. }
  25125. toRgb() {
  25126. return this._isValid ? this._tiny.toRgb() : {
  25127. r: 255,
  25128. g: 255,
  25129. b: 255,
  25130. a: 0
  25131. };
  25132. }
  25133. fromString(value) {
  25134. const color = new TinyColor(value);
  25135. this._isValid = color.isValid;
  25136. if (color.isValid) {
  25137. const { h, s, v, a } = color.toHsv();
  25138. this._hue = h;
  25139. this._saturation = s * 100;
  25140. this._value = v * 100;
  25141. this._alpha = a * 100;
  25142. } else {
  25143. this._hue = 0;
  25144. this._saturation = 100;
  25145. this._value = 100;
  25146. this._alpha = 100;
  25147. }
  25148. this.doOnChange();
  25149. }
  25150. clear() {
  25151. this._isValid = false;
  25152. this.value = "";
  25153. this._hue = 0;
  25154. this._saturation = 100;
  25155. this._value = 100;
  25156. this._alpha = 100;
  25157. }
  25158. compare(color) {
  25159. const compareColor = new TinyColor({
  25160. h: color._hue,
  25161. s: color._saturation / 100,
  25162. v: color._value / 100,
  25163. a: color._alpha / 100
  25164. });
  25165. return this._tiny.equals(compareColor);
  25166. }
  25167. doOnChange() {
  25168. const { _hue, _saturation, _value, _alpha, format, enableAlpha } = this;
  25169. let _format = format || (enableAlpha ? "rgb" : "hex");
  25170. if (format === "hex" && enableAlpha) _format = "hex8";
  25171. this._tiny = new TinyColor({
  25172. h: _hue,
  25173. s: _saturation / 100,
  25174. v: _value / 100,
  25175. a: _alpha / 100
  25176. });
  25177. this.value = this._isValid ? this._tiny.toString(_format) : "";
  25178. }
  25179. };
  25180. //#endregion
  25181. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-predefine.mjs
  25182. var usePredefine = (props) => {
  25183. const { currentColor } = inject(colorPickerPanelContextKey);
  25184. const rgbaColors = ref(parseColors(props.colors, props.color));
  25185. watch(() => currentColor.value, (val) => {
  25186. const color = new Color({
  25187. value: val,
  25188. enableAlpha: props.enableAlpha
  25189. });
  25190. rgbaColors.value.forEach((item) => {
  25191. item.selected = color.compare(item);
  25192. });
  25193. });
  25194. watchEffect(() => {
  25195. rgbaColors.value = parseColors(props.colors, props.color);
  25196. });
  25197. function handleSelect(index) {
  25198. props.color.fromString(props.colors[index]);
  25199. }
  25200. function parseColors(colors, color) {
  25201. return colors.map((value) => {
  25202. const c = new Color({
  25203. value,
  25204. enableAlpha: props.enableAlpha
  25205. });
  25206. c.selected = c.compare(color);
  25207. return c;
  25208. });
  25209. }
  25210. return {
  25211. rgbaColors,
  25212. handleSelect
  25213. };
  25214. };
  25215. var usePredefineDOM = (props) => {
  25216. const ns = useNamespace("color-predefine");
  25217. const rootKls = computed(() => [ns.b(), ns.is("disabled", props.disabled)]);
  25218. const colorsKls = computed(() => ns.e("colors"));
  25219. function colorSelectorKls(item) {
  25220. return [
  25221. ns.e("color-selector"),
  25222. ns.is("alpha", item.get("alpha") < 100),
  25223. { selected: item.selected }
  25224. ];
  25225. }
  25226. return {
  25227. rootKls,
  25228. colorsKls,
  25229. colorSelectorKls
  25230. };
  25231. };
  25232. //#endregion
  25233. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.vue_vue_type_script_setup_true_lang.mjs
  25234. var _hoisted_1$53 = [
  25235. "disabled",
  25236. "aria-label",
  25237. "onClick"
  25238. ];
  25239. //#endregion
  25240. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.mjs
  25241. var predefine_default = /* @__PURE__ */ defineComponent({
  25242. name: "ElColorPredefine",
  25243. __name: "predefine",
  25244. props: predefineProps,
  25245. setup(__props) {
  25246. const props = __props;
  25247. const { rgbaColors, handleSelect } = usePredefine(props);
  25248. const { rootKls, colorsKls, colorSelectorKls } = usePredefineDOM(props);
  25249. const { t } = useLocale();
  25250. const ariaLabel = (value) => {
  25251. return t("el.colorpicker.predefineDescription", { value });
  25252. };
  25253. return (_ctx, _cache) => {
  25254. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", { class: normalizeClass(unref(colorsKls)) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rgbaColors), (item, index) => {
  25255. return openBlock(), createElementBlock("button", {
  25256. key: __props.colors[index],
  25257. type: "button",
  25258. disabled: __props.disabled,
  25259. "aria-label": ariaLabel(item.value),
  25260. class: normalizeClass(unref(colorSelectorKls)(item)),
  25261. onClick: ($event) => unref(handleSelect)(index)
  25262. }, [createBaseVNode("div", { style: normalizeStyle({ backgroundColor: item.value }) }, null, 4)], 10, _hoisted_1$53);
  25263. }), 128))], 2)], 2);
  25264. };
  25265. }
  25266. });
  25267. //#endregion
  25268. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/sv-panel.mjs
  25269. /**
  25270. * @deprecated Removed after 3.0.0, Use `SvPanelProps` instead.
  25271. */
  25272. var svPanelProps = buildProps({
  25273. color: {
  25274. type: definePropType(Object),
  25275. required: true
  25276. },
  25277. disabled: Boolean
  25278. });
  25279. //#endregion
  25280. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-sv-panel.mjs
  25281. var useSvPanel = (props) => {
  25282. const instance = getCurrentInstance();
  25283. const cursorRef = ref();
  25284. const cursorTop = ref(0);
  25285. const cursorLeft = ref(0);
  25286. const background = ref("hsl(0, 100%, 50%)");
  25287. const saturation = computed(() => props.color.get("saturation"));
  25288. const brightness = computed(() => props.color.get("value"));
  25289. const hue = computed(() => props.color.get("hue"));
  25290. function handleClick(event) {
  25291. if (props.disabled) return;
  25292. if (event.target !== cursorRef.value) handleDrag(event);
  25293. cursorRef.value?.focus({ preventScroll: true });
  25294. }
  25295. function handleDrag(event) {
  25296. if (props.disabled) return;
  25297. const rect = instance.vnode.el.getBoundingClientRect();
  25298. const { clientX, clientY } = getClientXY(event);
  25299. let left = clientX - rect.left;
  25300. let top = clientY - rect.top;
  25301. left = Math.max(0, left);
  25302. left = Math.min(left, rect.width);
  25303. top = Math.max(0, top);
  25304. top = Math.min(top, rect.height);
  25305. cursorLeft.value = left;
  25306. cursorTop.value = top;
  25307. props.color.set({
  25308. saturation: left / rect.width * 100,
  25309. value: 100 - top / rect.height * 100
  25310. });
  25311. }
  25312. function handleKeydown(event) {
  25313. if (props.disabled) return;
  25314. const { shiftKey } = event;
  25315. const code = getEventCode(event);
  25316. const step = shiftKey ? 10 : 1;
  25317. let isPreventDefault = true;
  25318. switch (code) {
  25319. case EVENT_CODE.left:
  25320. incrementSaturation(-step);
  25321. break;
  25322. case EVENT_CODE.right:
  25323. incrementSaturation(step);
  25324. break;
  25325. case EVENT_CODE.up:
  25326. incrementBrightness(step);
  25327. break;
  25328. case EVENT_CODE.down:
  25329. incrementBrightness(-step);
  25330. break;
  25331. default:
  25332. isPreventDefault = false;
  25333. break;
  25334. }
  25335. isPreventDefault && event.preventDefault();
  25336. }
  25337. function incrementSaturation(step) {
  25338. let next = saturation.value + step;
  25339. next = next < 0 ? 0 : next > 100 ? 100 : next;
  25340. props.color.set("saturation", next);
  25341. }
  25342. function incrementBrightness(step) {
  25343. let next = brightness.value + step;
  25344. next = next < 0 ? 0 : next > 100 ? 100 : next;
  25345. props.color.set("value", next);
  25346. }
  25347. return {
  25348. cursorRef,
  25349. cursorTop,
  25350. cursorLeft,
  25351. background,
  25352. saturation,
  25353. brightness,
  25354. hue,
  25355. handleClick,
  25356. handleDrag,
  25357. handleKeydown
  25358. };
  25359. };
  25360. var useSvPanelDOM = (props, { cursorTop, cursorLeft, background, handleDrag }) => {
  25361. const instance = getCurrentInstance();
  25362. const ns = useNamespace("color-svpanel");
  25363. function update() {
  25364. const saturation = props.color.get("saturation");
  25365. const brightness = props.color.get("value");
  25366. const { clientWidth: width, clientHeight: height } = instance.vnode.el;
  25367. cursorLeft.value = saturation * width / 100;
  25368. cursorTop.value = (100 - brightness) * height / 100;
  25369. background.value = `hsl(${props.color.get("hue")}, 100%, 50%)`;
  25370. }
  25371. onMounted(() => {
  25372. draggable(instance.vnode.el, {
  25373. drag: (event) => {
  25374. handleDrag(event);
  25375. },
  25376. end: (event) => {
  25377. handleDrag(event);
  25378. }
  25379. });
  25380. update();
  25381. });
  25382. watch([
  25383. () => props.color.get("hue"),
  25384. () => props.color.get("value"),
  25385. () => props.color.value
  25386. ], () => update());
  25387. return {
  25388. rootKls: computed(() => ns.b()),
  25389. cursorKls: computed(() => ns.e("cursor")),
  25390. rootStyle: computed(() => ({ backgroundColor: background.value })),
  25391. cursorStyle: computed(() => ({
  25392. top: addUnit(cursorTop.value),
  25393. left: addUnit(cursorLeft.value)
  25394. })),
  25395. update
  25396. };
  25397. };
  25398. //#endregion
  25399. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.vue_vue_type_script_setup_true_lang.mjs
  25400. var _hoisted_1$52 = [
  25401. "tabindex",
  25402. "aria-disabled",
  25403. "aria-label",
  25404. "aria-valuenow",
  25405. "aria-valuetext"
  25406. ];
  25407. //#endregion
  25408. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.mjs
  25409. var sv_panel_default = /* @__PURE__ */ defineComponent({
  25410. name: "ElSvPanel",
  25411. __name: "sv-panel",
  25412. props: svPanelProps,
  25413. setup(__props, { expose: __expose }) {
  25414. const props = __props;
  25415. const { cursorRef, cursorTop, cursorLeft, background, saturation, brightness, handleClick, handleDrag, handleKeydown } = useSvPanel(props);
  25416. const { rootKls, cursorKls, rootStyle, cursorStyle, update } = useSvPanelDOM(props, {
  25417. cursorTop,
  25418. cursorLeft,
  25419. background,
  25420. handleDrag
  25421. });
  25422. const { t } = useLocale();
  25423. const ariaLabel = computed(() => t("el.colorpicker.svLabel"));
  25424. const ariaValuetext = computed(() => {
  25425. return t("el.colorpicker.svDescription", {
  25426. saturation: saturation.value,
  25427. brightness: brightness.value,
  25428. color: props.color.value
  25429. });
  25430. });
  25431. __expose({ update });
  25432. return (_ctx, _cache) => {
  25433. return openBlock(), createElementBlock("div", {
  25434. class: normalizeClass(unref(rootKls)),
  25435. style: normalizeStyle(unref(rootStyle)),
  25436. onClick: _cache[1] || (_cache[1] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  25437. }, [createBaseVNode("div", {
  25438. ref_key: "cursorRef",
  25439. ref: cursorRef,
  25440. class: normalizeClass(unref(cursorKls)),
  25441. style: normalizeStyle(unref(cursorStyle)),
  25442. tabindex: __props.disabled ? void 0 : 0,
  25443. "aria-disabled": __props.disabled,
  25444. role: "slider",
  25445. "aria-valuemin": "0,0",
  25446. "aria-valuemax": "100,100",
  25447. "aria-label": ariaLabel.value,
  25448. "aria-valuenow": `${unref(saturation)},${unref(brightness)}`,
  25449. "aria-valuetext": ariaValuetext.value,
  25450. onKeydown: _cache[0] || (_cache[0] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  25451. }, null, 46, _hoisted_1$52)], 6);
  25452. };
  25453. }
  25454. });
  25455. //#endregion
  25456. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-common-color.mjs
  25457. var useCommonColor = (props, emit) => {
  25458. const color = reactive(new Color({
  25459. enableAlpha: props.showAlpha,
  25460. format: props.colorFormat || "",
  25461. value: props.modelValue
  25462. }));
  25463. watch(() => [props.colorFormat, props.showAlpha], () => {
  25464. color.enableAlpha = props.showAlpha;
  25465. color.format = props.colorFormat || color.format;
  25466. color.doOnChange();
  25467. emit(UPDATE_MODEL_EVENT, color.value);
  25468. });
  25469. return { color };
  25470. };
  25471. //#endregion
  25472. //#region node_modules/element-plus/es/components/color-picker-panel/index.mjs
  25473. var ElColorPickerPanel = withInstall(/* @__PURE__ */ defineComponent({
  25474. name: "ElColorPickerPanel",
  25475. __name: "color-picker-panel",
  25476. props: colorPickerPanelProps,
  25477. emits: colorPickerPanelEmits,
  25478. setup(__props, { expose: __expose, emit: __emit }) {
  25479. const props = __props;
  25480. const emit = __emit;
  25481. const ns = useNamespace("color-picker-panel");
  25482. const { formItem } = useFormItem();
  25483. const disabled = useFormDisabled();
  25484. const hueRef = ref();
  25485. const svRef = ref();
  25486. const alphaRef = ref();
  25487. const inputRef = ref();
  25488. const customInput = ref("");
  25489. const { color } = inject(ROOT_COMMON_COLOR_INJECTION_KEY, () => useCommonColor(props, emit), true);
  25490. function handleConfirm() {
  25491. color.fromString(customInput.value);
  25492. if (color.value !== customInput.value) customInput.value = color.value;
  25493. }
  25494. function handleFocusout() {
  25495. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  25496. }
  25497. function update() {
  25498. hueRef.value?.update();
  25499. svRef.value?.update();
  25500. alphaRef.value?.update();
  25501. }
  25502. onMounted(() => {
  25503. if (props.modelValue) customInput.value = color.value;
  25504. nextTick(update);
  25505. });
  25506. watch(() => props.modelValue, (newVal) => {
  25507. if (newVal !== color.value) newVal ? color.fromString(newVal) : color.clear();
  25508. });
  25509. watch(() => color.value, (val) => {
  25510. emit(UPDATE_MODEL_EVENT, val);
  25511. customInput.value = val;
  25512. if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
  25513. });
  25514. provide(colorPickerPanelContextKey, { currentColor: computed(() => color.value) });
  25515. __expose({
  25516. color,
  25517. inputRef,
  25518. update
  25519. });
  25520. return (_ctx, _cache) => {
  25521. return openBlock(), createElementBlock("div", {
  25522. class: normalizeClass([
  25523. unref(ns).b(),
  25524. unref(ns).is("disabled", unref(disabled)),
  25525. unref(ns).is("border", __props.border)
  25526. ]),
  25527. onFocusout: handleFocusout
  25528. }, [
  25529. createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [createVNode(hue_slider_default, {
  25530. ref_key: "hueRef",
  25531. ref: hueRef,
  25532. class: "hue-slider",
  25533. color: unref(color),
  25534. vertical: "",
  25535. disabled: unref(disabled)
  25536. }, null, 8, ["color", "disabled"]), createVNode(sv_panel_default, {
  25537. ref_key: "svRef",
  25538. ref: svRef,
  25539. color: unref(color),
  25540. disabled: unref(disabled)
  25541. }, null, 8, ["color", "disabled"])], 2),
  25542. __props.showAlpha ? (openBlock(), createBlock(alpha_slider_default, {
  25543. key: 0,
  25544. ref_key: "alphaRef",
  25545. ref: alphaRef,
  25546. color: unref(color),
  25547. disabled: unref(disabled)
  25548. }, null, 8, ["color", "disabled"])) : createCommentVNode("v-if", true),
  25549. __props.predefine ? (openBlock(), createBlock(predefine_default, {
  25550. key: 1,
  25551. ref: "predefine",
  25552. "enable-alpha": __props.showAlpha,
  25553. color: unref(color),
  25554. colors: __props.predefine,
  25555. disabled: unref(disabled)
  25556. }, null, 8, [
  25557. "enable-alpha",
  25558. "color",
  25559. "colors",
  25560. "disabled"
  25561. ])) : createCommentVNode("v-if", true),
  25562. createBaseVNode("div", { class: normalizeClass(unref(ns).e("footer")) }, [createVNode(unref(ElInput), {
  25563. ref_key: "inputRef",
  25564. ref: inputRef,
  25565. modelValue: customInput.value,
  25566. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
  25567. "validate-event": false,
  25568. size: "small",
  25569. disabled: unref(disabled),
  25570. onChange: handleConfirm
  25571. }, null, 8, ["modelValue", "disabled"]), renderSlot(_ctx.$slots, "footer")], 2)
  25572. ], 34);
  25573. };
  25574. }
  25575. }));
  25576. //#endregion
  25577. //#region node_modules/element-plus/es/components/color-picker/src/color-picker.mjs
  25578. /**
  25579. * @deprecated Removed after 3.0.0, Use `ColorPickerProps` instead.
  25580. */
  25581. var colorPickerProps = buildProps({
  25582. persistent: {
  25583. type: Boolean,
  25584. default: true
  25585. },
  25586. modelValue: {
  25587. type: definePropType(String),
  25588. default: void 0
  25589. },
  25590. id: String,
  25591. showAlpha: Boolean,
  25592. colorFormat: { type: definePropType(String) },
  25593. disabled: {
  25594. type: Boolean,
  25595. default: void 0
  25596. },
  25597. clearable: {
  25598. type: Boolean,
  25599. default: true
  25600. },
  25601. size: useSizeProp,
  25602. popperClass: useTooltipContentProps.popperClass,
  25603. popperStyle: useTooltipContentProps.popperStyle,
  25604. tabindex: {
  25605. type: [String, Number],
  25606. default: 0
  25607. },
  25608. teleported: useTooltipContentProps.teleported,
  25609. appendTo: useTooltipContentProps.appendTo,
  25610. predefine: { type: definePropType(Array) },
  25611. validateEvent: {
  25612. type: Boolean,
  25613. default: true
  25614. },
  25615. ...useEmptyValuesProps,
  25616. ...useAriaProps(["ariaLabel"])
  25617. });
  25618. var colorPickerEmits = {
  25619. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
  25620. [CHANGE_EVENT]: (val) => isString(val) || isNil(val),
  25621. activeChange: (val) => isString(val) || isNil(val),
  25622. focus: (evt) => evt instanceof FocusEvent,
  25623. blur: (evt) => evt instanceof FocusEvent,
  25624. clear: () => true
  25625. };
  25626. /**
  25627. * @description default values for ColorPickerProps, used in components that extend ColorPickerProps
  25628. */
  25629. var colorPickerPropsDefaults = {
  25630. persistent: true,
  25631. modelValue: void 0,
  25632. disabled: void 0,
  25633. clearable: true,
  25634. popperStyle: void 0,
  25635. tabindex: 0,
  25636. teleported: true,
  25637. validateEvent: true,
  25638. valueOnClear: void 0
  25639. };
  25640. //#endregion
  25641. //#region node_modules/element-plus/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs
  25642. var _hoisted_1$51 = [
  25643. "id",
  25644. "aria-label",
  25645. "aria-labelledby",
  25646. "aria-description",
  25647. "aria-disabled",
  25648. "tabindex"
  25649. ];
  25650. //#endregion
  25651. //#region node_modules/element-plus/es/components/color-picker/index.mjs
  25652. var ElColorPicker = withInstall(/* @__PURE__ */ defineComponent({
  25653. name: "ElColorPicker",
  25654. __name: "color-picker",
  25655. props: colorPickerProps,
  25656. emits: colorPickerEmits,
  25657. setup(__props, { expose: __expose, emit: __emit }) {
  25658. const props = __props;
  25659. const emit = __emit;
  25660. const { t } = useLocale();
  25661. const ns = useNamespace("color");
  25662. const { formItem } = useFormItem();
  25663. const colorSize = useFormSize();
  25664. const colorDisabled = useFormDisabled();
  25665. const { valueOnClear, isEmptyValue } = useEmptyValues(props, null);
  25666. const commonColor = useCommonColor(props, emit);
  25667. const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  25668. const popper = ref();
  25669. const triggerRef = ref();
  25670. const pickerPanelRef = ref();
  25671. const showPicker = ref(false);
  25672. const showPanelColor = ref(false);
  25673. let shouldActiveChange = true;
  25674. const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {
  25675. disabled: colorDisabled,
  25676. beforeBlur(event) {
  25677. return popper.value?.isFocusInsideContent(event);
  25678. },
  25679. afterBlur() {
  25680. setShowPicker(false);
  25681. resetColor();
  25682. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  25683. }
  25684. });
  25685. const color = reactiveComputed(() => pickerPanelRef.value?.color ?? commonColor.color);
  25686. const panelProps = computed(() => pick(props, Object.keys(colorPickerPanelProps)));
  25687. const displayedColor = computed(() => {
  25688. if (!props.modelValue && !showPanelColor.value) return "transparent";
  25689. return displayedRgb(color, props.showAlpha);
  25690. });
  25691. const currentColor = computed(() => {
  25692. return !props.modelValue && !showPanelColor.value ? "" : color.value;
  25693. });
  25694. const buttonAriaLabel = computed(() => {
  25695. return !isLabeledByFormItem.value ? props.ariaLabel || t("el.colorpicker.defaultLabel") : void 0;
  25696. });
  25697. const buttonAriaLabelledby = computed(() => {
  25698. return isLabeledByFormItem.value ? formItem?.labelId : void 0;
  25699. });
  25700. const btnKls = computed(() => {
  25701. return [
  25702. ns.b("picker"),
  25703. ns.is("disabled", colorDisabled.value),
  25704. ns.bm("picker", colorSize.value),
  25705. ns.is("focused", isFocused.value)
  25706. ];
  25707. });
  25708. function displayedRgb(color, showAlpha) {
  25709. const { r, g, b, a } = color.toRgb();
  25710. return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
  25711. }
  25712. function setShowPicker(value) {
  25713. showPicker.value = value;
  25714. }
  25715. const debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true });
  25716. function show() {
  25717. if (colorDisabled.value) return;
  25718. setShowPicker(true);
  25719. }
  25720. function hide() {
  25721. debounceSetShowPicker(false);
  25722. resetColor();
  25723. }
  25724. function resetColor() {
  25725. nextTick(() => {
  25726. if (props.modelValue) color.fromString(props.modelValue);
  25727. else {
  25728. color.value = "";
  25729. nextTick(() => {
  25730. showPanelColor.value = false;
  25731. });
  25732. }
  25733. });
  25734. }
  25735. function handleTrigger() {
  25736. if (colorDisabled.value) return;
  25737. if (showPicker.value) resetColor();
  25738. debounceSetShowPicker(!showPicker.value);
  25739. }
  25740. function confirmValue() {
  25741. const value = isEmptyValue(color.value) ? valueOnClear.value : color.value;
  25742. emit(UPDATE_MODEL_EVENT, value);
  25743. emit(CHANGE_EVENT, value);
  25744. if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
  25745. debounceSetShowPicker(false);
  25746. nextTick(() => {
  25747. const newColor = new Color({
  25748. enableAlpha: props.showAlpha,
  25749. format: props.colorFormat || "",
  25750. value: props.modelValue
  25751. });
  25752. if (!color.compare(newColor)) resetColor();
  25753. });
  25754. }
  25755. function clear() {
  25756. debounceSetShowPicker(false);
  25757. emit(UPDATE_MODEL_EVENT, valueOnClear.value);
  25758. emit(CHANGE_EVENT, valueOnClear.value);
  25759. if (props.modelValue !== valueOnClear.value && props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
  25760. resetColor();
  25761. emit("clear");
  25762. }
  25763. function handleShowTooltip() {
  25764. pickerPanelRef?.value?.inputRef?.focus();
  25765. }
  25766. function handleClickOutside() {
  25767. if (!showPicker.value) return;
  25768. hide();
  25769. isFocused.value && focus();
  25770. }
  25771. function handleEsc(event) {
  25772. event.preventDefault();
  25773. event.stopPropagation();
  25774. setShowPicker(false);
  25775. resetColor();
  25776. }
  25777. function handleKeyDown(event) {
  25778. switch (getEventCode(event)) {
  25779. case EVENT_CODE.enter:
  25780. case EVENT_CODE.numpadEnter:
  25781. case EVENT_CODE.space:
  25782. event.preventDefault();
  25783. event.stopPropagation();
  25784. show();
  25785. break;
  25786. case EVENT_CODE.esc:
  25787. handleEsc(event);
  25788. break;
  25789. }
  25790. }
  25791. function focus() {
  25792. triggerRef.value.focus();
  25793. }
  25794. function blur() {
  25795. triggerRef.value.blur();
  25796. }
  25797. watch(() => currentColor.value, (val) => {
  25798. shouldActiveChange && emit("activeChange", val);
  25799. shouldActiveChange = true;
  25800. });
  25801. watch(() => color.value, () => {
  25802. if (!props.modelValue && !showPanelColor.value) showPanelColor.value = true;
  25803. });
  25804. watch(() => props.modelValue, (newVal) => {
  25805. if (!newVal) showPanelColor.value = false;
  25806. else if (newVal && newVal !== color.value) {
  25807. shouldActiveChange = false;
  25808. color.fromString(newVal);
  25809. }
  25810. });
  25811. watch(() => showPicker.value, () => {
  25812. pickerPanelRef.value && nextTick(pickerPanelRef.value.update);
  25813. });
  25814. provide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor);
  25815. __expose({
  25816. color,
  25817. show,
  25818. hide,
  25819. focus,
  25820. blur
  25821. });
  25822. return (_ctx, _cache) => {
  25823. return openBlock(), createBlock(unref(ElTooltip), {
  25824. ref_key: "popper",
  25825. ref: popper,
  25826. visible: showPicker.value,
  25827. "show-arrow": false,
  25828. "fallback-placements": [
  25829. "bottom",
  25830. "top",
  25831. "right",
  25832. "left"
  25833. ],
  25834. offset: 0,
  25835. "gpu-acceleration": false,
  25836. "popper-class": [unref(ns).be("picker", "panel"), __props.popperClass],
  25837. "popper-style": __props.popperStyle,
  25838. "stop-popper-mouse-event": false,
  25839. pure: "",
  25840. loop: "",
  25841. role: "dialog",
  25842. effect: "light",
  25843. trigger: "click",
  25844. teleported: __props.teleported,
  25845. transition: `${unref(ns).namespace.value}-zoom-in-top`,
  25846. persistent: __props.persistent,
  25847. "append-to": __props.appendTo,
  25848. onShow: handleShowTooltip,
  25849. onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false))
  25850. }, {
  25851. content: withCtx(() => [withDirectives((openBlock(), createBlock(unref(ElColorPickerPanel), mergeProps({
  25852. ref_key: "pickerPanelRef",
  25853. ref: pickerPanelRef
  25854. }, panelProps.value, {
  25855. border: false,
  25856. "validate-event": false,
  25857. onKeydown: withKeys(handleEsc, ["esc"])
  25858. }), {
  25859. footer: withCtx(() => [createBaseVNode("div", null, [__props.clearable ? (openBlock(), createBlock(unref(ElButton), {
  25860. key: 0,
  25861. class: normalizeClass(unref(ns).be("footer", "link-btn")),
  25862. text: "",
  25863. size: "small",
  25864. onClick: clear
  25865. }, {
  25866. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)]),
  25867. _: 1
  25868. }, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(unref(ElButton), {
  25869. plain: "",
  25870. size: "small",
  25871. class: normalizeClass(unref(ns).be("footer", "btn")),
  25872. onClick: confirmValue
  25873. }, {
  25874. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)]),
  25875. _: 1
  25876. }, 8, ["class"])])]),
  25877. _: 1
  25878. }, 16)), [[
  25879. unref(ClickOutside),
  25880. handleClickOutside,
  25881. triggerRef.value
  25882. ]])]),
  25883. default: withCtx(() => [createBaseVNode("div", mergeProps({
  25884. id: unref(buttonId),
  25885. ref_key: "triggerRef",
  25886. ref: triggerRef
  25887. }, _ctx.$attrs, {
  25888. class: btnKls.value,
  25889. role: "button",
  25890. "aria-label": buttonAriaLabel.value,
  25891. "aria-labelledby": buttonAriaLabelledby.value,
  25892. "aria-description": unref(t)("el.colorpicker.description", { color: __props.modelValue || "" }),
  25893. "aria-disabled": unref(colorDisabled),
  25894. tabindex: unref(colorDisabled) ? void 0 : __props.tabindex,
  25895. onKeydown: handleKeyDown,
  25896. onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  25897. onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args))
  25898. }), [createBaseVNode("div", {
  25899. class: normalizeClass(unref(ns).be("picker", "trigger")),
  25900. onClick: handleTrigger
  25901. }, [createBaseVNode("span", { class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", __props.showAlpha)]) }, [createBaseVNode("span", {
  25902. class: normalizeClass(unref(ns).be("picker", "color-inner")),
  25903. style: normalizeStyle({ backgroundColor: displayedColor.value })
  25904. }, [withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")]) }, {
  25905. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  25906. _: 1
  25907. }, 8, ["class"]), [[vShow, __props.modelValue || showPanelColor.value]]), withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")]) }, {
  25908. default: withCtx(() => [createVNode(unref(close_default))]),
  25909. _: 1
  25910. }, 8, ["class"]), [[vShow, !__props.modelValue && !showPanelColor.value]])], 6)], 2)], 2)], 16, _hoisted_1$51)]),
  25911. _: 1
  25912. }, 8, [
  25913. "visible",
  25914. "popper-class",
  25915. "popper-style",
  25916. "teleported",
  25917. "transition",
  25918. "persistent",
  25919. "append-to"
  25920. ]);
  25921. };
  25922. }
  25923. }));
  25924. //#endregion
  25925. //#region node_modules/element-plus/es/components/container/src/container.mjs
  25926. var container_default = /* @__PURE__ */ defineComponent({
  25927. name: "ElContainer",
  25928. __name: "container",
  25929. props: { direction: {
  25930. type: String,
  25931. required: false
  25932. } },
  25933. setup(__props) {
  25934. const props = __props;
  25935. const slots = useSlots();
  25936. const ns = useNamespace("container");
  25937. const isVertical = computed(() => {
  25938. if (props.direction === "vertical") return true;
  25939. else if (props.direction === "horizontal") return false;
  25940. if (slots && slots.default) return slots.default().some((vNode) => {
  25941. const tag = vNode.type.name;
  25942. return tag === "ElHeader" || tag === "ElFooter";
  25943. });
  25944. else return false;
  25945. });
  25946. return (_ctx, _cache) => {
  25947. return openBlock(), createElementBlock("section", { class: normalizeClass([unref(ns).b(), unref(ns).is("vertical", isVertical.value)]) }, [renderSlot(_ctx.$slots, "default")], 2);
  25948. };
  25949. }
  25950. });
  25951. //#endregion
  25952. //#region node_modules/element-plus/es/components/container/src/aside.mjs
  25953. var aside_default = /* @__PURE__ */ defineComponent({
  25954. name: "ElAside",
  25955. __name: "aside",
  25956. props: { width: {
  25957. type: [String, null],
  25958. required: false,
  25959. default: null
  25960. } },
  25961. setup(__props) {
  25962. const props = __props;
  25963. const ns = useNamespace("aside");
  25964. const style = computed(() => props.width ? ns.cssVarBlock({ width: props.width }) : {});
  25965. return (_ctx, _cache) => {
  25966. return openBlock(), createElementBlock("aside", {
  25967. class: normalizeClass(unref(ns).b()),
  25968. style: normalizeStyle(style.value)
  25969. }, [renderSlot(_ctx.$slots, "default")], 6);
  25970. };
  25971. }
  25972. });
  25973. //#endregion
  25974. //#region node_modules/element-plus/es/components/container/src/footer.mjs
  25975. var footer_default = /* @__PURE__ */ defineComponent({
  25976. name: "ElFooter",
  25977. __name: "footer",
  25978. props: { height: {
  25979. type: [String, null],
  25980. required: false,
  25981. default: null
  25982. } },
  25983. setup(__props) {
  25984. const props = __props;
  25985. const ns = useNamespace("footer");
  25986. const style = computed(() => props.height ? ns.cssVarBlock({ height: props.height }) : {});
  25987. return (_ctx, _cache) => {
  25988. return openBlock(), createElementBlock("footer", {
  25989. class: normalizeClass(unref(ns).b()),
  25990. style: normalizeStyle(style.value)
  25991. }, [renderSlot(_ctx.$slots, "default")], 6);
  25992. };
  25993. }
  25994. });
  25995. //#endregion
  25996. //#region node_modules/element-plus/es/components/container/src/header.mjs
  25997. var header_default = /* @__PURE__ */ defineComponent({
  25998. name: "ElHeader",
  25999. __name: "header",
  26000. props: { height: {
  26001. type: [String, null],
  26002. required: false,
  26003. default: null
  26004. } },
  26005. setup(__props) {
  26006. const props = __props;
  26007. const ns = useNamespace("header");
  26008. const style = computed(() => {
  26009. return props.height ? ns.cssVarBlock({ height: props.height }) : {};
  26010. });
  26011. return (_ctx, _cache) => {
  26012. return openBlock(), createElementBlock("header", {
  26013. class: normalizeClass(unref(ns).b()),
  26014. style: normalizeStyle(style.value)
  26015. }, [renderSlot(_ctx.$slots, "default")], 6);
  26016. };
  26017. }
  26018. });
  26019. //#endregion
  26020. //#region node_modules/element-plus/es/components/container/src/main.mjs
  26021. var main_default = /* @__PURE__ */ defineComponent({
  26022. name: "ElMain",
  26023. __name: "main",
  26024. setup(__props) {
  26025. const ns = useNamespace("main");
  26026. return (_ctx, _cache) => {
  26027. return openBlock(), createElementBlock("main", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default")], 2);
  26028. };
  26029. }
  26030. });
  26031. //#endregion
  26032. //#region node_modules/element-plus/es/components/container/index.mjs
  26033. var ElContainer = withInstall(container_default, {
  26034. Aside: aside_default,
  26035. Footer: footer_default,
  26036. Header: header_default,
  26037. Main: main_default
  26038. });
  26039. var ElAside = withNoopInstall(aside_default);
  26040. var ElFooter = withNoopInstall(footer_default);
  26041. var ElHeader = withNoopInstall(header_default);
  26042. var ElMain = withNoopInstall(main_default);
  26043. //#endregion
  26044. //#region node_modules/element-plus/es/components/countdown/src/countdown.mjs
  26045. /**
  26046. * @deprecated Removed after 3.0.0, Use `CountdownProps` instead.
  26047. */
  26048. var countdownProps = buildProps({
  26049. format: {
  26050. type: String,
  26051. default: "HH:mm:ss"
  26052. },
  26053. prefix: String,
  26054. suffix: String,
  26055. title: String,
  26056. value: {
  26057. type: definePropType([Number, Object]),
  26058. default: 0
  26059. },
  26060. valueStyle: { type: definePropType([
  26061. String,
  26062. Object,
  26063. Array
  26064. ]) }
  26065. });
  26066. var countdownEmits = {
  26067. finish: () => true,
  26068. [CHANGE_EVENT]: (value) => isNumber(value)
  26069. };
  26070. //#endregion
  26071. //#region node_modules/element-plus/es/components/statistic/src/statistic.mjs
  26072. /**
  26073. * @deprecated Removed after 3.0.0, Use `StatisticProps` instead.
  26074. */
  26075. var statisticProps = buildProps({
  26076. decimalSeparator: {
  26077. type: String,
  26078. default: "."
  26079. },
  26080. groupSeparator: {
  26081. type: String,
  26082. default: ","
  26083. },
  26084. precision: {
  26085. type: Number,
  26086. default: 0
  26087. },
  26088. formatter: Function,
  26089. value: {
  26090. type: definePropType([Number, Object]),
  26091. default: 0
  26092. },
  26093. prefix: String,
  26094. suffix: String,
  26095. title: String,
  26096. valueStyle: { type: definePropType([
  26097. String,
  26098. Object,
  26099. Array
  26100. ]) }
  26101. });
  26102. //#endregion
  26103. //#region node_modules/element-plus/es/components/statistic/index.mjs
  26104. var ElStatistic = withInstall(/* @__PURE__ */ defineComponent({
  26105. name: "ElStatistic",
  26106. __name: "statistic",
  26107. props: statisticProps,
  26108. setup(__props, { expose: __expose }) {
  26109. const props = __props;
  26110. const ns = useNamespace("statistic");
  26111. const displayValue = computed(() => {
  26112. const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
  26113. if (isFunction$1(formatter)) return formatter(value);
  26114. if (!isNumber(value) || Number.isNaN(value)) return value;
  26115. let [integer, decimal = ""] = String(value).split(".");
  26116. decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
  26117. integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
  26118. return [integer, decimal].join(decimal ? decimalSeparator : "");
  26119. });
  26120. __expose({ displayValue });
  26121. return (_ctx, _cache) => {
  26122. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [_ctx.$slots.title || __props.title ? (openBlock(), createElementBlock("div", {
  26123. key: 0,
  26124. class: normalizeClass(unref(ns).e("head"))
  26125. }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
  26126. _ctx.$slots.prefix || __props.prefix ? (openBlock(), createElementBlock("div", {
  26127. key: 0,
  26128. class: normalizeClass(unref(ns).e("prefix"))
  26129. }, [renderSlot(_ctx.$slots, "prefix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.prefix), 1)])], 2)) : createCommentVNode("v-if", true),
  26130. createBaseVNode("span", {
  26131. class: normalizeClass(unref(ns).e("number")),
  26132. style: normalizeStyle(__props.valueStyle)
  26133. }, toDisplayString(displayValue.value), 7),
  26134. _ctx.$slots.suffix || __props.suffix ? (openBlock(), createElementBlock("div", {
  26135. key: 1,
  26136. class: normalizeClass(unref(ns).e("suffix"))
  26137. }, [renderSlot(_ctx.$slots, "suffix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.suffix), 1)])], 2)) : createCommentVNode("v-if", true)
  26138. ], 2)], 2);
  26139. };
  26140. }
  26141. }));
  26142. //#endregion
  26143. //#region node_modules/element-plus/es/components/countdown/src/utils.mjs
  26144. var timeUnits$1 = [
  26145. ["Y", 1e3 * 60 * 60 * 24 * 365],
  26146. ["M", 1e3 * 60 * 60 * 24 * 30],
  26147. ["D", 1e3 * 60 * 60 * 24],
  26148. ["H", 1e3 * 60 * 60],
  26149. ["m", 1e3 * 60],
  26150. ["s", 1e3],
  26151. ["S", 1]
  26152. ];
  26153. var getTime = (value) => {
  26154. return isNumber(value) ? new Date(value).getTime() : value.valueOf();
  26155. };
  26156. var formatTime$1 = (timestamp, format) => {
  26157. let timeLeft = timestamp;
  26158. return timeUnits$1.reduce((current, [name, unit]) => {
  26159. const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g");
  26160. if (replaceRegex.test(current)) {
  26161. const value = Math.floor(timeLeft / unit);
  26162. timeLeft -= value * unit;
  26163. return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0"));
  26164. }
  26165. return current;
  26166. }, format).replace(/\[([^\]]*)]/g, "$1");
  26167. };
  26168. //#endregion
  26169. //#region node_modules/element-plus/es/components/countdown/index.mjs
  26170. var ElCountdown = withInstall(/* @__PURE__ */ defineComponent({
  26171. name: "ElCountdown",
  26172. __name: "countdown",
  26173. props: countdownProps,
  26174. emits: countdownEmits,
  26175. setup(__props, { expose: __expose, emit: __emit }) {
  26176. const props = __props;
  26177. const emit = __emit;
  26178. let timer;
  26179. const rawValue = ref(0);
  26180. const displayValue = computed(() => formatTime$1(rawValue.value, props.format));
  26181. const formatter = (val) => formatTime$1(val, props.format);
  26182. const stopTimer = () => {
  26183. if (timer) {
  26184. cAF(timer);
  26185. timer = void 0;
  26186. }
  26187. };
  26188. const startTimer = () => {
  26189. const timestamp = getTime(props.value);
  26190. const frameFunc = () => {
  26191. let diff = timestamp - Date.now();
  26192. emit(CHANGE_EVENT, diff);
  26193. if (diff <= 0) {
  26194. diff = 0;
  26195. stopTimer();
  26196. emit("finish");
  26197. } else timer = rAF(frameFunc);
  26198. rawValue.value = diff;
  26199. };
  26200. timer = rAF(frameFunc);
  26201. };
  26202. onMounted(() => {
  26203. rawValue.value = getTime(props.value) - Date.now();
  26204. watch(() => [props.value, props.format], () => {
  26205. stopTimer();
  26206. startTimer();
  26207. }, { immediate: true });
  26208. });
  26209. onBeforeUnmount(() => {
  26210. stopTimer();
  26211. });
  26212. __expose({ displayValue });
  26213. return (_ctx, _cache) => {
  26214. return openBlock(), createBlock(unref(ElStatistic), {
  26215. value: rawValue.value,
  26216. title: __props.title,
  26217. prefix: __props.prefix,
  26218. suffix: __props.suffix,
  26219. "value-style": __props.valueStyle,
  26220. formatter
  26221. }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  26222. return {
  26223. name,
  26224. fn: withCtx(() => [renderSlot(_ctx.$slots, name)])
  26225. };
  26226. })]), 1032, [
  26227. "value",
  26228. "title",
  26229. "prefix",
  26230. "suffix",
  26231. "value-style"
  26232. ]);
  26233. };
  26234. }
  26235. }));
  26236. //#endregion
  26237. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/date-picker-panel.mjs
  26238. var datePickerPanelProps = buildProps({
  26239. valueFormat: String,
  26240. dateFormat: String,
  26241. timeFormat: String,
  26242. disabled: {
  26243. type: Boolean,
  26244. default: void 0
  26245. },
  26246. modelValue: {
  26247. type: definePropType([
  26248. Date,
  26249. Array,
  26250. String,
  26251. Number
  26252. ]),
  26253. default: ""
  26254. },
  26255. defaultValue: { type: definePropType([Date, Array]) },
  26256. defaultTime: { type: definePropType([Date, Array]) },
  26257. isRange: Boolean,
  26258. ...disabledTimeListsProps,
  26259. disabledDate: { type: Function },
  26260. cellClassName: { type: Function },
  26261. shortcuts: {
  26262. type: Array,
  26263. default: () => []
  26264. },
  26265. arrowControl: Boolean,
  26266. unlinkPanels: Boolean,
  26267. showNow: {
  26268. type: Boolean,
  26269. default: true
  26270. },
  26271. showConfirm: Boolean,
  26272. showFooter: Boolean,
  26273. showWeekNumber: Boolean,
  26274. type: {
  26275. type: definePropType(String),
  26276. default: "date"
  26277. },
  26278. clearable: {
  26279. type: Boolean,
  26280. default: true
  26281. },
  26282. border: {
  26283. type: Boolean,
  26284. default: true
  26285. },
  26286. editable: {
  26287. type: Boolean,
  26288. default: true
  26289. }
  26290. });
  26291. //#endregion
  26292. //#region node_modules/element-plus/es/components/date-picker-panel/src/constants.mjs
  26293. var ROOT_PICKER_INJECTION_KEY = Symbol("rootPickerContextKey");
  26294. var ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY = "ElIsDefaultFormat";
  26295. //#endregion
  26296. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/shared.mjs
  26297. var selectionModes = [
  26298. "date",
  26299. "dates",
  26300. "year",
  26301. "years",
  26302. "month",
  26303. "months",
  26304. "week",
  26305. "range"
  26306. ];
  26307. var datePickerSharedProps = buildProps({
  26308. cellClassName: { type: definePropType(Function) },
  26309. disabledDate: { type: definePropType(Function) },
  26310. date: {
  26311. type: definePropType(Object),
  26312. required: true
  26313. },
  26314. minDate: { type: definePropType(Object) },
  26315. maxDate: { type: definePropType(Object) },
  26316. parsedValue: { type: definePropType([Object, Array]) },
  26317. rangeState: {
  26318. type: definePropType(Object),
  26319. default: () => ({
  26320. endDate: null,
  26321. selecting: false
  26322. })
  26323. },
  26324. disabled: Boolean
  26325. });
  26326. var panelSharedProps = buildProps({
  26327. type: {
  26328. type: definePropType(String),
  26329. required: true,
  26330. values: datePickTypes
  26331. },
  26332. dateFormat: String,
  26333. timeFormat: String,
  26334. showNow: {
  26335. type: Boolean,
  26336. default: true
  26337. },
  26338. showConfirm: Boolean,
  26339. showFooter: {
  26340. type: Boolean,
  26341. default: true
  26342. },
  26343. showWeekNumber: Boolean,
  26344. border: Boolean,
  26345. disabled: Boolean,
  26346. editable: {
  26347. type: Boolean,
  26348. default: true
  26349. }
  26350. });
  26351. var panelRangeSharedProps = buildProps({
  26352. unlinkPanels: Boolean,
  26353. visible: {
  26354. type: Boolean,
  26355. default: true
  26356. },
  26357. showConfirm: Boolean,
  26358. showFooter: {
  26359. type: Boolean,
  26360. default: true
  26361. },
  26362. border: Boolean,
  26363. disabled: Boolean,
  26364. parsedValue: { type: definePropType(Array) }
  26365. });
  26366. var selectionModeWithDefault = (mode) => {
  26367. return {
  26368. type: String,
  26369. values: selectionModes,
  26370. default: mode
  26371. };
  26372. };
  26373. //#endregion
  26374. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-pick.mjs
  26375. var panelDatePickProps = buildProps({
  26376. ...panelSharedProps,
  26377. parsedValue: { type: definePropType([Object, Array]) },
  26378. visible: {
  26379. type: Boolean,
  26380. default: true
  26381. },
  26382. format: {
  26383. type: String,
  26384. default: ""
  26385. }
  26386. });
  26387. //#endregion
  26388. //#region node_modules/element-plus/es/components/date-picker-panel/src/utils.mjs
  26389. var isValidRange = (range) => {
  26390. if (!isArray$1(range)) return false;
  26391. const [left, right] = range;
  26392. return import_dayjs_min.default.isDayjs(left) && import_dayjs_min.default.isDayjs(right) && (0, import_dayjs_min.default)(left).isValid() && (0, import_dayjs_min.default)(right).isValid() && left.isSameOrBefore(right);
  26393. };
  26394. var getDefaultValue = (defaultValue, { lang, step = 1, unit, unlinkPanels }) => {
  26395. let start;
  26396. if (isArray$1(defaultValue)) {
  26397. let [left, right] = defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang));
  26398. if (!unlinkPanels) right = left.add(step, unit);
  26399. return [left, right];
  26400. } else if (defaultValue) start = (0, import_dayjs_min.default)(defaultValue);
  26401. else start = (0, import_dayjs_min.default)();
  26402. start = start.locale(lang);
  26403. return [start, start.add(step, unit)];
  26404. };
  26405. var buildPickerTable = (dimension, rows, { columnIndexOffset, startDate, nextEndDate, now, unit, relativeDateGetter, setCellMetadata, setRowMetadata }) => {
  26406. for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {
  26407. const row = rows[rowIndex];
  26408. for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {
  26409. let cell = row[columnIndex + columnIndexOffset];
  26410. if (!cell) cell = {
  26411. row: rowIndex,
  26412. column: columnIndex,
  26413. type: "normal",
  26414. inRange: false,
  26415. start: false,
  26416. end: false
  26417. };
  26418. const nextStartDate = relativeDateGetter(rowIndex * dimension.column + columnIndex);
  26419. cell.dayjs = nextStartDate;
  26420. cell.date = nextStartDate.toDate();
  26421. cell.timestamp = nextStartDate.valueOf();
  26422. cell.type = "normal";
  26423. cell.inRange = !!(startDate && nextStartDate.isSameOrAfter(startDate, unit) && nextEndDate && nextStartDate.isSameOrBefore(nextEndDate, unit)) || !!(startDate && nextStartDate.isSameOrBefore(startDate, unit) && nextEndDate && nextStartDate.isSameOrAfter(nextEndDate, unit));
  26424. if (startDate?.isSameOrAfter(nextEndDate)) {
  26425. cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
  26426. cell.end = startDate && nextStartDate.isSame(startDate, unit);
  26427. } else {
  26428. cell.start = !!startDate && nextStartDate.isSame(startDate, unit);
  26429. cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
  26430. }
  26431. if (nextStartDate.isSame(now, unit)) cell.type = "today";
  26432. setCellMetadata?.(cell, {
  26433. rowIndex,
  26434. columnIndex
  26435. });
  26436. row[columnIndex + columnIndexOffset] = cell;
  26437. }
  26438. setRowMetadata?.(row);
  26439. }
  26440. };
  26441. var datesInMonth = (date, year, month, lang) => {
  26442. const firstDay = (0, import_dayjs_min.default)().locale(lang).startOf("month").month(month).year(year).hour(date.hour()).minute(date.minute()).second(date.second());
  26443. return rangeArr(firstDay.daysInMonth()).map((n) => firstDay.add(n, "day").toDate());
  26444. };
  26445. var getValidDateOfMonth = (date, year, month, lang, disabledDate) => {
  26446. const _value = (0, import_dayjs_min.default)().year(year).month(month).startOf("month").hour(date.hour()).minute(date.minute()).second(date.second());
  26447. const _date = datesInMonth(date, year, month, lang).find((date) => {
  26448. return !disabledDate?.(date);
  26449. });
  26450. if (_date) return (0, import_dayjs_min.default)(_date).locale(lang);
  26451. return _value.locale(lang);
  26452. };
  26453. var getValidDateOfYear = (value, lang, disabledDate) => {
  26454. const year = value.year();
  26455. if (!disabledDate?.(value.toDate())) return value.locale(lang);
  26456. const month = value.month();
  26457. if (!datesInMonth(value, year, month, lang).every(disabledDate)) return getValidDateOfMonth(value, year, month, lang, disabledDate);
  26458. for (let i = 0; i < 12; i++) if (!datesInMonth(value, year, i, lang).every(disabledDate)) return getValidDateOfMonth(value, year, i, lang, disabledDate);
  26459. return value;
  26460. };
  26461. var correctlyParseUserInput = (value, format, lang, defaultFormat) => {
  26462. if (isArray$1(value)) return value.map((v) => correctlyParseUserInput(v, format, lang, defaultFormat));
  26463. if (isString(value)) {
  26464. const dayjsValue = defaultFormat?.value ? (0, import_dayjs_min.default)(value) : (0, import_dayjs_min.default)(value, format);
  26465. if (!dayjsValue.isValid()) return dayjsValue;
  26466. }
  26467. return (0, import_dayjs_min.default)(value, format).locale(lang);
  26468. };
  26469. //#endregion
  26470. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-date-table.mjs
  26471. var basicDateTableProps = buildProps({
  26472. ...datePickerSharedProps,
  26473. showWeekNumber: Boolean,
  26474. selectionMode: selectionModeWithDefault("date")
  26475. });
  26476. var basicDateTableEmits = [
  26477. "changerange",
  26478. "pick",
  26479. "select"
  26480. ];
  26481. //#endregion
  26482. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs
  26483. var isNormalDay = (type = "") => {
  26484. return ["normal", "today"].includes(type);
  26485. };
  26486. var useBasicDateTable = (props, emit) => {
  26487. const { lang } = useLocale();
  26488. const tbodyRef = ref();
  26489. const currentCellRef = ref();
  26490. const lastRow = ref();
  26491. const lastColumn = ref();
  26492. const tableRows = ref([
  26493. [],
  26494. [],
  26495. [],
  26496. [],
  26497. [],
  26498. []
  26499. ]);
  26500. let focusWithClick = false;
  26501. const firstDayOfWeek = props.date.$locale().weekStart || 7;
  26502. const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_) => _.toLowerCase());
  26503. const offsetDay = computed(() => {
  26504. return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;
  26505. });
  26506. const startDate = computed(() => {
  26507. const startDayOfMonth = props.date.startOf("month");
  26508. return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day");
  26509. });
  26510. const WEEKS = computed(() => {
  26511. return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);
  26512. });
  26513. const hasCurrent = computed(() => {
  26514. return flatten(unref(rows)).some((row) => {
  26515. return row.isCurrent;
  26516. });
  26517. });
  26518. const days = computed(() => {
  26519. const startOfMonth = props.date.startOf("month");
  26520. return {
  26521. startOfMonthDay: startOfMonth.day() || 7,
  26522. dateCountOfMonth: startOfMonth.daysInMonth(),
  26523. dateCountOfLastMonth: startOfMonth.subtract(1, "month").daysInMonth()
  26524. };
  26525. });
  26526. const selectedDate = computed(() => {
  26527. return props.selectionMode === "dates" ? castArray(props.parsedValue) : [];
  26528. });
  26529. const setDateText = (cell, { count, rowIndex, columnIndex }) => {
  26530. const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days);
  26531. const offset = unref(offsetDay);
  26532. if (rowIndex >= 0 && rowIndex <= 1) {
  26533. const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
  26534. if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {
  26535. cell.text = count;
  26536. return true;
  26537. } else {
  26538. cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7;
  26539. cell.type = "prev-month";
  26540. }
  26541. } else {
  26542. if (count <= dateCountOfMonth) cell.text = count;
  26543. else {
  26544. cell.text = count - dateCountOfMonth;
  26545. cell.type = "next-month";
  26546. }
  26547. return true;
  26548. }
  26549. return false;
  26550. };
  26551. const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => {
  26552. const { disabledDate, cellClassName } = props;
  26553. const _selectedDate = unref(selectedDate);
  26554. const shouldIncrement = setDateText(cell, {
  26555. count,
  26556. rowIndex,
  26557. columnIndex
  26558. });
  26559. const cellDate = cell.dayjs.toDate();
  26560. cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, "day"));
  26561. cell.isSelected = !!cell.selected;
  26562. cell.isCurrent = isCurrent(cell);
  26563. cell.disabled = disabledDate?.(cellDate);
  26564. cell.customClass = cellClassName?.(cellDate);
  26565. return shouldIncrement;
  26566. };
  26567. const setRowMetadata = (row) => {
  26568. if (props.selectionMode === "week") {
  26569. const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6];
  26570. const isActive = isWeekActive(row[start + 1]);
  26571. row[start].inRange = isActive;
  26572. row[start].start = isActive;
  26573. row[end].inRange = isActive;
  26574. row[end].end = isActive;
  26575. }
  26576. };
  26577. const rows = computed(() => {
  26578. const { minDate, maxDate, rangeState, showWeekNumber } = props;
  26579. const offset = unref(offsetDay);
  26580. const rows_ = unref(tableRows);
  26581. const dateUnit = "day";
  26582. let count = 1;
  26583. buildPickerTable({
  26584. row: 6,
  26585. column: 7
  26586. }, rows_, {
  26587. startDate: minDate,
  26588. columnIndexOffset: showWeekNumber ? 1 : 0,
  26589. nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null,
  26590. now: (0, import_dayjs_min.default)().locale(unref(lang)).startOf(dateUnit),
  26591. unit: dateUnit,
  26592. relativeDateGetter: (idx) => unref(startDate).add(idx - offset, dateUnit),
  26593. setCellMetadata: (...args) => {
  26594. if (setCellMetadata(...args, count)) count += 1;
  26595. },
  26596. setRowMetadata
  26597. });
  26598. if (showWeekNumber) {
  26599. for (let rowIndex = 0; rowIndex < 6; rowIndex++) if (rows_[rowIndex][1].dayjs) rows_[rowIndex][0] = {
  26600. type: "week",
  26601. text: rows_[rowIndex][1].dayjs.week()
  26602. };
  26603. }
  26604. return rows_;
  26605. });
  26606. watch(() => props.date, async () => {
  26607. if (unref(tbodyRef)?.contains(document.activeElement)) {
  26608. await nextTick();
  26609. await focus();
  26610. }
  26611. });
  26612. const focus = async () => unref(currentCellRef)?.focus();
  26613. const isCurrent = (cell) => {
  26614. return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue);
  26615. };
  26616. const cellMatchesDate = (cell, date) => {
  26617. if (!date) return false;
  26618. return (0, import_dayjs_min.default)(date).locale(unref(lang)).isSame(props.date.date(Number(cell.text)), "day");
  26619. };
  26620. const getDateOfCell = (row, column) => {
  26621. const startOfMonthDay = unref(days).startOfMonthDay;
  26622. const offset = unref(offsetDay);
  26623. const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
  26624. const offsetFromStart = row * 7 + (column - (props.showWeekNumber ? 1 : 0));
  26625. return props.date.startOf("month").subtract(numberOfDaysFromPreviousMonth, "day").add(offsetFromStart, "day");
  26626. };
  26627. const handleMouseMove = (event) => {
  26628. if (!props.rangeState.selecting) return;
  26629. let target = event.target;
  26630. if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
  26631. if (target.tagName === "DIV") target = target.parentNode;
  26632. if (target.tagName !== "TD") return;
  26633. const row = target.parentNode.rowIndex - 1;
  26634. const column = target.cellIndex;
  26635. if (unref(rows)[row][column].disabled) return;
  26636. if (row !== unref(lastRow) || column !== unref(lastColumn)) {
  26637. lastRow.value = row;
  26638. lastColumn.value = column;
  26639. emit("changerange", {
  26640. selecting: true,
  26641. endDate: getDateOfCell(row, column)
  26642. });
  26643. }
  26644. };
  26645. const isSelectedCell = (cell) => {
  26646. return !unref(hasCurrent) && cell?.text === 1 && isNormalDay(cell.type) || cell.isCurrent;
  26647. };
  26648. const handleFocus = (event) => {
  26649. if (focusWithClick || unref(hasCurrent) || props.selectionMode !== "date") return;
  26650. handlePickDate(event, true);
  26651. };
  26652. const handleMouseDown = (event) => {
  26653. if (!event.target.closest("td")) return;
  26654. focusWithClick = true;
  26655. };
  26656. const handleMouseUp = (event) => {
  26657. if (!event.target.closest("td")) return;
  26658. focusWithClick = false;
  26659. };
  26660. const handleRangePick = (newDate) => {
  26661. if (!props.rangeState.selecting || !props.minDate) {
  26662. emit("pick", {
  26663. minDate: newDate,
  26664. maxDate: null
  26665. });
  26666. emit("select", true);
  26667. } else {
  26668. if (newDate >= props.minDate) emit("pick", {
  26669. minDate: props.minDate,
  26670. maxDate: newDate
  26671. });
  26672. else emit("pick", {
  26673. minDate: newDate,
  26674. maxDate: props.minDate
  26675. });
  26676. emit("select", false);
  26677. }
  26678. };
  26679. const handleWeekPick = (newDate) => {
  26680. const weekNumber = newDate.week();
  26681. const value = `${newDate.year()}w${weekNumber}`;
  26682. emit("pick", {
  26683. year: newDate.year(),
  26684. week: weekNumber,
  26685. value,
  26686. date: newDate.startOf("week")
  26687. });
  26688. };
  26689. const handleDatesPick = (newDate, selected) => {
  26690. emit("pick", selected ? castArray(props.parsedValue).filter((d) => d?.valueOf() !== newDate.valueOf()) : castArray(props.parsedValue).concat([newDate]));
  26691. };
  26692. const handlePickDate = (event, isKeyboardMovement = false) => {
  26693. if (props.disabled) return;
  26694. const target = event.target.closest("td");
  26695. if (!target) return;
  26696. const row = target.parentNode.rowIndex - 1;
  26697. const column = target.cellIndex;
  26698. const cell = unref(rows)[row][column];
  26699. if (cell.disabled || cell.type === "week") return;
  26700. const newDate = getDateOfCell(row, column);
  26701. switch (props.selectionMode) {
  26702. case "range":
  26703. handleRangePick(newDate);
  26704. break;
  26705. case "date":
  26706. emit("pick", newDate, isKeyboardMovement);
  26707. break;
  26708. case "week":
  26709. handleWeekPick(newDate);
  26710. break;
  26711. case "dates":
  26712. handleDatesPick(newDate, !!cell.selected);
  26713. break;
  26714. default: break;
  26715. }
  26716. };
  26717. const isWeekActive = (cell) => {
  26718. if (props.selectionMode !== "week") return false;
  26719. let newDate = props.date.startOf("day");
  26720. if (cell.type === "prev-month") newDate = newDate.subtract(1, "month");
  26721. if (cell.type === "next-month") newDate = newDate.add(1, "month");
  26722. newDate = newDate.date(Number.parseInt(cell.text, 10));
  26723. if (props.parsedValue && !isArray$1(props.parsedValue)) {
  26724. const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;
  26725. return props.parsedValue.subtract(dayOffset, "day").isSame(newDate, "day");
  26726. }
  26727. return false;
  26728. };
  26729. return {
  26730. WEEKS,
  26731. rows,
  26732. tbodyRef,
  26733. currentCellRef,
  26734. focus,
  26735. isCurrent,
  26736. isWeekActive,
  26737. isSelectedCell,
  26738. handlePickDate,
  26739. handleMouseUp,
  26740. handleMouseDown,
  26741. handleMouseMove,
  26742. handleFocus
  26743. };
  26744. };
  26745. var useBasicDateTableDOM = (props, { isCurrent, isWeekActive }) => {
  26746. const ns = useNamespace("date-table");
  26747. const { t } = useLocale();
  26748. const tableKls = computed(() => [ns.b(), ns.is("week-mode", props.selectionMode === "week" && !props.disabled)]);
  26749. const tableLabel = computed(() => t("el.datepicker.dateTablePrompt"));
  26750. const getCellClasses = (cell) => {
  26751. const classes = [];
  26752. if (isNormalDay(cell.type) && !cell.disabled) {
  26753. classes.push("available");
  26754. if (cell.type === "today") classes.push("today");
  26755. } else classes.push(cell.type);
  26756. if (isCurrent(cell)) classes.push("current");
  26757. if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) {
  26758. classes.push("in-range");
  26759. if (cell.start) classes.push("start-date");
  26760. if (cell.end) classes.push("end-date");
  26761. }
  26762. if (cell.disabled || props.disabled) classes.push("disabled");
  26763. if (cell.selected) classes.push("selected");
  26764. if (cell.customClass) classes.push(cell.customClass);
  26765. return classes.join(" ");
  26766. };
  26767. const getRowKls = (cell) => [ns.e("row"), { current: isWeekActive(cell) }];
  26768. return {
  26769. tableKls,
  26770. tableLabel,
  26771. weekHeaderClass: ns.e("week-header"),
  26772. getCellClasses,
  26773. getRowKls,
  26774. t
  26775. };
  26776. };
  26777. //#endregion
  26778. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-cell-render.mjs
  26779. var basic_cell_render_default = /* @__PURE__ */ defineComponent({
  26780. name: "ElDatePickerCell",
  26781. props: buildProps({ cell: { type: definePropType(Object) } }),
  26782. setup(props) {
  26783. const ns = useNamespace("date-table-cell");
  26784. const { slots } = inject(ROOT_PICKER_INJECTION_KEY);
  26785. return () => {
  26786. const { cell } = props;
  26787. return renderSlot(slots, "default", { ...cell }, () => [createVNode("div", { "class": ns.b() }, [createVNode("span", { "class": ns.e("text") }, [cell?.renderText ?? cell?.text])])]);
  26788. };
  26789. }
  26790. });
  26791. //#endregion
  26792. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.vue_vue_type_script_setup_true_lang.mjs
  26793. var _hoisted_1$50 = ["aria-label"];
  26794. var _hoisted_2$32 = ["aria-label"];
  26795. var _hoisted_3$15 = [
  26796. "aria-current",
  26797. "aria-selected",
  26798. "tabindex",
  26799. "aria-disabled"
  26800. ];
  26801. //#endregion
  26802. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs
  26803. var basic_date_table_default = /* @__PURE__ */ defineComponent({
  26804. __name: "basic-date-table",
  26805. props: basicDateTableProps,
  26806. emits: basicDateTableEmits,
  26807. setup(__props, { expose: __expose, emit: __emit }) {
  26808. const props = __props;
  26809. const { WEEKS, rows, tbodyRef, currentCellRef, focus, isCurrent, isWeekActive, isSelectedCell, handlePickDate, handleMouseUp, handleMouseDown, handleMouseMove, handleFocus } = useBasicDateTable(props, __emit);
  26810. const { tableLabel, tableKls, getCellClasses, getRowKls, weekHeaderClass, t } = useBasicDateTableDOM(props, {
  26811. isCurrent,
  26812. isWeekActive
  26813. });
  26814. let isUnmounting = false;
  26815. onBeforeUnmount(() => {
  26816. isUnmounting = true;
  26817. });
  26818. __expose({ focus });
  26819. return (_ctx, _cache) => {
  26820. return openBlock(), createElementBlock("table", {
  26821. "aria-label": unref(tableLabel),
  26822. class: normalizeClass(unref(tableKls)),
  26823. cellspacing: "0",
  26824. cellpadding: "0",
  26825. role: "grid",
  26826. onClick: _cache[1] || (_cache[1] = (...args) => unref(handlePickDate) && unref(handlePickDate)(...args)),
  26827. onMousemove: _cache[2] || (_cache[2] = (...args) => unref(handleMouseMove) && unref(handleMouseMove)(...args)),
  26828. onMousedown: _cache[3] || (_cache[3] = (...args) => unref(handleMouseDown) && unref(handleMouseDown)(...args)),
  26829. onMouseup: _cache[4] || (_cache[4] = (...args) => unref(handleMouseUp) && unref(handleMouseUp)(...args))
  26830. }, [createBaseVNode("tbody", {
  26831. ref_key: "tbodyRef",
  26832. ref: tbodyRef
  26833. }, [createBaseVNode("tr", null, [_ctx.showWeekNumber ? (openBlock(), createElementBlock("th", {
  26834. key: 0,
  26835. scope: "col",
  26836. class: normalizeClass(unref(weekHeaderClass))
  26837. }, null, 2)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEKS), (week, key) => {
  26838. return openBlock(), createElementBlock("th", {
  26839. key,
  26840. "aria-label": unref(t)("el.datepicker.weeksFull." + week),
  26841. scope: "col"
  26842. }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_2$32);
  26843. }), 128))]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, rowKey) => {
  26844. return openBlock(), createElementBlock("tr", {
  26845. key: rowKey,
  26846. class: normalizeClass(unref(getRowKls)(_ctx.showWeekNumber ? row[2] : row[1]))
  26847. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, columnKey) => {
  26848. return openBlock(), createElementBlock("td", {
  26849. key: `${rowKey}.${columnKey}`,
  26850. ref_for: true,
  26851. ref: (el) => !unref(isUnmounting) && unref(isSelectedCell)(cell) && (currentCellRef.value = el),
  26852. class: normalizeClass(unref(getCellClasses)(cell)),
  26853. "aria-current": cell.isCurrent ? "date" : void 0,
  26854. "aria-selected": cell.isCurrent,
  26855. tabindex: _ctx.disabled ? void 0 : unref(isSelectedCell)(cell) ? 0 : -1,
  26856. "aria-disabled": _ctx.disabled,
  26857. onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args))
  26858. }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_3$15);
  26859. }), 128))], 2);
  26860. }), 128))], 512)], 42, _hoisted_1$50);
  26861. };
  26862. }
  26863. });
  26864. //#endregion
  26865. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-month-table.mjs
  26866. var basicMonthTableProps = buildProps({
  26867. ...datePickerSharedProps,
  26868. selectionMode: selectionModeWithDefault("month")
  26869. });
  26870. //#endregion
  26871. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.vue_vue_type_script_setup_true_lang.mjs
  26872. var _hoisted_1$49 = ["aria-label"];
  26873. var _hoisted_2$31 = [
  26874. "aria-selected",
  26875. "aria-label",
  26876. "tabindex",
  26877. "onKeydown"
  26878. ];
  26879. //#endregion
  26880. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.mjs
  26881. var basic_month_table_default = /* @__PURE__ */ defineComponent({
  26882. __name: "basic-month-table",
  26883. props: basicMonthTableProps,
  26884. emits: [
  26885. "changerange",
  26886. "pick",
  26887. "select"
  26888. ],
  26889. setup(__props, { expose: __expose, emit: __emit }) {
  26890. const props = __props;
  26891. const emit = __emit;
  26892. const ns = useNamespace("month-table");
  26893. const { t, lang } = useLocale();
  26894. const tbodyRef = ref();
  26895. const currentCellRef = ref();
  26896. const months = ref(props.date.locale("en").localeData().monthsShort().map((_) => _.toLowerCase()));
  26897. const tableRows = ref([
  26898. [],
  26899. [],
  26900. []
  26901. ]);
  26902. const lastRow = ref();
  26903. const lastColumn = ref();
  26904. const rows = computed(() => {
  26905. const rows = tableRows.value;
  26906. const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("month");
  26907. for (let i = 0; i < 3; i++) {
  26908. const row = rows[i];
  26909. for (let j = 0; j < 4; j++) {
  26910. const cell = row[j] ||= {
  26911. row: i,
  26912. column: j,
  26913. type: "normal",
  26914. inRange: false,
  26915. start: false,
  26916. end: false,
  26917. text: -1,
  26918. disabled: false,
  26919. isSelected: false,
  26920. customClass: void 0,
  26921. date: void 0,
  26922. dayjs: void 0,
  26923. isCurrent: void 0,
  26924. selected: void 0,
  26925. renderText: void 0,
  26926. timestamp: void 0
  26927. };
  26928. cell.type = "normal";
  26929. const index = i * 4 + j;
  26930. const calTime = props.date.startOf("year").month(index);
  26931. const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
  26932. 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"));
  26933. if (props.minDate?.isSameOrAfter(calEndDate)) {
  26934. cell.start = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  26935. cell.end = props.minDate && calTime.isSame(props.minDate, "month");
  26936. } else {
  26937. cell.start = !!(props.minDate && calTime.isSame(props.minDate, "month"));
  26938. cell.end = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  26939. }
  26940. if (now.isSame(calTime)) cell.type = "today";
  26941. const cellDate = calTime.toDate();
  26942. cell.text = index;
  26943. cell.disabled = props.disabledDate?.(cellDate) || false;
  26944. cell.date = cellDate;
  26945. cell.customClass = props.cellClassName?.(cellDate);
  26946. cell.dayjs = calTime;
  26947. cell.timestamp = calTime.valueOf();
  26948. cell.isSelected = isSelectedCell(cell);
  26949. }
  26950. }
  26951. return rows;
  26952. });
  26953. const focus = () => {
  26954. currentCellRef.value?.focus();
  26955. };
  26956. const getCellStyle = (cell) => {
  26957. const style = {};
  26958. const year = props.date.year();
  26959. const today = /* @__PURE__ */ new Date();
  26960. const month = cell.text;
  26961. style.disabled = props.disabled || (props.disabledDate ? datesInMonth(props.date, year, month, lang.value).every(props.disabledDate) : false);
  26962. style.current = castArray(props.parsedValue).some((date) => import_dayjs_min.default.isDayjs(date) && date.year() === year && date.month() === month);
  26963. style.today = today.getFullYear() === year && today.getMonth() === month;
  26964. if (cell.customClass) style[cell.customClass] = true;
  26965. if (cell.inRange) {
  26966. style["in-range"] = true;
  26967. if (cell.start) style["start-date"] = true;
  26968. if (cell.end) style["end-date"] = true;
  26969. }
  26970. return style;
  26971. };
  26972. const isSelectedCell = (cell) => {
  26973. const year = props.date.year();
  26974. const month = cell.text;
  26975. return castArray(props.date).some((date) => date.year() === year && date.month() === month);
  26976. };
  26977. const handleMouseMove = (event) => {
  26978. if (!props.rangeState.selecting) return;
  26979. let target = event.target;
  26980. if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
  26981. if (target.tagName === "DIV") target = target.parentNode;
  26982. if (target.tagName !== "TD") return;
  26983. const row = target.parentNode.rowIndex;
  26984. const column = target.cellIndex;
  26985. if (rows.value[row][column].disabled) return;
  26986. if (row !== lastRow.value || column !== lastColumn.value) {
  26987. lastRow.value = row;
  26988. lastColumn.value = column;
  26989. emit("changerange", {
  26990. selecting: true,
  26991. endDate: props.date.startOf("year").month(row * 4 + column)
  26992. });
  26993. }
  26994. };
  26995. const handleMonthTableClick = (event) => {
  26996. if (props.disabled) return;
  26997. const target = event.target?.closest("td");
  26998. if (target?.tagName !== "TD") return;
  26999. if (hasClass(target, "disabled")) return;
  27000. const column = target.cellIndex;
  27001. const month = target.parentNode.rowIndex * 4 + column;
  27002. const newDate = props.date.startOf("year").month(month);
  27003. if (props.selectionMode === "months") {
  27004. if (event.type === "keydown") {
  27005. emit("pick", castArray(props.parsedValue), false);
  27006. return;
  27007. }
  27008. const newMonth = getValidDateOfMonth(props.date, props.date.year(), month, lang.value, props.disabledDate);
  27009. emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== newMonth.year() || d?.month() !== newMonth.month()) : castArray(props.parsedValue).concat([(0, import_dayjs_min.default)(newMonth)]));
  27010. } else if (props.selectionMode === "range") if (!props.rangeState.selecting) {
  27011. emit("pick", {
  27012. minDate: newDate,
  27013. maxDate: null
  27014. });
  27015. emit("select", true);
  27016. } else {
  27017. if (props.minDate && newDate >= props.minDate) emit("pick", {
  27018. minDate: props.minDate,
  27019. maxDate: newDate
  27020. });
  27021. else emit("pick", {
  27022. minDate: newDate,
  27023. maxDate: props.minDate
  27024. });
  27025. emit("select", false);
  27026. }
  27027. else emit("pick", month);
  27028. };
  27029. watch(() => props.date, async () => {
  27030. if (tbodyRef.value?.contains(document.activeElement)) {
  27031. await nextTick();
  27032. currentCellRef.value?.focus();
  27033. }
  27034. });
  27035. __expose({ focus });
  27036. return (_ctx, _cache) => {
  27037. return openBlock(), createElementBlock("table", {
  27038. role: "grid",
  27039. "aria-label": unref(t)("el.datepicker.monthTablePrompt"),
  27040. class: normalizeClass(unref(ns).b()),
  27041. onClick: handleMonthTableClick,
  27042. onMousemove: handleMouseMove
  27043. }, [createBaseVNode("tbody", {
  27044. ref_key: "tbodyRef",
  27045. ref: tbodyRef
  27046. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, key) => {
  27047. return openBlock(), createElementBlock("tr", { key }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key_) => {
  27048. return openBlock(), createElementBlock("td", {
  27049. key: key_,
  27050. ref_for: true,
  27051. ref: (el) => cell.isSelected && (currentCellRef.value = el),
  27052. class: normalizeClass(getCellStyle(cell)),
  27053. "aria-selected": !!cell.isSelected,
  27054. "aria-label": unref(t)(`el.datepicker.month${+cell.text + 1}`),
  27055. tabindex: cell.isSelected ? 0 : -1,
  27056. onKeydown: [withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["enter"])]
  27057. }, [createVNode(unref(basic_cell_render_default), { cell: {
  27058. ...cell,
  27059. renderText: unref(t)("el.datepicker.months." + months.value[cell.text])
  27060. } }, null, 8, ["cell"])], 42, _hoisted_2$31);
  27061. }), 128))]);
  27062. }), 128))], 512)], 42, _hoisted_1$49);
  27063. };
  27064. }
  27065. });
  27066. //#endregion
  27067. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-year-table.mjs
  27068. var basicYearTableProps = buildProps({
  27069. ...datePickerSharedProps,
  27070. selectionMode: selectionModeWithDefault("year")
  27071. });
  27072. //#endregion
  27073. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.vue_vue_type_script_setup_true_lang.mjs
  27074. var _hoisted_1$48 = ["aria-label"];
  27075. var _hoisted_2$30 = [
  27076. "aria-selected",
  27077. "aria-label",
  27078. "tabindex",
  27079. "onKeydown"
  27080. ];
  27081. //#endregion
  27082. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.mjs
  27083. var basic_year_table_default = /* @__PURE__ */ defineComponent({
  27084. __name: "basic-year-table",
  27085. props: basicYearTableProps,
  27086. emits: [
  27087. "changerange",
  27088. "pick",
  27089. "select"
  27090. ],
  27091. setup(__props, { expose: __expose, emit: __emit }) {
  27092. const datesInYear = (year, lang) => {
  27093. const firstDay = (0, import_dayjs_min.default)(String(year)).locale(lang).startOf("year");
  27094. return rangeArr(firstDay.endOf("year").dayOfYear()).map((n) => firstDay.add(n, "day").toDate());
  27095. };
  27096. const props = __props;
  27097. const emit = __emit;
  27098. const ns = useNamespace("year-table");
  27099. const { t, lang } = useLocale();
  27100. const tbodyRef = ref();
  27101. const currentCellRef = ref();
  27102. const startYear = computed(() => {
  27103. return Math.floor(props.date.year() / 10) * 10;
  27104. });
  27105. const tableRows = ref([
  27106. [],
  27107. [],
  27108. []
  27109. ]);
  27110. const lastRow = ref();
  27111. const lastColumn = ref();
  27112. const rows = computed(() => {
  27113. const rows = tableRows.value;
  27114. const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("year");
  27115. for (let i = 0; i < 3; i++) {
  27116. const row = rows[i];
  27117. for (let j = 0; j < 4; j++) {
  27118. if (i * 4 + j >= 10) break;
  27119. let cell = row[j];
  27120. if (!cell) cell = {
  27121. row: i,
  27122. column: j,
  27123. type: "normal",
  27124. inRange: false,
  27125. start: false,
  27126. end: false,
  27127. text: -1,
  27128. disabled: false,
  27129. isSelected: false,
  27130. customClass: void 0,
  27131. date: void 0,
  27132. dayjs: void 0,
  27133. isCurrent: void 0,
  27134. selected: void 0,
  27135. renderText: void 0,
  27136. timestamp: void 0
  27137. };
  27138. cell.type = "normal";
  27139. const index = i * 4 + j + startYear.value;
  27140. const calTime = (0, import_dayjs_min.default)().year(index);
  27141. const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
  27142. cell.inRange = !!(props.minDate && calTime.isSameOrAfter(props.minDate, "year") && calEndDate && calTime.isSameOrBefore(calEndDate, "year")) || !!(props.minDate && calTime.isSameOrBefore(props.minDate, "year") && calEndDate && calTime.isSameOrAfter(calEndDate, "year"));
  27143. if (props.minDate?.isSameOrAfter(calEndDate)) {
  27144. cell.start = !!(calEndDate && calTime.isSame(calEndDate, "year"));
  27145. cell.end = !!(props.minDate && calTime.isSame(props.minDate, "year"));
  27146. } else {
  27147. cell.start = !!(props.minDate && calTime.isSame(props.minDate, "year"));
  27148. cell.end = !!(calEndDate && calTime.isSame(calEndDate, "year"));
  27149. }
  27150. if (now.isSame(calTime)) cell.type = "today";
  27151. cell.text = index;
  27152. const cellDate = calTime.toDate();
  27153. cell.disabled = props.disabledDate?.(cellDate) || false;
  27154. cell.date = cellDate;
  27155. cell.customClass = props.cellClassName?.(cellDate);
  27156. cell.dayjs = calTime;
  27157. cell.timestamp = calTime.valueOf();
  27158. cell.isSelected = isSelectedCell(cell);
  27159. row[j] = cell;
  27160. }
  27161. }
  27162. return rows;
  27163. });
  27164. const focus = () => {
  27165. currentCellRef.value?.focus();
  27166. };
  27167. const getCellKls = (cell) => {
  27168. const kls = {};
  27169. const today = (0, import_dayjs_min.default)().locale(lang.value);
  27170. const year = cell.text;
  27171. kls.disabled = props.disabled || (props.disabledDate ? datesInYear(year, lang.value).every(props.disabledDate) : false);
  27172. kls.today = today.year() === year;
  27173. kls.current = castArray(props.parsedValue).some((d) => d.year() === year);
  27174. if (cell.customClass) kls[cell.customClass] = true;
  27175. if (cell.inRange) {
  27176. kls["in-range"] = true;
  27177. if (cell.start) kls["start-date"] = true;
  27178. if (cell.end) kls["end-date"] = true;
  27179. }
  27180. return kls;
  27181. };
  27182. const isSelectedCell = (cell) => {
  27183. const year = cell.text;
  27184. return castArray(props.date).some((date) => date.year() === year);
  27185. };
  27186. const handleYearTableClick = (event) => {
  27187. if (props.disabled) return;
  27188. const target = event.target?.closest("td");
  27189. if (!target || !target.textContent || hasClass(target, "disabled")) return;
  27190. const column = target.cellIndex;
  27191. const selectedYear = target.parentNode.rowIndex * 4 + column + startYear.value;
  27192. const newDate = (0, import_dayjs_min.default)().year(selectedYear);
  27193. if (props.selectionMode === "range") if (!props.rangeState.selecting) {
  27194. emit("pick", {
  27195. minDate: newDate,
  27196. maxDate: null
  27197. });
  27198. emit("select", true);
  27199. } else {
  27200. if (props.minDate && newDate >= props.minDate) emit("pick", {
  27201. minDate: props.minDate,
  27202. maxDate: newDate
  27203. });
  27204. else emit("pick", {
  27205. minDate: newDate,
  27206. maxDate: props.minDate
  27207. });
  27208. emit("select", false);
  27209. }
  27210. else if (props.selectionMode === "years") {
  27211. if (event.type === "keydown") {
  27212. emit("pick", castArray(props.parsedValue), false);
  27213. return;
  27214. }
  27215. const vaildYear = getValidDateOfYear(newDate.startOf("year"), lang.value, props.disabledDate);
  27216. emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== selectedYear) : castArray(props.parsedValue).concat([vaildYear]));
  27217. } else emit("pick", selectedYear);
  27218. };
  27219. const handleMouseMove = (event) => {
  27220. if (!props.rangeState.selecting) return;
  27221. const target = event.target?.closest("td");
  27222. if (!target) return;
  27223. const row = target.parentNode.rowIndex;
  27224. const column = target.cellIndex;
  27225. if (rows.value[row][column].disabled) return;
  27226. if (row !== lastRow.value || column !== lastColumn.value) {
  27227. lastRow.value = row;
  27228. lastColumn.value = column;
  27229. emit("changerange", {
  27230. selecting: true,
  27231. endDate: (0, import_dayjs_min.default)().year(startYear.value).add(row * 4 + column, "year")
  27232. });
  27233. }
  27234. };
  27235. watch(() => props.date, async () => {
  27236. if (tbodyRef.value?.contains(document.activeElement)) {
  27237. await nextTick();
  27238. currentCellRef.value?.focus();
  27239. }
  27240. });
  27241. __expose({ focus });
  27242. return (_ctx, _cache) => {
  27243. return openBlock(), createElementBlock("table", {
  27244. role: "grid",
  27245. "aria-label": unref(t)("el.datepicker.yearTablePrompt"),
  27246. class: normalizeClass(unref(ns).b()),
  27247. onClick: handleYearTableClick,
  27248. onMousemove: handleMouseMove
  27249. }, [createBaseVNode("tbody", {
  27250. ref_key: "tbodyRef",
  27251. ref: tbodyRef
  27252. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, rowKey) => {
  27253. return openBlock(), createElementBlock("tr", { key: rowKey }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellKey) => {
  27254. return openBlock(), createElementBlock("td", {
  27255. key: `${rowKey}_${cellKey}`,
  27256. ref_for: true,
  27257. ref: (el) => cell.isSelected && (currentCellRef.value = el),
  27258. class: normalizeClass(["available", getCellKls(cell)]),
  27259. "aria-selected": cell.isSelected,
  27260. "aria-label": String(cell.text),
  27261. tabindex: cell.isSelected ? 0 : -1,
  27262. onKeydown: [withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"])]
  27263. }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_2$30);
  27264. }), 128))]);
  27265. }), 128))], 512)], 42, _hoisted_1$48);
  27266. };
  27267. }
  27268. });
  27269. //#endregion
  27270. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs
  27271. var _hoisted_1$47 = ["disabled", "onClick"];
  27272. var _hoisted_2$29 = ["aria-label", "disabled"];
  27273. var _hoisted_3$14 = ["aria-label", "disabled"];
  27274. var _hoisted_4$11 = ["tabindex", "aria-disabled"];
  27275. var _hoisted_5$8 = ["tabindex", "aria-disabled"];
  27276. var _hoisted_6$3 = ["aria-label", "disabled"];
  27277. var _hoisted_7$2 = ["aria-label", "disabled"];
  27278. //#endregion
  27279. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs
  27280. var panel_date_pick_default = /* @__PURE__ */ defineComponent({
  27281. __name: "panel-date-pick",
  27282. props: panelDatePickProps,
  27283. emits: [
  27284. "pick",
  27285. "set-picker-option",
  27286. "panel-change"
  27287. ],
  27288. setup(__props, { emit: __emit }) {
  27289. const timeWithinRange = (_, __, ___) => true;
  27290. const props = __props;
  27291. const contextEmit = __emit;
  27292. const ppNs = useNamespace("picker-panel");
  27293. const dpNs = useNamespace("date-picker");
  27294. const attrs = useAttrs$1();
  27295. const slots = useSlots();
  27296. const { t, lang } = useLocale();
  27297. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  27298. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  27299. const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props;
  27300. const defaultValue = toRef(pickerBase.props, "defaultValue");
  27301. const currentViewRef = ref();
  27302. const innerDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  27303. const isChangeToNow = ref(false);
  27304. let isShortcut = false;
  27305. const defaultTimeD = computed(() => {
  27306. return (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
  27307. });
  27308. const month = computed(() => {
  27309. return innerDate.value.month();
  27310. });
  27311. const year = computed(() => {
  27312. return innerDate.value.year();
  27313. });
  27314. const selectableRange = ref([]);
  27315. const userInputDate = ref(null);
  27316. const userInputTime = ref(null);
  27317. const checkDateWithinRange = (date) => {
  27318. return selectableRange.value.length > 0 ? timeWithinRange(date, selectableRange.value, props.format || "HH:mm:ss") : true;
  27319. };
  27320. const formatEmit = (emitDayjs) => {
  27321. if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  27322. if (showTime.value) return emitDayjs.millisecond(0);
  27323. return emitDayjs.startOf("day");
  27324. };
  27325. const emit = (value, ...args) => {
  27326. if (!value) contextEmit("pick", value, ...args);
  27327. else if (isArray$1(value)) contextEmit("pick", value.map(formatEmit), ...args);
  27328. else contextEmit("pick", formatEmit(value), ...args);
  27329. userInputDate.value = null;
  27330. userInputTime.value = null;
  27331. isChangeToNow.value = false;
  27332. isShortcut = false;
  27333. };
  27334. const handleDatePick = async (value, keepOpen) => {
  27335. if (selectionMode.value === "date" && import_dayjs_min.default.isDayjs(value)) {
  27336. const parsedDateValue = extractFirst(props.parsedValue);
  27337. let newDate = parsedDateValue ? parsedDateValue.year(value.year()).month(value.month()).date(value.date()) : value;
  27338. if (!checkDateWithinRange(newDate)) newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
  27339. innerDate.value = newDate;
  27340. emit(newDate, showTime.value || keepOpen);
  27341. } else if (selectionMode.value === "week") emit(value.date);
  27342. else if (selectionMode.value === "dates") emit(value, true);
  27343. };
  27344. const moveByMonth = (forward) => {
  27345. const action = forward ? "add" : "subtract";
  27346. innerDate.value = innerDate.value[action](1, "month");
  27347. handlePanelChange("month");
  27348. };
  27349. const moveByYear = (forward) => {
  27350. const currentDate = innerDate.value;
  27351. const action = forward ? "add" : "subtract";
  27352. innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year");
  27353. handlePanelChange("year");
  27354. };
  27355. const currentView = ref("date");
  27356. const yearLabel = computed(() => {
  27357. const yearTranslation = t("el.datepicker.year");
  27358. if (currentView.value === "year") {
  27359. const startYear = Math.floor(year.value / 10) * 10;
  27360. if (yearTranslation) return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`;
  27361. return `${startYear} - ${startYear + 9}`;
  27362. }
  27363. return `${year.value} ${yearTranslation}`;
  27364. });
  27365. const handleShortcutClick = (shortcut) => {
  27366. const shortcutValue = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
  27367. if (shortcutValue) {
  27368. isShortcut = true;
  27369. emit((0, import_dayjs_min.default)(shortcutValue).locale(lang.value));
  27370. return;
  27371. }
  27372. if (shortcut.onClick) shortcut.onClick({
  27373. attrs,
  27374. slots,
  27375. emit: contextEmit
  27376. });
  27377. };
  27378. const selectionMode = computed(() => {
  27379. const { type } = props;
  27380. if ([
  27381. "week",
  27382. "month",
  27383. "months",
  27384. "year",
  27385. "years",
  27386. "dates"
  27387. ].includes(type)) return type;
  27388. return "date";
  27389. });
  27390. const isMultipleType = computed(() => {
  27391. return selectionMode.value === "dates" || selectionMode.value === "months" || selectionMode.value === "years";
  27392. });
  27393. const keyboardMode = computed(() => {
  27394. return selectionMode.value === "date" ? currentView.value : selectionMode.value;
  27395. });
  27396. const hasShortcuts = computed(() => !!shortcuts.length);
  27397. const handleMonthPick = async (month, keepOpen) => {
  27398. if (selectionMode.value === "month") {
  27399. innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
  27400. emit(innerDate.value, false);
  27401. } else if (selectionMode.value === "months") emit(month, keepOpen ?? true);
  27402. else {
  27403. innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
  27404. currentView.value = "date";
  27405. if ([
  27406. "month",
  27407. "year",
  27408. "date",
  27409. "week"
  27410. ].includes(selectionMode.value)) {
  27411. emit(innerDate.value, true);
  27412. await nextTick();
  27413. handleFocusPicker();
  27414. }
  27415. }
  27416. handlePanelChange("month");
  27417. };
  27418. const handleYearPick = async (year, keepOpen) => {
  27419. if (selectionMode.value === "year") {
  27420. innerDate.value = getValidDateOfYear(innerDate.value.startOf("year").year(year), lang.value, disabledDate);
  27421. emit(innerDate.value, false);
  27422. } else if (selectionMode.value === "years") emit(year, keepOpen ?? true);
  27423. else {
  27424. innerDate.value = getValidDateOfYear(innerDate.value.year(year), lang.value, disabledDate);
  27425. currentView.value = "month";
  27426. if ([
  27427. "month",
  27428. "year",
  27429. "date",
  27430. "week"
  27431. ].includes(selectionMode.value)) {
  27432. emit(innerDate.value, true);
  27433. await nextTick();
  27434. handleFocusPicker();
  27435. }
  27436. }
  27437. handlePanelChange("year");
  27438. };
  27439. const dateDisabled = useFormDisabled();
  27440. const showPicker = async (view) => {
  27441. if (dateDisabled.value) return;
  27442. currentView.value = view;
  27443. await nextTick();
  27444. handleFocusPicker();
  27445. };
  27446. const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
  27447. const footerVisible = computed(() => {
  27448. const showDateFooter = showTime.value || selectionMode.value === "dates";
  27449. const showYearFooter = selectionMode.value === "years";
  27450. const showMonthFooter = selectionMode.value === "months";
  27451. const isDateView = currentView.value === "date";
  27452. const isYearView = currentView.value === "year";
  27453. const isMonthView = currentView.value === "month";
  27454. return showDateFooter && isDateView || showYearFooter && isYearView || showMonthFooter && isMonthView;
  27455. });
  27456. const footerFilled = computed(() => !isMultipleType.value && props.showNow || props.showConfirm);
  27457. const disabledConfirm = computed(() => {
  27458. if (!disabledDate) return false;
  27459. if (!props.parsedValue) return true;
  27460. if (isArray$1(props.parsedValue)) return disabledDate(props.parsedValue[0].toDate());
  27461. return disabledDate(props.parsedValue.toDate());
  27462. });
  27463. const onConfirm = () => {
  27464. if (isMultipleType.value) emit(props.parsedValue);
  27465. else {
  27466. let result = extractFirst(props.parsedValue);
  27467. if (!result) {
  27468. const defaultTimeD = (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
  27469. const defaultValueD = getDefaultValue();
  27470. result = defaultTimeD.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());
  27471. }
  27472. innerDate.value = result;
  27473. emit(result);
  27474. }
  27475. };
  27476. const disabledNow = computed(() => {
  27477. if (!disabledDate) return false;
  27478. return disabledDate((0, import_dayjs_min.default)().locale(lang.value).toDate());
  27479. });
  27480. const changeToNow = () => {
  27481. const nowDate = (0, import_dayjs_min.default)().locale(lang.value).toDate();
  27482. isChangeToNow.value = true;
  27483. if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) {
  27484. innerDate.value = (0, import_dayjs_min.default)().locale(lang.value);
  27485. emit(innerDate.value);
  27486. }
  27487. };
  27488. const timeFormat = computed(() => {
  27489. return props.timeFormat || extractTimeFormat(props.format) || "HH:mm:ss";
  27490. });
  27491. const dateFormat = computed(() => {
  27492. return props.dateFormat || extractDateFormat(props.format) || "YYYY-MM-DD";
  27493. });
  27494. const visibleTime = computed(() => {
  27495. if (userInputTime.value) return userInputTime.value;
  27496. if (!props.parsedValue && !defaultValue.value) return;
  27497. return (extractFirst(props.parsedValue) || innerDate.value).format(timeFormat.value);
  27498. });
  27499. const visibleDate = computed(() => {
  27500. if (userInputDate.value) return userInputDate.value;
  27501. if (!props.parsedValue && !defaultValue.value) return;
  27502. return (extractFirst(props.parsedValue) || innerDate.value).format(dateFormat.value);
  27503. });
  27504. const timePickerVisible = ref(false);
  27505. const onTimePickerInputFocus = () => {
  27506. timePickerVisible.value = true;
  27507. };
  27508. const handleTimePickClose = () => {
  27509. timePickerVisible.value = false;
  27510. };
  27511. const getUnits = (date) => {
  27512. return {
  27513. hour: date.hour(),
  27514. minute: date.minute(),
  27515. second: date.second(),
  27516. year: date.year(),
  27517. month: date.month(),
  27518. date: date.date()
  27519. };
  27520. };
  27521. const handleTimePick = (value, visible, first) => {
  27522. const { hour, minute, second } = getUnits(value);
  27523. const parsedDateValue = extractFirst(props.parsedValue);
  27524. innerDate.value = parsedDateValue ? parsedDateValue.hour(hour).minute(minute).second(second) : value;
  27525. emit(innerDate.value, true);
  27526. if (!first) timePickerVisible.value = visible;
  27527. };
  27528. const handleVisibleTimeChange = (value) => {
  27529. const newDate = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
  27530. if (newDate.isValid() && checkDateWithinRange(newDate)) {
  27531. const { year, month, date } = getUnits(innerDate.value);
  27532. innerDate.value = newDate.year(year).month(month).date(date);
  27533. userInputTime.value = null;
  27534. timePickerVisible.value = false;
  27535. emit(innerDate.value, true);
  27536. }
  27537. };
  27538. const handleVisibleDateChange = (value) => {
  27539. const newDate = correctlyParseUserInput(value, dateFormat.value, lang.value, isDefaultFormat);
  27540. if (newDate.isValid()) {
  27541. if (disabledDate && disabledDate(newDate.toDate())) return;
  27542. const { hour, minute, second } = getUnits(innerDate.value);
  27543. innerDate.value = newDate.hour(hour).minute(minute).second(second);
  27544. userInputDate.value = null;
  27545. emit(innerDate.value, true);
  27546. }
  27547. };
  27548. const isValidValue = (date) => {
  27549. return import_dayjs_min.default.isDayjs(date) && date.isValid() && (disabledDate ? !disabledDate(date.toDate()) : true);
  27550. };
  27551. const parseUserInput = (value) => {
  27552. return correctlyParseUserInput(value, props.format, lang.value, isDefaultFormat);
  27553. };
  27554. const getDefaultValue = () => {
  27555. const parseDate = (0, import_dayjs_min.default)(defaultValue.value).locale(lang.value);
  27556. if (!defaultValue.value) {
  27557. const defaultTimeDValue = defaultTimeD.value;
  27558. return (0, import_dayjs_min.default)().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value);
  27559. }
  27560. return parseDate;
  27561. };
  27562. const handleFocusPicker = () => {
  27563. if ([
  27564. "week",
  27565. "month",
  27566. "year",
  27567. "date"
  27568. ].includes(selectionMode.value)) currentViewRef.value?.focus();
  27569. };
  27570. const _handleFocusPicker = () => {
  27571. handleFocusPicker();
  27572. if (selectionMode.value === "week") handleKeyControl(EVENT_CODE.down);
  27573. };
  27574. const handleKeydownTable = (event) => {
  27575. const code = getEventCode(event);
  27576. if ([
  27577. EVENT_CODE.up,
  27578. EVENT_CODE.down,
  27579. EVENT_CODE.left,
  27580. EVENT_CODE.right,
  27581. EVENT_CODE.home,
  27582. EVENT_CODE.end,
  27583. EVENT_CODE.pageUp,
  27584. EVENT_CODE.pageDown
  27585. ].includes(code)) {
  27586. handleKeyControl(code);
  27587. event.stopPropagation();
  27588. event.preventDefault();
  27589. }
  27590. if ([
  27591. EVENT_CODE.enter,
  27592. EVENT_CODE.space,
  27593. EVENT_CODE.numpadEnter
  27594. ].includes(code) && userInputDate.value === null && userInputTime.value === null) {
  27595. event.preventDefault();
  27596. emit(innerDate.value, false);
  27597. }
  27598. };
  27599. const handleKeyControl = (code) => {
  27600. const { up, down, left, right, home, end, pageUp, pageDown } = EVENT_CODE;
  27601. const mapping = {
  27602. year: {
  27603. [up]: -4,
  27604. [down]: 4,
  27605. [left]: -1,
  27606. [right]: 1,
  27607. offset: (date, step) => date.setFullYear(date.getFullYear() + step)
  27608. },
  27609. month: {
  27610. [up]: -4,
  27611. [down]: 4,
  27612. [left]: -1,
  27613. [right]: 1,
  27614. offset: (date, step) => date.setMonth(date.getMonth() + step)
  27615. },
  27616. week: {
  27617. [up]: -1,
  27618. [down]: 1,
  27619. [left]: -1,
  27620. [right]: 1,
  27621. offset: (date, step) => date.setDate(date.getDate() + step * 7)
  27622. },
  27623. date: {
  27624. [up]: -7,
  27625. [down]: 7,
  27626. [left]: -1,
  27627. [right]: 1,
  27628. [home]: (date) => -date.getDay(),
  27629. [end]: (date) => -date.getDay() + 6,
  27630. [pageUp]: (date) => -new Date(date.getFullYear(), date.getMonth(), 0).getDate(),
  27631. [pageDown]: (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(),
  27632. offset: (date, step) => date.setDate(date.getDate() + step)
  27633. }
  27634. };
  27635. const newDate = innerDate.value.toDate();
  27636. while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) {
  27637. const map = mapping[keyboardMode.value];
  27638. if (!map) return;
  27639. map.offset(newDate, isFunction$1(map[code]) ? map[code](newDate) : map[code] ?? 0);
  27640. if (disabledDate && disabledDate(newDate)) break;
  27641. const result = (0, import_dayjs_min.default)(newDate).locale(lang.value);
  27642. innerDate.value = result;
  27643. contextEmit("pick", result, true);
  27644. break;
  27645. }
  27646. };
  27647. const handlePanelChange = (mode) => {
  27648. contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value);
  27649. };
  27650. watch(() => selectionMode.value, (val) => {
  27651. if (["month", "year"].includes(val)) {
  27652. currentView.value = val;
  27653. return;
  27654. } else if (val === "years") {
  27655. currentView.value = "year";
  27656. return;
  27657. } else if (val === "months") {
  27658. currentView.value = "month";
  27659. return;
  27660. }
  27661. currentView.value = "date";
  27662. }, { immediate: true });
  27663. watch(() => defaultValue.value, (val) => {
  27664. if (val) innerDate.value = getDefaultValue();
  27665. }, { immediate: true });
  27666. watch(() => props.parsedValue, (val) => {
  27667. if (val) {
  27668. if (isMultipleType.value) return;
  27669. if (isArray$1(val)) return;
  27670. innerDate.value = val;
  27671. } else innerDate.value = getDefaultValue();
  27672. }, { immediate: true });
  27673. contextEmit("set-picker-option", ["isValidValue", isValidValue]);
  27674. contextEmit("set-picker-option", ["parseUserInput", parseUserInput]);
  27675. contextEmit("set-picker-option", ["handleFocusPicker", _handleFocusPicker]);
  27676. return (_ctx, _cache) => {
  27677. return openBlock(), createElementBlock("div", { class: normalizeClass([
  27678. unref(ppNs).b(),
  27679. unref(dpNs).b(),
  27680. unref(ppNs).is("border", _ctx.border),
  27681. unref(ppNs).is("disabled", unref(dateDisabled)),
  27682. {
  27683. "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
  27684. "has-time": showTime.value
  27685. }
  27686. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  27687. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  27688. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  27689. key: 0,
  27690. class: normalizeClass(unref(ppNs).e("sidebar"))
  27691. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  27692. return openBlock(), createElementBlock("button", {
  27693. key,
  27694. type: "button",
  27695. disabled: unref(dateDisabled),
  27696. class: normalizeClass(unref(ppNs).e("shortcut")),
  27697. onClick: ($event) => handleShortcutClick(shortcut)
  27698. }, toDisplayString(shortcut.text), 11, _hoisted_1$47);
  27699. }), 128))], 2)) : createCommentVNode("v-if", true),
  27700. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
  27701. showTime.value ? (openBlock(), createElementBlock("div", {
  27702. key: 0,
  27703. class: normalizeClass(unref(dpNs).e("time-header"))
  27704. }, [createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
  27705. placeholder: unref(t)("el.datepicker.selectDate"),
  27706. "model-value": visibleDate.value,
  27707. size: "small",
  27708. "validate-event": false,
  27709. disabled: unref(dateDisabled),
  27710. readonly: !_ctx.editable,
  27711. onInput: _cache[0] || (_cache[0] = (val) => userInputDate.value = val),
  27712. onChange: handleVisibleDateChange
  27713. }, null, 8, [
  27714. "placeholder",
  27715. "model-value",
  27716. "disabled",
  27717. "readonly"
  27718. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
  27719. placeholder: unref(t)("el.datepicker.selectTime"),
  27720. "model-value": visibleTime.value,
  27721. size: "small",
  27722. "validate-event": false,
  27723. disabled: unref(dateDisabled),
  27724. readonly: !_ctx.editable,
  27725. onFocus: onTimePickerInputFocus,
  27726. onInput: _cache[1] || (_cache[1] = (val) => userInputTime.value = val),
  27727. onChange: handleVisibleTimeChange
  27728. }, null, 8, [
  27729. "placeholder",
  27730. "model-value",
  27731. "disabled",
  27732. "readonly"
  27733. ]), createVNode(unref(panel_time_pick_default), {
  27734. visible: timePickerVisible.value,
  27735. format: timeFormat.value,
  27736. "parsed-value": innerDate.value,
  27737. onPick: handleTimePick
  27738. }, null, 8, [
  27739. "visible",
  27740. "format",
  27741. "parsed-value"
  27742. ])], 2)), [[unref(ClickOutside), handleTimePickClose]])], 2)) : createCommentVNode("v-if", true),
  27743. withDirectives(createBaseVNode("div", { class: normalizeClass([unref(dpNs).e("header"), (currentView.value === "year" || currentView.value === "month") && unref(dpNs).em("header", "bordered")]) }, [
  27744. createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("prev-btn")) }, [createBaseVNode("button", {
  27745. type: "button",
  27746. "aria-label": unref(t)(`el.datepicker.prevYear`),
  27747. class: normalizeClass(["d-arrow-left", unref(ppNs).e("icon-btn")]),
  27748. disabled: unref(dateDisabled),
  27749. onClick: _cache[2] || (_cache[2] = ($event) => moveByYear(false))
  27750. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  27751. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  27752. _: 1
  27753. })])], 10, _hoisted_2$29), withDirectives(createBaseVNode("button", {
  27754. type: "button",
  27755. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  27756. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  27757. disabled: unref(dateDisabled),
  27758. onClick: _cache[3] || (_cache[3] = ($event) => moveByMonth(false))
  27759. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  27760. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  27761. _: 1
  27762. })])], 10, _hoisted_3$14), [[vShow, currentView.value === "date"]])], 2),
  27763. createBaseVNode("span", {
  27764. role: "button",
  27765. class: normalizeClass(unref(dpNs).e("header-label")),
  27766. "aria-live": "polite",
  27767. tabindex: _ctx.disabled ? void 0 : 0,
  27768. "aria-disabled": _ctx.disabled,
  27769. onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => showPicker("year"), ["enter"])),
  27770. onClick: _cache[5] || (_cache[5] = ($event) => showPicker("year"))
  27771. }, toDisplayString(yearLabel.value), 43, _hoisted_4$11),
  27772. withDirectives(createBaseVNode("span", {
  27773. role: "button",
  27774. "aria-live": "polite",
  27775. tabindex: _ctx.disabled ? void 0 : 0,
  27776. "aria-disabled": _ctx.disabled,
  27777. class: normalizeClass([unref(dpNs).e("header-label"), { active: currentView.value === "month" }]),
  27778. onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => showPicker("month"), ["enter"])),
  27779. onClick: _cache[7] || (_cache[7] = ($event) => showPicker("month"))
  27780. }, toDisplayString(unref(t)(`el.datepicker.month${month.value + 1}`)), 43, _hoisted_5$8), [[vShow, currentView.value === "date"]]),
  27781. createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("next-btn")) }, [withDirectives(createBaseVNode("button", {
  27782. type: "button",
  27783. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  27784. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  27785. disabled: unref(dateDisabled),
  27786. onClick: _cache[8] || (_cache[8] = ($event) => moveByMonth(true))
  27787. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  27788. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  27789. _: 1
  27790. })])], 10, _hoisted_6$3), [[vShow, currentView.value === "date"]]), createBaseVNode("button", {
  27791. type: "button",
  27792. "aria-label": unref(t)(`el.datepicker.nextYear`),
  27793. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  27794. disabled: unref(dateDisabled),
  27795. onClick: _cache[9] || (_cache[9] = ($event) => moveByYear(true))
  27796. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  27797. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  27798. _: 1
  27799. })])], 10, _hoisted_7$2)], 2)
  27800. ], 2), [[vShow, currentView.value !== "time"]]),
  27801. createBaseVNode("div", {
  27802. class: normalizeClass(unref(ppNs).e("content")),
  27803. onKeydown: handleKeydownTable
  27804. }, [
  27805. currentView.value === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  27806. key: 0,
  27807. ref_key: "currentViewRef",
  27808. ref: currentViewRef,
  27809. "selection-mode": selectionMode.value,
  27810. date: innerDate.value,
  27811. "parsed-value": _ctx.parsedValue,
  27812. "disabled-date": unref(disabledDate),
  27813. disabled: unref(dateDisabled),
  27814. "cell-class-name": unref(cellClassName),
  27815. "show-week-number": _ctx.showWeekNumber,
  27816. onPick: handleDatePick
  27817. }, null, 8, [
  27818. "selection-mode",
  27819. "date",
  27820. "parsed-value",
  27821. "disabled-date",
  27822. "disabled",
  27823. "cell-class-name",
  27824. "show-week-number"
  27825. ])) : createCommentVNode("v-if", true),
  27826. currentView.value === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  27827. key: 1,
  27828. ref_key: "currentViewRef",
  27829. ref: currentViewRef,
  27830. "selection-mode": selectionMode.value,
  27831. date: innerDate.value,
  27832. "disabled-date": unref(disabledDate),
  27833. disabled: unref(dateDisabled),
  27834. "parsed-value": _ctx.parsedValue,
  27835. "cell-class-name": unref(cellClassName),
  27836. onPick: handleYearPick
  27837. }, null, 8, [
  27838. "selection-mode",
  27839. "date",
  27840. "disabled-date",
  27841. "disabled",
  27842. "parsed-value",
  27843. "cell-class-name"
  27844. ])) : createCommentVNode("v-if", true),
  27845. currentView.value === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  27846. key: 2,
  27847. ref_key: "currentViewRef",
  27848. ref: currentViewRef,
  27849. "selection-mode": selectionMode.value,
  27850. date: innerDate.value,
  27851. "parsed-value": _ctx.parsedValue,
  27852. "disabled-date": unref(disabledDate),
  27853. disabled: unref(dateDisabled),
  27854. "cell-class-name": unref(cellClassName),
  27855. onPick: handleMonthPick
  27856. }, null, 8, [
  27857. "selection-mode",
  27858. "date",
  27859. "parsed-value",
  27860. "disabled-date",
  27861. "disabled",
  27862. "cell-class-name"
  27863. ])) : createCommentVNode("v-if", true)
  27864. ], 34)
  27865. ], 2)
  27866. ], 2), _ctx.showFooter && footerVisible.value && footerFilled.value ? (openBlock(), createElementBlock("div", {
  27867. key: 0,
  27868. class: normalizeClass(unref(ppNs).e("footer"))
  27869. }, [withDirectives(createVNode(unref(ElButton), {
  27870. text: "",
  27871. size: "small",
  27872. class: normalizeClass(unref(ppNs).e("link-btn")),
  27873. disabled: disabledNow.value,
  27874. onClick: changeToNow
  27875. }, {
  27876. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.now")), 1)]),
  27877. _: 1
  27878. }, 8, ["class", "disabled"]), [[vShow, !isMultipleType.value && _ctx.showNow]]), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
  27879. key: 0,
  27880. plain: "",
  27881. size: "small",
  27882. class: normalizeClass(unref(ppNs).e("link-btn")),
  27883. disabled: disabledConfirm.value,
  27884. onClick: onConfirm
  27885. }, {
  27886. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
  27887. _: 1
  27888. }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
  27889. };
  27890. }
  27891. });
  27892. //#endregion
  27893. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-range.mjs
  27894. var panelDateRangeProps = buildProps({
  27895. ...panelSharedProps,
  27896. ...panelRangeSharedProps
  27897. });
  27898. //#endregion
  27899. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-shortcut.mjs
  27900. var useShortcut = (lang) => {
  27901. const { emit } = getCurrentInstance();
  27902. const attrs = useAttrs$1();
  27903. const slots = useSlots();
  27904. const handleShortcutClick = (shortcut) => {
  27905. const shortcutValues = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
  27906. if (shortcutValues) {
  27907. emit("pick", [(0, import_dayjs_min.default)(shortcutValues[0]).locale(lang.value), (0, import_dayjs_min.default)(shortcutValues[1]).locale(lang.value)]);
  27908. return;
  27909. }
  27910. if (shortcut.onClick) shortcut.onClick({
  27911. attrs,
  27912. slots,
  27913. emit
  27914. });
  27915. };
  27916. return handleShortcutClick;
  27917. };
  27918. //#endregion
  27919. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-range-picker.mjs
  27920. var useRangePicker = (props, { defaultValue, defaultTime, leftDate, rightDate, step, unit, sortDates }) => {
  27921. const { emit } = getCurrentInstance();
  27922. const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY);
  27923. const drpNs = useNamespace("date-range-picker");
  27924. const { t, lang } = useLocale();
  27925. const handleShortcutClick = useShortcut(lang);
  27926. const minDate = ref();
  27927. const maxDate = ref();
  27928. const rangeState = ref({
  27929. endDate: null,
  27930. selecting: false
  27931. });
  27932. const handleChangeRange = (val) => {
  27933. rangeState.value = val;
  27934. };
  27935. const handleRangeConfirm = (visible = false) => {
  27936. const _minDate = unref(minDate);
  27937. const _maxDate = unref(maxDate);
  27938. if (isValidRange([_minDate, _maxDate])) emit("pick", [_minDate, _maxDate], visible);
  27939. };
  27940. const onSelect = (selecting) => {
  27941. rangeState.value.selecting = selecting;
  27942. if (!selecting) rangeState.value.endDate = null;
  27943. };
  27944. const parseValue = (parsedValue) => {
  27945. if (isArray$1(parsedValue) && parsedValue.length === 2) {
  27946. const [start, end] = parsedValue;
  27947. minDate.value = start;
  27948. leftDate.value = start;
  27949. maxDate.value = end;
  27950. sortDates(unref(minDate), unref(maxDate));
  27951. } else restoreDefault();
  27952. };
  27953. const restoreDefault = () => {
  27954. let [start, end] = getDefaultValue(unref(defaultValue), {
  27955. lang: unref(lang),
  27956. step,
  27957. unit,
  27958. unlinkPanels: props.unlinkPanels
  27959. });
  27960. const getShift = (day) => {
  27961. return day.diff(day.startOf("d"), "ms");
  27962. };
  27963. const maybeTimes = unref(defaultTime);
  27964. if (maybeTimes) {
  27965. let leftShift = 0;
  27966. let rightShift = 0;
  27967. if (isArray$1(maybeTimes)) {
  27968. const [timeStart, timeEnd] = maybeTimes.map(import_dayjs_min.default);
  27969. leftShift = getShift(timeStart);
  27970. rightShift = getShift(timeEnd);
  27971. } else {
  27972. const shift = getShift((0, import_dayjs_min.default)(maybeTimes));
  27973. leftShift = shift;
  27974. rightShift = shift;
  27975. }
  27976. start = start.startOf("d").add(leftShift, "ms");
  27977. end = end.startOf("d").add(rightShift, "ms");
  27978. }
  27979. minDate.value = void 0;
  27980. maxDate.value = void 0;
  27981. leftDate.value = start;
  27982. rightDate.value = end;
  27983. };
  27984. watch(defaultValue, (val) => {
  27985. if (val) restoreDefault();
  27986. }, { immediate: true });
  27987. watch(() => props.parsedValue, (parsedValue) => {
  27988. if (!parsedValue?.length || !isEqual$1(parsedValue, [minDate.value, maxDate.value])) parseValue(parsedValue);
  27989. }, { immediate: true });
  27990. watch(() => props.visible, () => {
  27991. if (props.visible) parseValue(props.parsedValue);
  27992. }, { immediate: true });
  27993. return {
  27994. minDate,
  27995. maxDate,
  27996. rangeState,
  27997. lang,
  27998. ppNs: pickerNs,
  27999. drpNs,
  28000. handleChangeRange,
  28001. handleRangeConfirm,
  28002. handleShortcutClick,
  28003. onSelect,
  28004. parseValue,
  28005. t
  28006. };
  28007. };
  28008. //#endregion
  28009. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-panel-date-range.mjs
  28010. var usePanelDateRange = (props, emit, leftDate, rightDate) => {
  28011. const leftCurrentView = ref("date");
  28012. const leftCurrentViewRef = ref();
  28013. const rightCurrentView = ref("date");
  28014. const rightCurrentViewRef = ref();
  28015. const { disabledDate } = inject(PICKER_BASE_INJECTION_KEY).props;
  28016. const { t, lang } = useLocale();
  28017. const leftYear = computed(() => {
  28018. return leftDate.value.year();
  28019. });
  28020. const leftMonth = computed(() => {
  28021. return leftDate.value.month();
  28022. });
  28023. const rightYear = computed(() => {
  28024. return rightDate.value.year();
  28025. });
  28026. const rightMonth = computed(() => {
  28027. return rightDate.value.month();
  28028. });
  28029. function computedYearLabel(currentView, yearValue) {
  28030. const yearTranslation = t("el.datepicker.year");
  28031. if (currentView.value === "year") {
  28032. const startYear = Math.floor(yearValue.value / 10) * 10;
  28033. return yearTranslation ? `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}` : `${startYear} - ${startYear + 9}`;
  28034. }
  28035. return `${yearValue.value} ${yearTranslation}`;
  28036. }
  28037. function focusPicker(currentViewRef) {
  28038. currentViewRef?.focus();
  28039. }
  28040. async function showPicker(pickerType, view) {
  28041. if (props.disabled) return;
  28042. const currentView = pickerType === "left" ? leftCurrentView : rightCurrentView;
  28043. const currentViewRef = pickerType === "left" ? leftCurrentViewRef : rightCurrentViewRef;
  28044. currentView.value = view;
  28045. await nextTick();
  28046. focusPicker(currentViewRef.value);
  28047. }
  28048. async function handlePick(mode, pickerType, value) {
  28049. if (props.disabled) return;
  28050. const isLeftPicker = pickerType === "left";
  28051. const startDate = isLeftPicker ? leftDate : rightDate;
  28052. const endDate = isLeftPicker ? rightDate : leftDate;
  28053. const currentView = isLeftPicker ? leftCurrentView : rightCurrentView;
  28054. const currentViewRef = isLeftPicker ? leftCurrentViewRef : rightCurrentViewRef;
  28055. if (mode === "year") startDate.value = getValidDateOfYear(startDate.value.year(value), lang.value, disabledDate);
  28056. if (mode === "month") startDate.value = getValidDateOfMonth(startDate.value, startDate.value.year(), value, lang.value, disabledDate);
  28057. if (!props.unlinkPanels) endDate.value = pickerType === "left" ? startDate.value.add(1, "month") : startDate.value.subtract(1, "month");
  28058. currentView.value = mode === "year" ? "month" : "date";
  28059. await nextTick();
  28060. focusPicker(currentViewRef.value);
  28061. handlePanelChange(mode);
  28062. }
  28063. function handlePanelChange(mode) {
  28064. emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode);
  28065. }
  28066. function adjustDateByView(currentView, date, forward) {
  28067. const action = forward ? "add" : "subtract";
  28068. return currentView === "year" ? date[action](10, "year") : date[action](1, "year");
  28069. }
  28070. return {
  28071. leftCurrentView,
  28072. rightCurrentView,
  28073. leftCurrentViewRef,
  28074. rightCurrentViewRef,
  28075. leftYear,
  28076. rightYear,
  28077. leftMonth,
  28078. rightMonth,
  28079. leftYearLabel: computed(() => computedYearLabel(leftCurrentView, leftYear)),
  28080. rightYearLabel: computed(() => computedYearLabel(rightCurrentView, rightYear)),
  28081. showLeftPicker: (view) => showPicker("left", view),
  28082. showRightPicker: (view) => showPicker("right", view),
  28083. handleLeftYearPick: (year) => handlePick("year", "left", year),
  28084. handleRightYearPick: (year) => handlePick("year", "right", year),
  28085. handleLeftMonthPick: (month) => handlePick("month", "left", month),
  28086. handleRightMonthPick: (month) => handlePick("month", "right", month),
  28087. handlePanelChange,
  28088. adjustDateByView
  28089. };
  28090. };
  28091. //#endregion
  28092. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs
  28093. var _hoisted_1$46 = ["disabled", "onClick"];
  28094. var _hoisted_2$28 = ["aria-label", "disabled"];
  28095. var _hoisted_3$13 = ["aria-label", "disabled"];
  28096. var _hoisted_4$10 = ["disabled", "aria-label"];
  28097. var _hoisted_5$7 = ["disabled", "aria-label"];
  28098. var _hoisted_6$2 = ["tabindex", "aria-disabled"];
  28099. var _hoisted_7$1 = ["tabindex", "aria-disabled"];
  28100. var _hoisted_8$1 = ["disabled", "aria-label"];
  28101. var _hoisted_9$1 = ["disabled", "aria-label"];
  28102. var _hoisted_10$1 = ["aria-label", "disabled"];
  28103. var _hoisted_11$1 = ["disabled", "aria-label"];
  28104. var _hoisted_12$1 = ["tabindex", "aria-disabled"];
  28105. var _hoisted_13$1 = ["tabindex", "aria-disabled"];
  28106. var unit$2 = "month";
  28107. //#endregion
  28108. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs
  28109. var panel_date_range_default = /* @__PURE__ */ defineComponent({
  28110. __name: "panel-date-range",
  28111. props: panelDateRangeProps,
  28112. emits: [
  28113. "pick",
  28114. "set-picker-option",
  28115. "calendar-change",
  28116. "panel-change",
  28117. "clear"
  28118. ],
  28119. setup(__props, { emit: __emit }) {
  28120. const props = __props;
  28121. const emit = __emit;
  28122. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  28123. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  28124. const { disabledDate, cellClassName, defaultTime, clearable } = pickerBase.props;
  28125. const format = toRef(pickerBase.props, "format");
  28126. const shortcuts = toRef(pickerBase.props, "shortcuts");
  28127. const defaultValue = toRef(pickerBase.props, "defaultValue");
  28128. const { lang } = useLocale();
  28129. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  28130. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$2));
  28131. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue, t } = useRangePicker(props, {
  28132. defaultValue,
  28133. defaultTime,
  28134. leftDate,
  28135. rightDate,
  28136. unit: unit$2,
  28137. sortDates
  28138. });
  28139. watch(() => props.visible, (visible) => {
  28140. if (!visible && rangeState.value.selecting) {
  28141. parseValue(props.parsedValue);
  28142. onSelect(false);
  28143. }
  28144. });
  28145. const dateUserInput = ref({
  28146. min: null,
  28147. max: null
  28148. });
  28149. const timeUserInput = ref({
  28150. min: null,
  28151. max: null
  28152. });
  28153. const { leftCurrentView, rightCurrentView, leftCurrentViewRef, rightCurrentViewRef, leftYear, rightYear, leftMonth, rightMonth, leftYearLabel, rightYearLabel, showLeftPicker, showRightPicker, handleLeftYearPick, handleRightYearPick, handleLeftMonthPick, handleRightMonthPick, handlePanelChange, adjustDateByView } = usePanelDateRange(props, emit, leftDate, rightDate);
  28154. const hasShortcuts = computed(() => !!shortcuts.value.length);
  28155. const minVisibleDate = computed(() => {
  28156. if (dateUserInput.value.min !== null) return dateUserInput.value.min;
  28157. if (minDate.value) return minDate.value.format(dateFormat.value);
  28158. return "";
  28159. });
  28160. const maxVisibleDate = computed(() => {
  28161. if (dateUserInput.value.max !== null) return dateUserInput.value.max;
  28162. if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(dateFormat.value);
  28163. return "";
  28164. });
  28165. const minVisibleTime = computed(() => {
  28166. if (timeUserInput.value.min !== null) return timeUserInput.value.min;
  28167. if (minDate.value) return minDate.value.format(timeFormat.value);
  28168. return "";
  28169. });
  28170. const maxVisibleTime = computed(() => {
  28171. if (timeUserInput.value.max !== null) return timeUserInput.value.max;
  28172. if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(timeFormat.value);
  28173. return "";
  28174. });
  28175. const timeFormat = computed(() => {
  28176. return props.timeFormat || extractTimeFormat(format.value || "") || "HH:mm:ss";
  28177. });
  28178. const dateFormat = computed(() => {
  28179. return props.dateFormat || extractDateFormat(format.value || "") || "YYYY-MM-DD";
  28180. });
  28181. const isValidValue = (date) => {
  28182. return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
  28183. };
  28184. const leftPrevYear = () => {
  28185. leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, false);
  28186. if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
  28187. handlePanelChange("year");
  28188. };
  28189. const leftPrevMonth = () => {
  28190. leftDate.value = leftDate.value.subtract(1, "month");
  28191. if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
  28192. handlePanelChange("month");
  28193. };
  28194. const rightNextYear = () => {
  28195. if (!props.unlinkPanels) {
  28196. leftDate.value = adjustDateByView(rightCurrentView.value, leftDate.value, true);
  28197. rightDate.value = leftDate.value.add(1, "month");
  28198. } else rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, true);
  28199. handlePanelChange("year");
  28200. };
  28201. const rightNextMonth = () => {
  28202. if (!props.unlinkPanels) {
  28203. leftDate.value = leftDate.value.add(1, "month");
  28204. rightDate.value = leftDate.value.add(1, "month");
  28205. } else rightDate.value = rightDate.value.add(1, "month");
  28206. handlePanelChange("month");
  28207. };
  28208. const leftNextYear = () => {
  28209. leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, true);
  28210. handlePanelChange("year");
  28211. };
  28212. const leftNextMonth = () => {
  28213. leftDate.value = leftDate.value.add(1, "month");
  28214. handlePanelChange("month");
  28215. };
  28216. const rightPrevYear = () => {
  28217. rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, false);
  28218. handlePanelChange("year");
  28219. };
  28220. const rightPrevMonth = () => {
  28221. rightDate.value = rightDate.value.subtract(1, "month");
  28222. handlePanelChange("month");
  28223. };
  28224. const enableMonthArrow = computed(() => {
  28225. const nextMonth = (leftMonth.value + 1) % 12;
  28226. const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0;
  28227. return props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value);
  28228. });
  28229. const enableYearArrow = computed(() => {
  28230. return props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12;
  28231. });
  28232. const dateRangeDisabled = useFormDisabled();
  28233. const btnDisabled = computed(() => {
  28234. return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange([minDate.value, maxDate.value]) && !dateRangeDisabled.value);
  28235. });
  28236. const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
  28237. const formatEmit = (emitDayjs, index) => {
  28238. if (!emitDayjs) return;
  28239. if (defaultTime) return (0, import_dayjs_min.default)(defaultTime[index] || defaultTime).locale(lang.value).year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  28240. return emitDayjs;
  28241. };
  28242. const handleRangePick = (val, close = true) => {
  28243. const min_ = val.minDate;
  28244. const max_ = val.maxDate;
  28245. const minDate_ = formatEmit(min_, 0);
  28246. const maxDate_ = formatEmit(max_, 1);
  28247. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  28248. emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]);
  28249. maxDate.value = maxDate_;
  28250. minDate.value = minDate_;
  28251. if (!showTime.value && close) close = !minDate_ || !maxDate_;
  28252. handleRangeConfirm(close);
  28253. };
  28254. const minTimePickerVisible = ref(false);
  28255. const maxTimePickerVisible = ref(false);
  28256. const handleMinTimeClose = () => {
  28257. minTimePickerVisible.value = false;
  28258. };
  28259. const handleMaxTimeClose = () => {
  28260. maxTimePickerVisible.value = false;
  28261. };
  28262. const handleDateInput = (value, type) => {
  28263. dateUserInput.value[type] = value;
  28264. const parsedValueD = (0, import_dayjs_min.default)(value, dateFormat.value).locale(lang.value);
  28265. if (parsedValueD.isValid()) {
  28266. if (disabledDate && disabledDate(parsedValueD.toDate())) return;
  28267. if (type === "min") {
  28268. leftDate.value = parsedValueD;
  28269. minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  28270. if (!props.unlinkPanels && (!maxDate.value || maxDate.value.isBefore(minDate.value))) {
  28271. rightDate.value = parsedValueD.add(1, "month");
  28272. maxDate.value = minDate.value.add(1, "month");
  28273. }
  28274. } else {
  28275. rightDate.value = parsedValueD;
  28276. maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  28277. if (!props.unlinkPanels && (!minDate.value || minDate.value.isAfter(maxDate.value))) {
  28278. leftDate.value = parsedValueD.subtract(1, "month");
  28279. minDate.value = maxDate.value.subtract(1, "month");
  28280. }
  28281. }
  28282. sortDates(minDate.value, maxDate.value);
  28283. handleRangeConfirm(true);
  28284. }
  28285. };
  28286. const handleDateChange = (_, type) => {
  28287. dateUserInput.value[type] = null;
  28288. };
  28289. const handleTimeInput = (value, type) => {
  28290. timeUserInput.value[type] = value;
  28291. const parsedValueD = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
  28292. if (parsedValueD.isValid()) if (type === "min") {
  28293. minTimePickerVisible.value = true;
  28294. minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  28295. leftDate.value = minDate.value;
  28296. } else {
  28297. maxTimePickerVisible.value = true;
  28298. maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  28299. rightDate.value = maxDate.value;
  28300. }
  28301. };
  28302. const handleTimeChange = (_value, type) => {
  28303. timeUserInput.value[type] = null;
  28304. if (type === "min") {
  28305. leftDate.value = minDate.value;
  28306. minTimePickerVisible.value = false;
  28307. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) maxDate.value = minDate.value;
  28308. } else {
  28309. rightDate.value = maxDate.value;
  28310. maxTimePickerVisible.value = false;
  28311. if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
  28312. }
  28313. handleRangeConfirm(true);
  28314. };
  28315. const handleMinTimePick = (value, visible, first) => {
  28316. if (timeUserInput.value.min) return;
  28317. if (value) minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  28318. if (!first) minTimePickerVisible.value = visible;
  28319. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
  28320. maxDate.value = minDate.value;
  28321. rightDate.value = value;
  28322. nextTick(() => {
  28323. parseValue(props.parsedValue);
  28324. });
  28325. }
  28326. handleRangeConfirm(true);
  28327. };
  28328. const handleMaxTimePick = (value, visible, first) => {
  28329. if (timeUserInput.value.max) return;
  28330. if (value) maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  28331. if (!first) maxTimePickerVisible.value = visible;
  28332. if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
  28333. handleRangeConfirm(true);
  28334. };
  28335. const onClear = () => {
  28336. handleClear();
  28337. emit("clear");
  28338. };
  28339. const handleClear = () => {
  28340. let valueOnClear = null;
  28341. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  28342. leftDate.value = getDefaultValue(unref(defaultValue), {
  28343. lang: unref(lang),
  28344. unit: "month",
  28345. unlinkPanels: props.unlinkPanels
  28346. })[0];
  28347. rightDate.value = leftDate.value.add(1, "month");
  28348. maxDate.value = void 0;
  28349. minDate.value = void 0;
  28350. handleRangeConfirm(true);
  28351. emit("pick", valueOnClear);
  28352. };
  28353. const parseUserInput = (value) => {
  28354. return correctlyParseUserInput(value, format.value || "", lang.value, isDefaultFormat);
  28355. };
  28356. function sortDates(minDate, maxDate) {
  28357. if (props.unlinkPanels && maxDate) {
  28358. const minDateYear = minDate?.year() || 0;
  28359. const minDateMonth = minDate?.month() || 0;
  28360. const maxDateYear = maxDate.year();
  28361. const maxDateMonth = maxDate.month();
  28362. rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate.add(1, unit$2) : maxDate;
  28363. } else {
  28364. rightDate.value = leftDate.value.add(1, unit$2);
  28365. if (maxDate) rightDate.value = rightDate.value.hour(maxDate.hour()).minute(maxDate.minute()).second(maxDate.second());
  28366. }
  28367. }
  28368. emit("set-picker-option", ["isValidValue", isValidValue]);
  28369. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  28370. emit("set-picker-option", ["handleClear", handleClear]);
  28371. return (_ctx, _cache) => {
  28372. return openBlock(), createElementBlock("div", { class: normalizeClass([
  28373. unref(ppNs).b(),
  28374. unref(drpNs).b(),
  28375. unref(ppNs).is("border", _ctx.border),
  28376. unref(ppNs).is("disabled", unref(dateRangeDisabled)),
  28377. {
  28378. "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
  28379. "has-time": showTime.value
  28380. }
  28381. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  28382. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  28383. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  28384. key: 0,
  28385. class: normalizeClass(unref(ppNs).e("sidebar"))
  28386. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(shortcuts.value, (shortcut, key) => {
  28387. return openBlock(), createElementBlock("button", {
  28388. key,
  28389. type: "button",
  28390. disabled: unref(dateRangeDisabled),
  28391. class: normalizeClass(unref(ppNs).e("shortcut")),
  28392. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  28393. }, toDisplayString(shortcut.text), 11, _hoisted_1$46);
  28394. }), 128))], 2)) : createCommentVNode("v-if", true),
  28395. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
  28396. showTime.value ? (openBlock(), createElementBlock("div", {
  28397. key: 0,
  28398. class: normalizeClass(unref(drpNs).e("time-header"))
  28399. }, [
  28400. createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("editors-wrap")) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  28401. size: "small",
  28402. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  28403. placeholder: unref(t)("el.datepicker.startDate"),
  28404. class: normalizeClass(unref(drpNs).e("editor")),
  28405. "model-value": minVisibleDate.value,
  28406. "validate-event": false,
  28407. readonly: !_ctx.editable,
  28408. onInput: _cache[0] || (_cache[0] = (val) => handleDateInput(val, "min")),
  28409. onChange: _cache[1] || (_cache[1] = (val) => handleDateChange(val, "min"))
  28410. }, null, 8, [
  28411. "disabled",
  28412. "placeholder",
  28413. "class",
  28414. "model-value",
  28415. "readonly"
  28416. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  28417. size: "small",
  28418. class: normalizeClass(unref(drpNs).e("editor")),
  28419. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  28420. placeholder: unref(t)("el.datepicker.startTime"),
  28421. "model-value": minVisibleTime.value,
  28422. "validate-event": false,
  28423. readonly: !_ctx.editable,
  28424. onFocus: _cache[2] || (_cache[2] = ($event) => minTimePickerVisible.value = true),
  28425. onInput: _cache[3] || (_cache[3] = (val) => handleTimeInput(val, "min")),
  28426. onChange: _cache[4] || (_cache[4] = (val) => handleTimeChange(val, "min"))
  28427. }, null, 8, [
  28428. "class",
  28429. "disabled",
  28430. "placeholder",
  28431. "model-value",
  28432. "readonly"
  28433. ]), createVNode(unref(panel_time_pick_default), {
  28434. visible: minTimePickerVisible.value,
  28435. format: timeFormat.value,
  28436. "datetime-role": "start",
  28437. "parsed-value": unref(minDate) || leftDate.value,
  28438. onPick: handleMinTimePick
  28439. }, null, 8, [
  28440. "visible",
  28441. "format",
  28442. "parsed-value"
  28443. ])], 2)), [[unref(ClickOutside), handleMinTimeClose]])], 2),
  28444. createBaseVNode("span", null, [createVNode(unref(ElIcon), null, {
  28445. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  28446. _: 1
  28447. })]),
  28448. createBaseVNode("span", { class: normalizeClass([unref(drpNs).e("editors-wrap"), "is-right"]) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  28449. size: "small",
  28450. class: normalizeClass(unref(drpNs).e("editor")),
  28451. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  28452. placeholder: unref(t)("el.datepicker.endDate"),
  28453. "model-value": maxVisibleDate.value,
  28454. readonly: !unref(minDate) || !_ctx.editable,
  28455. "validate-event": false,
  28456. onInput: _cache[5] || (_cache[5] = (val) => handleDateInput(val, "max")),
  28457. onChange: _cache[6] || (_cache[6] = (val) => handleDateChange(val, "max"))
  28458. }, null, 8, [
  28459. "class",
  28460. "disabled",
  28461. "placeholder",
  28462. "model-value",
  28463. "readonly"
  28464. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  28465. size: "small",
  28466. class: normalizeClass(unref(drpNs).e("editor")),
  28467. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  28468. placeholder: unref(t)("el.datepicker.endTime"),
  28469. "model-value": maxVisibleTime.value,
  28470. readonly: !unref(minDate) || !_ctx.editable,
  28471. "validate-event": false,
  28472. onFocus: _cache[7] || (_cache[7] = ($event) => unref(minDate) && (maxTimePickerVisible.value = true)),
  28473. onInput: _cache[8] || (_cache[8] = (val) => handleTimeInput(val, "max")),
  28474. onChange: _cache[9] || (_cache[9] = (val) => handleTimeChange(val, "max"))
  28475. }, null, 8, [
  28476. "class",
  28477. "disabled",
  28478. "placeholder",
  28479. "model-value",
  28480. "readonly"
  28481. ]), createVNode(unref(panel_time_pick_default), {
  28482. "datetime-role": "end",
  28483. visible: maxTimePickerVisible.value,
  28484. format: timeFormat.value,
  28485. "parsed-value": unref(maxDate) || rightDate.value,
  28486. onPick: handleMaxTimePick
  28487. }, null, 8, [
  28488. "visible",
  28489. "format",
  28490. "parsed-value"
  28491. ])], 2)), [[unref(ClickOutside), handleMaxTimeClose]])], 2)
  28492. ], 2)) : createCommentVNode("v-if", true),
  28493. createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) }, [
  28494. createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  28495. createBaseVNode("button", {
  28496. type: "button",
  28497. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  28498. "aria-label": unref(t)(`el.datepicker.prevYear`),
  28499. disabled: unref(dateRangeDisabled),
  28500. onClick: leftPrevYear
  28501. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  28502. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  28503. _: 1
  28504. })])], 10, _hoisted_2$28),
  28505. withDirectives(createBaseVNode("button", {
  28506. type: "button",
  28507. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  28508. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  28509. disabled: unref(dateRangeDisabled),
  28510. onClick: leftPrevMonth
  28511. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  28512. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  28513. _: 1
  28514. })])], 10, _hoisted_3$13), [[vShow, unref(leftCurrentView) === "date"]]),
  28515. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  28516. key: 0,
  28517. type: "button",
  28518. disabled: !enableYearArrow.value || unref(dateRangeDisabled),
  28519. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-right"]),
  28520. "aria-label": unref(t)(`el.datepicker.nextYear`),
  28521. onClick: leftNextYear
  28522. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  28523. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  28524. _: 1
  28525. })])], 10, _hoisted_4$10)) : createCommentVNode("v-if", true),
  28526. _ctx.unlinkPanels && unref(leftCurrentView) === "date" ? (openBlock(), createElementBlock("button", {
  28527. key: 1,
  28528. type: "button",
  28529. disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
  28530. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-right"]),
  28531. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  28532. onClick: leftNextMonth
  28533. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  28534. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  28535. _: 1
  28536. })])], 10, _hoisted_5$7)) : createCommentVNode("v-if", true),
  28537. createBaseVNode("div", null, [createBaseVNode("span", {
  28538. role: "button",
  28539. class: normalizeClass(unref(drpNs).e("header-label")),
  28540. "aria-live": "polite",
  28541. tabindex: _ctx.disabled ? void 0 : 0,
  28542. "aria-disabled": _ctx.disabled,
  28543. onKeydown: _cache[10] || (_cache[10] = withKeys(($event) => unref(showLeftPicker)("year"), ["enter"])),
  28544. onClick: _cache[11] || (_cache[11] = ($event) => unref(showLeftPicker)("year"))
  28545. }, toDisplayString(unref(leftYearLabel)), 43, _hoisted_6$2), withDirectives(createBaseVNode("span", {
  28546. role: "button",
  28547. "aria-live": "polite",
  28548. tabindex: _ctx.disabled ? void 0 : 0,
  28549. "aria-disabled": _ctx.disabled,
  28550. class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(leftCurrentView) === "month" }]),
  28551. onKeydown: _cache[12] || (_cache[12] = withKeys(($event) => unref(showLeftPicker)("month"), ["enter"])),
  28552. onClick: _cache[13] || (_cache[13] = ($event) => unref(showLeftPicker)("month"))
  28553. }, toDisplayString(unref(t)(`el.datepicker.month${leftDate.value.month() + 1}`)), 43, _hoisted_7$1), [[vShow, unref(leftCurrentView) === "date"]])])
  28554. ], 2),
  28555. unref(leftCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  28556. key: 0,
  28557. ref_key: "leftCurrentViewRef",
  28558. ref: leftCurrentViewRef,
  28559. "selection-mode": "range",
  28560. date: leftDate.value,
  28561. "min-date": unref(minDate),
  28562. "max-date": unref(maxDate),
  28563. "range-state": unref(rangeState),
  28564. "disabled-date": unref(disabledDate),
  28565. "cell-class-name": unref(cellClassName),
  28566. "show-week-number": _ctx.showWeekNumber,
  28567. disabled: unref(dateRangeDisabled),
  28568. onChangerange: unref(handleChangeRange),
  28569. onPick: handleRangePick,
  28570. onSelect: unref(onSelect)
  28571. }, null, 8, [
  28572. "date",
  28573. "min-date",
  28574. "max-date",
  28575. "range-state",
  28576. "disabled-date",
  28577. "cell-class-name",
  28578. "show-week-number",
  28579. "disabled",
  28580. "onChangerange",
  28581. "onSelect"
  28582. ])) : createCommentVNode("v-if", true),
  28583. unref(leftCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  28584. key: 1,
  28585. ref_key: "leftCurrentViewRef",
  28586. ref: leftCurrentViewRef,
  28587. "selection-mode": "year",
  28588. date: leftDate.value,
  28589. "disabled-date": unref(disabledDate),
  28590. "parsed-value": _ctx.parsedValue,
  28591. disabled: unref(dateRangeDisabled),
  28592. onPick: unref(handleLeftYearPick)
  28593. }, null, 8, [
  28594. "date",
  28595. "disabled-date",
  28596. "parsed-value",
  28597. "disabled",
  28598. "onPick"
  28599. ])) : createCommentVNode("v-if", true),
  28600. unref(leftCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  28601. key: 2,
  28602. ref_key: "leftCurrentViewRef",
  28603. ref: leftCurrentViewRef,
  28604. "selection-mode": "month",
  28605. date: leftDate.value,
  28606. "parsed-value": _ctx.parsedValue,
  28607. "disabled-date": unref(disabledDate),
  28608. disabled: unref(dateRangeDisabled),
  28609. onPick: unref(handleLeftMonthPick)
  28610. }, null, 8, [
  28611. "date",
  28612. "parsed-value",
  28613. "disabled-date",
  28614. "disabled",
  28615. "onPick"
  28616. ])) : createCommentVNode("v-if", true)
  28617. ], 2),
  28618. createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) }, [
  28619. createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  28620. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  28621. key: 0,
  28622. type: "button",
  28623. disabled: !enableYearArrow.value || unref(dateRangeDisabled),
  28624. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-left"]),
  28625. "aria-label": unref(t)(`el.datepicker.prevYear`),
  28626. onClick: rightPrevYear
  28627. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  28628. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  28629. _: 1
  28630. })])], 10, _hoisted_8$1)) : createCommentVNode("v-if", true),
  28631. _ctx.unlinkPanels && unref(rightCurrentView) === "date" ? (openBlock(), createElementBlock("button", {
  28632. key: 1,
  28633. type: "button",
  28634. disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
  28635. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-left"]),
  28636. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  28637. onClick: rightPrevMonth
  28638. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  28639. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  28640. _: 1
  28641. })])], 10, _hoisted_9$1)) : createCommentVNode("v-if", true),
  28642. createBaseVNode("button", {
  28643. type: "button",
  28644. "aria-label": unref(t)(`el.datepicker.nextYear`),
  28645. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  28646. disabled: unref(dateRangeDisabled),
  28647. onClick: rightNextYear
  28648. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  28649. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  28650. _: 1
  28651. })])], 10, _hoisted_10$1),
  28652. withDirectives(createBaseVNode("button", {
  28653. type: "button",
  28654. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  28655. disabled: unref(dateRangeDisabled),
  28656. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  28657. onClick: rightNextMonth
  28658. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  28659. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  28660. _: 1
  28661. })])], 10, _hoisted_11$1), [[vShow, unref(rightCurrentView) === "date"]]),
  28662. createBaseVNode("div", null, [createBaseVNode("span", {
  28663. role: "button",
  28664. class: normalizeClass(unref(drpNs).e("header-label")),
  28665. "aria-live": "polite",
  28666. tabindex: _ctx.disabled ? void 0 : 0,
  28667. "aria-disabled": _ctx.disabled,
  28668. onKeydown: _cache[14] || (_cache[14] = withKeys(($event) => unref(showRightPicker)("year"), ["enter"])),
  28669. onClick: _cache[15] || (_cache[15] = ($event) => unref(showRightPicker)("year"))
  28670. }, toDisplayString(unref(rightYearLabel)), 43, _hoisted_12$1), withDirectives(createBaseVNode("span", {
  28671. role: "button",
  28672. "aria-live": "polite",
  28673. tabindex: _ctx.disabled ? void 0 : 0,
  28674. "aria-disabled": _ctx.disabled,
  28675. class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(rightCurrentView) === "month" }]),
  28676. onKeydown: _cache[16] || (_cache[16] = withKeys(($event) => unref(showRightPicker)("month"), ["enter"])),
  28677. onClick: _cache[17] || (_cache[17] = ($event) => unref(showRightPicker)("month"))
  28678. }, toDisplayString(unref(t)(`el.datepicker.month${rightDate.value.month() + 1}`)), 43, _hoisted_13$1), [[vShow, unref(rightCurrentView) === "date"]])])
  28679. ], 2),
  28680. unref(rightCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  28681. key: 0,
  28682. ref_key: "rightCurrentViewRef",
  28683. ref: rightCurrentViewRef,
  28684. "selection-mode": "range",
  28685. date: rightDate.value,
  28686. "min-date": unref(minDate),
  28687. "max-date": unref(maxDate),
  28688. "range-state": unref(rangeState),
  28689. "disabled-date": unref(disabledDate),
  28690. "cell-class-name": unref(cellClassName),
  28691. "show-week-number": _ctx.showWeekNumber,
  28692. disabled: unref(dateRangeDisabled),
  28693. onChangerange: unref(handleChangeRange),
  28694. onPick: handleRangePick,
  28695. onSelect: unref(onSelect)
  28696. }, null, 8, [
  28697. "date",
  28698. "min-date",
  28699. "max-date",
  28700. "range-state",
  28701. "disabled-date",
  28702. "cell-class-name",
  28703. "show-week-number",
  28704. "disabled",
  28705. "onChangerange",
  28706. "onSelect"
  28707. ])) : createCommentVNode("v-if", true),
  28708. unref(rightCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  28709. key: 1,
  28710. ref_key: "rightCurrentViewRef",
  28711. ref: rightCurrentViewRef,
  28712. "selection-mode": "year",
  28713. date: rightDate.value,
  28714. "disabled-date": unref(disabledDate),
  28715. "parsed-value": _ctx.parsedValue,
  28716. disabled: unref(dateRangeDisabled),
  28717. onPick: unref(handleRightYearPick)
  28718. }, null, 8, [
  28719. "date",
  28720. "disabled-date",
  28721. "parsed-value",
  28722. "disabled",
  28723. "onPick"
  28724. ])) : createCommentVNode("v-if", true),
  28725. unref(rightCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  28726. key: 2,
  28727. ref_key: "rightCurrentViewRef",
  28728. ref: rightCurrentViewRef,
  28729. "selection-mode": "month",
  28730. date: rightDate.value,
  28731. "parsed-value": _ctx.parsedValue,
  28732. "disabled-date": unref(disabledDate),
  28733. disabled: unref(dateRangeDisabled),
  28734. onPick: unref(handleRightMonthPick)
  28735. }, null, 8, [
  28736. "date",
  28737. "parsed-value",
  28738. "disabled-date",
  28739. "disabled",
  28740. "onPick"
  28741. ])) : createCommentVNode("v-if", true)
  28742. ], 2)
  28743. ], 2)
  28744. ], 2), _ctx.showFooter && showTime.value && (_ctx.showConfirm || unref(clearable)) ? (openBlock(), createElementBlock("div", {
  28745. key: 0,
  28746. class: normalizeClass(unref(ppNs).e("footer"))
  28747. }, [unref(clearable) ? (openBlock(), createBlock(unref(ElButton), {
  28748. key: 0,
  28749. text: "",
  28750. size: "small",
  28751. class: normalizeClass(unref(ppNs).e("link-btn")),
  28752. onClick: onClear
  28753. }, {
  28754. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.clear")), 1)]),
  28755. _: 1
  28756. }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
  28757. key: 1,
  28758. plain: "",
  28759. size: "small",
  28760. class: normalizeClass(unref(ppNs).e("link-btn")),
  28761. disabled: btnDisabled.value,
  28762. onClick: _cache[18] || (_cache[18] = ($event) => unref(handleRangeConfirm)(false))
  28763. }, {
  28764. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
  28765. _: 1
  28766. }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
  28767. };
  28768. }
  28769. });
  28770. //#endregion
  28771. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-month-range.mjs
  28772. var panelMonthRangeProps = buildProps({ ...panelRangeSharedProps });
  28773. var panelMonthRangeEmits = [
  28774. "pick",
  28775. "set-picker-option",
  28776. "calendar-change"
  28777. ];
  28778. //#endregion
  28779. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-month-range-header.mjs
  28780. var useMonthRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
  28781. const { t } = useLocale();
  28782. const leftPrevYear = () => {
  28783. leftDate.value = leftDate.value.subtract(1, "year");
  28784. if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(1, "year");
  28785. };
  28786. const rightNextYear = () => {
  28787. if (!unlinkPanels.value) leftDate.value = leftDate.value.add(1, "year");
  28788. rightDate.value = rightDate.value.add(1, "year");
  28789. };
  28790. const leftNextYear = () => {
  28791. leftDate.value = leftDate.value.add(1, "year");
  28792. };
  28793. const rightPrevYear = () => {
  28794. rightDate.value = rightDate.value.subtract(1, "year");
  28795. };
  28796. return {
  28797. leftPrevYear,
  28798. rightNextYear,
  28799. leftNextYear,
  28800. rightPrevYear,
  28801. leftLabel: computed(() => {
  28802. return `${leftDate.value.year()} ${t("el.datepicker.year")}`;
  28803. }),
  28804. rightLabel: computed(() => {
  28805. return `${rightDate.value.year()} ${t("el.datepicker.year")}`;
  28806. }),
  28807. leftYear: computed(() => {
  28808. return leftDate.value.year();
  28809. }),
  28810. rightYear: computed(() => {
  28811. return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();
  28812. })
  28813. };
  28814. };
  28815. //#endregion
  28816. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue_vue_type_script_setup_true_lang.mjs
  28817. var _hoisted_1$45 = ["disabled", "onClick"];
  28818. var _hoisted_2$27 = ["disabled"];
  28819. var _hoisted_3$12 = ["disabled"];
  28820. var _hoisted_4$9 = ["disabled"];
  28821. var _hoisted_5$6 = ["disabled"];
  28822. var unit$1 = "year";
  28823. //#endregion
  28824. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs
  28825. var panel_month_range_default = /* @__PURE__ */ defineComponent({
  28826. name: "DatePickerMonthRange",
  28827. __name: "panel-month-range",
  28828. props: panelMonthRangeProps,
  28829. emits: panelMonthRangeEmits,
  28830. setup(__props, { emit: __emit }) {
  28831. const props = __props;
  28832. const emit = __emit;
  28833. const { lang } = useLocale();
  28834. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  28835. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  28836. const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
  28837. const format = toRef(pickerBase.props, "format");
  28838. const defaultValue = toRef(pickerBase.props, "defaultValue");
  28839. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  28840. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$1));
  28841. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
  28842. defaultValue,
  28843. leftDate,
  28844. rightDate,
  28845. unit: unit$1,
  28846. sortDates
  28847. });
  28848. const hasShortcuts = computed(() => !!shortcuts.length);
  28849. const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useMonthRangeHeader({
  28850. unlinkPanels: toRef(props, "unlinkPanels"),
  28851. leftDate,
  28852. rightDate
  28853. });
  28854. const enableYearArrow = computed(() => {
  28855. return props.unlinkPanels && rightYear.value > leftYear.value + 1;
  28856. });
  28857. const handleRangePick = (val, close = true) => {
  28858. const minDate_ = val.minDate;
  28859. const maxDate_ = val.maxDate;
  28860. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  28861. emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
  28862. maxDate.value = maxDate_;
  28863. minDate.value = minDate_;
  28864. if (!close) return;
  28865. handleRangeConfirm();
  28866. };
  28867. const handleClear = () => {
  28868. let valueOnClear = null;
  28869. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  28870. leftDate.value = getDefaultValue(unref(defaultValue), {
  28871. lang: unref(lang),
  28872. unit: "year",
  28873. unlinkPanels: props.unlinkPanels
  28874. })[0];
  28875. rightDate.value = leftDate.value.add(1, "year");
  28876. emit("pick", valueOnClear);
  28877. };
  28878. const parseUserInput = (value) => {
  28879. return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
  28880. };
  28881. function sortDates(minDate, maxDate) {
  28882. if (props.unlinkPanels && maxDate) rightDate.value = (minDate?.year() || 0) === maxDate.year() ? maxDate.add(1, unit$1) : maxDate;
  28883. else rightDate.value = leftDate.value.add(1, unit$1);
  28884. }
  28885. const monthRangeDisabled = useFormDisabled();
  28886. watch(() => props.visible, (visible) => {
  28887. if (!visible && rangeState.value.selecting) {
  28888. parseValue(props.parsedValue);
  28889. onSelect(false);
  28890. }
  28891. });
  28892. emit("set-picker-option", ["isValidValue", isValidRange]);
  28893. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  28894. emit("set-picker-option", ["handleClear", handleClear]);
  28895. return (_ctx, _cache) => {
  28896. return openBlock(), createElementBlock("div", { class: normalizeClass([
  28897. unref(ppNs).b(),
  28898. unref(drpNs).b(),
  28899. unref(ppNs).is("border", _ctx.border),
  28900. unref(ppNs).is("disabled", unref(monthRangeDisabled)),
  28901. { "has-sidebar": Boolean(_ctx.$slots.sidebar) || hasShortcuts.value }
  28902. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  28903. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  28904. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  28905. key: 0,
  28906. class: normalizeClass(unref(ppNs).e("sidebar"))
  28907. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  28908. return openBlock(), createElementBlock("button", {
  28909. key,
  28910. type: "button",
  28911. class: normalizeClass(unref(ppNs).e("shortcut")),
  28912. disabled: unref(monthRangeDisabled),
  28913. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  28914. }, toDisplayString(shortcut.text), 11, _hoisted_1$45);
  28915. }), 128))], 2)) : createCommentVNode("v-if", true),
  28916. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  28917. createBaseVNode("button", {
  28918. type: "button",
  28919. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  28920. disabled: unref(monthRangeDisabled),
  28921. onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
  28922. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  28923. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  28924. _: 1
  28925. })])], 10, _hoisted_2$27),
  28926. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  28927. key: 0,
  28928. type: "button",
  28929. disabled: !enableYearArrow.value || unref(monthRangeDisabled),
  28930. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-right"]),
  28931. onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
  28932. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  28933. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  28934. _: 1
  28935. })])], 10, _hoisted_3$12)) : createCommentVNode("v-if", true),
  28936. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  28937. ], 2), createVNode(basic_month_table_default, {
  28938. "selection-mode": "range",
  28939. date: leftDate.value,
  28940. "min-date": unref(minDate),
  28941. "max-date": unref(maxDate),
  28942. "range-state": unref(rangeState),
  28943. "disabled-date": unref(disabledDate),
  28944. disabled: unref(monthRangeDisabled),
  28945. "cell-class-name": unref(cellClassName),
  28946. onChangerange: unref(handleChangeRange),
  28947. onPick: handleRangePick,
  28948. onSelect: unref(onSelect)
  28949. }, null, 8, [
  28950. "date",
  28951. "min-date",
  28952. "max-date",
  28953. "range-state",
  28954. "disabled-date",
  28955. "disabled",
  28956. "cell-class-name",
  28957. "onChangerange",
  28958. "onSelect"
  28959. ])], 2), createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  28960. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  28961. key: 0,
  28962. type: "button",
  28963. disabled: !enableYearArrow.value || unref(monthRangeDisabled),
  28964. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-left"]),
  28965. onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
  28966. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  28967. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  28968. _: 1
  28969. })])], 10, _hoisted_4$9)) : createCommentVNode("v-if", true),
  28970. createBaseVNode("button", {
  28971. type: "button",
  28972. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  28973. disabled: unref(monthRangeDisabled),
  28974. onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
  28975. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  28976. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  28977. _: 1
  28978. })])], 10, _hoisted_5$6),
  28979. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  28980. ], 2), createVNode(basic_month_table_default, {
  28981. "selection-mode": "range",
  28982. date: rightDate.value,
  28983. "min-date": unref(minDate),
  28984. "max-date": unref(maxDate),
  28985. "range-state": unref(rangeState),
  28986. "disabled-date": unref(disabledDate),
  28987. disabled: unref(monthRangeDisabled),
  28988. "cell-class-name": unref(cellClassName),
  28989. onChangerange: unref(handleChangeRange),
  28990. onPick: handleRangePick,
  28991. onSelect: unref(onSelect)
  28992. }, null, 8, [
  28993. "date",
  28994. "min-date",
  28995. "max-date",
  28996. "range-state",
  28997. "disabled-date",
  28998. "disabled",
  28999. "cell-class-name",
  29000. "onChangerange",
  29001. "onSelect"
  29002. ])], 2)], 2)
  29003. ], 2)], 2);
  29004. };
  29005. }
  29006. });
  29007. //#endregion
  29008. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-year-range.mjs
  29009. var panelYearRangeProps = buildProps({ ...panelRangeSharedProps });
  29010. var panelYearRangeEmits = [
  29011. "pick",
  29012. "set-picker-option",
  29013. "calendar-change"
  29014. ];
  29015. //#endregion
  29016. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-year-range-header.mjs
  29017. var useYearRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
  29018. const leftPrevYear = () => {
  29019. leftDate.value = leftDate.value.subtract(10, "year");
  29020. if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(10, "year");
  29021. };
  29022. const rightNextYear = () => {
  29023. if (!unlinkPanels.value) leftDate.value = leftDate.value.add(10, "year");
  29024. rightDate.value = rightDate.value.add(10, "year");
  29025. };
  29026. const leftNextYear = () => {
  29027. leftDate.value = leftDate.value.add(10, "year");
  29028. };
  29029. const rightPrevYear = () => {
  29030. rightDate.value = rightDate.value.subtract(10, "year");
  29031. };
  29032. return {
  29033. leftPrevYear,
  29034. rightNextYear,
  29035. leftNextYear,
  29036. rightPrevYear,
  29037. leftLabel: computed(() => {
  29038. const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10;
  29039. return `${leftStartDate}-${leftStartDate + 9}`;
  29040. }),
  29041. rightLabel: computed(() => {
  29042. const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10;
  29043. return `${rightStartDate}-${rightStartDate + 9}`;
  29044. }),
  29045. leftYear: computed(() => {
  29046. return Math.floor(leftDate.value.year() / 10) * 10 + 9;
  29047. }),
  29048. rightYear: computed(() => {
  29049. return Math.floor(rightDate.value.year() / 10) * 10;
  29050. })
  29051. };
  29052. };
  29053. //#endregion
  29054. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue_vue_type_script_setup_true_lang.mjs
  29055. var _hoisted_1$44 = ["disabled", "onClick"];
  29056. var _hoisted_2$26 = ["disabled"];
  29057. var _hoisted_3$11 = ["disabled"];
  29058. var _hoisted_4$8 = ["disabled"];
  29059. var _hoisted_5$5 = ["disabled"];
  29060. var step = 10;
  29061. var unit = "year";
  29062. //#endregion
  29063. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs
  29064. var panel_year_range_default = /* @__PURE__ */ defineComponent({
  29065. name: "DatePickerYearRange",
  29066. __name: "panel-year-range",
  29067. props: panelYearRangeProps,
  29068. emits: panelYearRangeEmits,
  29069. setup(__props, { emit: __emit }) {
  29070. const props = __props;
  29071. const emit = __emit;
  29072. const { lang } = useLocale();
  29073. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  29074. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(step, unit));
  29075. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  29076. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  29077. const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
  29078. const format = toRef(pickerBase.props, "format");
  29079. const defaultValue = toRef(pickerBase.props, "defaultValue");
  29080. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
  29081. defaultValue,
  29082. leftDate,
  29083. rightDate,
  29084. step,
  29085. unit,
  29086. sortDates
  29087. });
  29088. const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useYearRangeHeader({
  29089. unlinkPanels: toRef(props, "unlinkPanels"),
  29090. leftDate,
  29091. rightDate
  29092. });
  29093. const yearRangeDisabled = useFormDisabled();
  29094. const hasShortcuts = computed(() => !!shortcuts.length);
  29095. const panelKls = computed(() => [
  29096. ppNs.b(),
  29097. drpNs.b(),
  29098. ppNs.is("border", props.border),
  29099. ppNs.is("disabled", yearRangeDisabled.value),
  29100. { "has-sidebar": Boolean(useSlots().sidebar) || hasShortcuts.value }
  29101. ]);
  29102. const leftPanelKls = computed(() => {
  29103. return {
  29104. content: [
  29105. ppNs.e("content"),
  29106. drpNs.e("content"),
  29107. "is-left"
  29108. ],
  29109. arrowLeftBtn: [ppNs.e("icon-btn"), "d-arrow-left"],
  29110. arrowRightBtn: [
  29111. ppNs.e("icon-btn"),
  29112. ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
  29113. "d-arrow-right"
  29114. ]
  29115. };
  29116. });
  29117. const rightPanelKls = computed(() => {
  29118. return {
  29119. content: [
  29120. ppNs.e("content"),
  29121. drpNs.e("content"),
  29122. "is-right"
  29123. ],
  29124. arrowLeftBtn: [
  29125. ppNs.e("icon-btn"),
  29126. ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
  29127. "d-arrow-left"
  29128. ],
  29129. arrowRightBtn: [ppNs.e("icon-btn"), "d-arrow-right"]
  29130. };
  29131. });
  29132. const enableYearArrow = computed(() => {
  29133. return props.unlinkPanels && rightYear.value > leftYear.value + 1;
  29134. });
  29135. const handleRangePick = (val, close = true) => {
  29136. const minDate_ = val.minDate;
  29137. const maxDate_ = val.maxDate;
  29138. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  29139. emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
  29140. maxDate.value = maxDate_;
  29141. minDate.value = minDate_;
  29142. if (!close) return;
  29143. handleRangeConfirm();
  29144. };
  29145. const parseUserInput = (value) => {
  29146. return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
  29147. };
  29148. const isValidValue = (date) => {
  29149. return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
  29150. };
  29151. const handleClear = () => {
  29152. let valueOnClear = null;
  29153. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  29154. const defaultArr = getDefaultValue(unref(defaultValue), {
  29155. lang: unref(lang),
  29156. step,
  29157. unit,
  29158. unlinkPanels: props.unlinkPanels
  29159. });
  29160. leftDate.value = defaultArr[0];
  29161. rightDate.value = defaultArr[1];
  29162. emit("pick", valueOnClear);
  29163. };
  29164. function sortDates(minDate, maxDate) {
  29165. if (props.unlinkPanels && maxDate) {
  29166. const minDateYear = minDate?.year() || 0;
  29167. const maxDateYear = maxDate.year();
  29168. rightDate.value = minDateYear + step > maxDateYear ? maxDate.add(step, unit) : maxDate;
  29169. } else rightDate.value = leftDate.value.add(step, unit);
  29170. }
  29171. watch(() => props.visible, (visible) => {
  29172. if (!visible && rangeState.value.selecting) {
  29173. parseValue(props.parsedValue);
  29174. onSelect(false);
  29175. }
  29176. });
  29177. emit("set-picker-option", ["isValidValue", isValidValue]);
  29178. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  29179. emit("set-picker-option", ["handleClear", handleClear]);
  29180. return (_ctx, _cache) => {
  29181. return openBlock(), createElementBlock("div", { class: normalizeClass(panelKls.value) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  29182. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  29183. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  29184. key: 0,
  29185. class: normalizeClass(unref(ppNs).e("sidebar"))
  29186. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  29187. return openBlock(), createElementBlock("button", {
  29188. key,
  29189. type: "button",
  29190. class: normalizeClass(unref(ppNs).e("shortcut")),
  29191. disabled: unref(yearRangeDisabled),
  29192. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  29193. }, toDisplayString(shortcut.text), 11, _hoisted_1$44);
  29194. }), 128))], 2)) : createCommentVNode("v-if", true),
  29195. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass(leftPanelKls.value.content) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  29196. createBaseVNode("button", {
  29197. type: "button",
  29198. class: normalizeClass(leftPanelKls.value.arrowLeftBtn),
  29199. disabled: unref(yearRangeDisabled),
  29200. onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
  29201. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  29202. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  29203. _: 1
  29204. })])], 10, _hoisted_2$26),
  29205. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  29206. key: 0,
  29207. type: "button",
  29208. disabled: !enableYearArrow.value || unref(yearRangeDisabled),
  29209. class: normalizeClass(leftPanelKls.value.arrowRightBtn),
  29210. onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
  29211. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  29212. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  29213. _: 1
  29214. })])], 10, _hoisted_3$11)) : createCommentVNode("v-if", true),
  29215. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  29216. ], 2), createVNode(basic_year_table_default, {
  29217. "selection-mode": "range",
  29218. date: leftDate.value,
  29219. "min-date": unref(minDate),
  29220. "max-date": unref(maxDate),
  29221. "range-state": unref(rangeState),
  29222. "disabled-date": unref(disabledDate),
  29223. disabled: unref(yearRangeDisabled),
  29224. "cell-class-name": unref(cellClassName),
  29225. onChangerange: unref(handleChangeRange),
  29226. onPick: handleRangePick,
  29227. onSelect: unref(onSelect)
  29228. }, null, 8, [
  29229. "date",
  29230. "min-date",
  29231. "max-date",
  29232. "range-state",
  29233. "disabled-date",
  29234. "disabled",
  29235. "cell-class-name",
  29236. "onChangerange",
  29237. "onSelect"
  29238. ])], 2), createBaseVNode("div", { class: normalizeClass(rightPanelKls.value.content) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  29239. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  29240. key: 0,
  29241. type: "button",
  29242. disabled: !enableYearArrow.value || unref(yearRangeDisabled),
  29243. class: normalizeClass(rightPanelKls.value.arrowLeftBtn),
  29244. onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
  29245. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  29246. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  29247. _: 1
  29248. })])], 10, _hoisted_4$8)) : createCommentVNode("v-if", true),
  29249. createBaseVNode("button", {
  29250. type: "button",
  29251. class: normalizeClass(rightPanelKls.value.arrowRightBtn),
  29252. disabled: unref(yearRangeDisabled),
  29253. onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
  29254. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  29255. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  29256. _: 1
  29257. })])], 10, _hoisted_5$5),
  29258. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  29259. ], 2), createVNode(basic_year_table_default, {
  29260. "selection-mode": "range",
  29261. date: rightDate.value,
  29262. "min-date": unref(minDate),
  29263. "max-date": unref(maxDate),
  29264. "range-state": unref(rangeState),
  29265. "disabled-date": unref(disabledDate),
  29266. disabled: unref(yearRangeDisabled),
  29267. "cell-class-name": unref(cellClassName),
  29268. onChangerange: unref(handleChangeRange),
  29269. onPick: handleRangePick,
  29270. onSelect: unref(onSelect)
  29271. }, null, 8, [
  29272. "date",
  29273. "min-date",
  29274. "max-date",
  29275. "range-state",
  29276. "disabled-date",
  29277. "disabled",
  29278. "cell-class-name",
  29279. "onChangerange",
  29280. "onSelect"
  29281. ])], 2)], 2)
  29282. ], 2)], 2);
  29283. };
  29284. }
  29285. });
  29286. //#endregion
  29287. //#region node_modules/element-plus/es/components/date-picker-panel/src/panel-utils.mjs
  29288. var getPanel = function(type) {
  29289. switch (type) {
  29290. case "daterange":
  29291. case "datetimerange": return panel_date_range_default;
  29292. case "monthrange": return panel_month_range_default;
  29293. case "yearrange": return panel_year_range_default;
  29294. default: return panel_date_pick_default;
  29295. }
  29296. };
  29297. //#endregion
  29298. //#region node_modules/dayjs/plugin/advancedFormat.js
  29299. var require_advancedFormat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29300. (function(e, t) {
  29301. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
  29302. })(exports, (function() {
  29303. "use strict";
  29304. return function(e, t) {
  29305. var r = t.prototype, n = r.format;
  29306. r.format = function(e) {
  29307. var t = this, r = this.$locale();
  29308. if (!this.isValid()) return n.bind(this)(e);
  29309. var s = this.$utils(), a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (function(e) {
  29310. switch (e) {
  29311. case "Q": return Math.ceil((t.$M + 1) / 3);
  29312. case "Do": return r.ordinal(t.$D);
  29313. case "gggg": return t.weekYear();
  29314. case "GGGG": return t.isoWeekYear();
  29315. case "wo": return r.ordinal(t.week(), "W");
  29316. case "w":
  29317. case "ww": return s.s(t.week(), "w" === e ? 1 : 2, "0");
  29318. case "W":
  29319. case "WW": return s.s(t.isoWeek(), "W" === e ? 1 : 2, "0");
  29320. case "k":
  29321. case "kk": return s.s(String(0 === t.$H ? 24 : t.$H), "k" === e ? 1 : 2, "0");
  29322. case "X": return Math.floor(t.$d.getTime() / 1e3);
  29323. case "x": return t.$d.getTime();
  29324. case "z": return "[" + t.offsetName() + "]";
  29325. case "zzz": return "[" + t.offsetName("long") + "]";
  29326. default: return e;
  29327. }
  29328. }));
  29329. return n.bind(this)(a);
  29330. };
  29331. };
  29332. }));
  29333. }));
  29334. //#endregion
  29335. //#region node_modules/dayjs/plugin/weekOfYear.js
  29336. var require_weekOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29337. (function(e, t) {
  29338. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t();
  29339. })(exports, (function() {
  29340. "use strict";
  29341. var e = "week", t = "year";
  29342. return function(i, n, r) {
  29343. var f = n.prototype;
  29344. f.week = function(i) {
  29345. if (void 0 === i && (i = null), null !== i) return this.add(7 * (i - this.week()), "day");
  29346. var n = this.$locale().yearStart || 1;
  29347. if (11 === this.month() && this.date() > 25) {
  29348. var f = r(this).startOf(t).add(1, t).date(n), s = r(this).endOf(e);
  29349. if (f.isBefore(s)) return 1;
  29350. }
  29351. var a = r(this).startOf(t).date(n).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, !0);
  29352. return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
  29353. }, f.weeks = function(e) {
  29354. return void 0 === e && (e = null), this.week(e);
  29355. };
  29356. };
  29357. }));
  29358. }));
  29359. //#endregion
  29360. //#region node_modules/dayjs/plugin/weekYear.js
  29361. var require_weekYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29362. (function(e, t) {
  29363. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t();
  29364. })(exports, (function() {
  29365. "use strict";
  29366. return function(e, t) {
  29367. t.prototype.weekYear = function() {
  29368. var e = this.month(), t = this.week(), n = this.year();
  29369. return 1 === t && 11 === e ? n + 1 : 0 === e && t >= 52 ? n - 1 : n;
  29370. };
  29371. };
  29372. }));
  29373. }));
  29374. //#endregion
  29375. //#region node_modules/dayjs/plugin/dayOfYear.js
  29376. var require_dayOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29377. (function(e, t) {
  29378. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t();
  29379. })(exports, (function() {
  29380. "use strict";
  29381. return function(e, t, n) {
  29382. t.prototype.dayOfYear = function(e) {
  29383. var t = Math.round((n(this).startOf("day") - n(this).startOf("year")) / 864e5) + 1;
  29384. return null == e ? t : this.add(e - t, "day");
  29385. };
  29386. };
  29387. }));
  29388. }));
  29389. //#endregion
  29390. //#region node_modules/dayjs/plugin/isSameOrAfter.js
  29391. var require_isSameOrAfter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29392. (function(e, t) {
  29393. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
  29394. })(exports, (function() {
  29395. "use strict";
  29396. return function(e, t) {
  29397. t.prototype.isSameOrAfter = function(e, t) {
  29398. return this.isSame(e, t) || this.isAfter(e, t);
  29399. };
  29400. };
  29401. }));
  29402. }));
  29403. //#endregion
  29404. //#region node_modules/dayjs/plugin/isSameOrBefore.js
  29405. var require_isSameOrBefore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  29406. (function(e, i) {
  29407. "object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
  29408. })(exports, (function() {
  29409. "use strict";
  29410. return function(e, i) {
  29411. i.prototype.isSameOrBefore = function(e, i) {
  29412. return this.isSame(e, i) || this.isBefore(e, i);
  29413. };
  29414. };
  29415. }));
  29416. }));
  29417. //#endregion
  29418. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-panel.mjs
  29419. var import_advancedFormat = /* @__PURE__ */ __toESM(require_advancedFormat(), 1);
  29420. var import_weekOfYear = /* @__PURE__ */ __toESM(require_weekOfYear(), 1);
  29421. var import_weekYear = /* @__PURE__ */ __toESM(require_weekYear(), 1);
  29422. var import_dayOfYear = /* @__PURE__ */ __toESM(require_dayOfYear(), 1);
  29423. var import_isSameOrAfter = /* @__PURE__ */ __toESM(require_isSameOrAfter(), 1);
  29424. var import_isSameOrBefore = /* @__PURE__ */ __toESM(require_isSameOrBefore(), 1);
  29425. function _isSlot$7(s) {
  29426. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  29427. }
  29428. import_dayjs_min.default.extend(import_localeData.default);
  29429. import_dayjs_min.default.extend(import_advancedFormat.default);
  29430. import_dayjs_min.default.extend(import_customParseFormat.default);
  29431. import_dayjs_min.default.extend(import_weekOfYear.default);
  29432. import_dayjs_min.default.extend(import_weekYear.default);
  29433. import_dayjs_min.default.extend(import_dayOfYear.default);
  29434. import_dayjs_min.default.extend(import_isSameOrAfter.default);
  29435. import_dayjs_min.default.extend(import_isSameOrBefore.default);
  29436. //#endregion
  29437. //#region node_modules/element-plus/es/components/date-picker-panel/index.mjs
  29438. var ElDatePickerPanel = withInstall(/* @__PURE__ */ defineComponent({
  29439. name: "ElDatePickerPanel",
  29440. install: null,
  29441. inheritAttrs: false,
  29442. props: datePickerPanelProps,
  29443. emits: [
  29444. UPDATE_MODEL_EVENT,
  29445. "calendar-change",
  29446. "panel-change",
  29447. "visible-change",
  29448. "clear"
  29449. ],
  29450. setup(props, { slots, emit, attrs }) {
  29451. const ns = useNamespace("picker-panel");
  29452. if (isUndefined(inject("EP_PICKER_BASE", void 0))) provide(PICKER_BASE_INJECTION_KEY, { props: reactive({ ...toRefs(props) }) });
  29453. provide(ROOT_PICKER_INJECTION_KEY, {
  29454. slots,
  29455. pickerNs: ns
  29456. });
  29457. const { parsedValue, onCalendarChange, onPanelChange, onSetPickerOption, onPick } = inject(ROOT_COMMON_PICKER_INJECTION_KEY, () => useCommonPicker(props, emit), true);
  29458. return () => {
  29459. return createVNode(getPanel(props.type), mergeProps(omit(attrs, "onPick"), props, {
  29460. "parsedValue": parsedValue.value,
  29461. "onSet-picker-option": onSetPickerOption,
  29462. "onCalendar-change": onCalendarChange,
  29463. "onPanel-change": onPanelChange,
  29464. "onClear": () => emit("clear"),
  29465. "onPick": onPick
  29466. }), _isSlot$7(slots) ? slots : { default: () => [slots] });
  29467. };
  29468. }
  29469. }));
  29470. //#endregion
  29471. //#region node_modules/element-plus/es/components/date-picker/src/props.mjs
  29472. var datePickerProps = buildProps({
  29473. ...timePickerDefaultProps,
  29474. type: {
  29475. type: definePropType(String),
  29476. default: "date"
  29477. }
  29478. });
  29479. //#endregion
  29480. //#region node_modules/element-plus/es/components/date-picker/src/date-picker.mjs
  29481. function _isSlot$6(s) {
  29482. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  29483. }
  29484. //#endregion
  29485. //#region node_modules/element-plus/es/components/date-picker/index.mjs
  29486. var ElDatePicker = withInstall(/* @__PURE__ */ defineComponent({
  29487. name: "ElDatePicker",
  29488. install: null,
  29489. props: datePickerProps,
  29490. emits: [UPDATE_MODEL_EVENT],
  29491. setup(props, { expose, emit, slots }) {
  29492. provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, computed(() => {
  29493. return !props.format;
  29494. }));
  29495. provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, reactive(toRef(props, "popperOptions")));
  29496. const commonPicker = ref();
  29497. expose({
  29498. focus: () => {
  29499. commonPicker.value?.focus();
  29500. },
  29501. blur: () => {
  29502. commonPicker.value?.blur();
  29503. },
  29504. handleOpen: () => {
  29505. commonPicker.value?.handleOpen();
  29506. },
  29507. handleClose: () => {
  29508. commonPicker.value?.handleClose();
  29509. }
  29510. });
  29511. const onModelValueUpdated = (val) => {
  29512. emit(UPDATE_MODEL_EVENT, val);
  29513. };
  29514. return () => {
  29515. const format = props.format ?? (DEFAULT_FORMATS_DATEPICKER[props.type] || "YYYY-MM-DD");
  29516. return createVNode(picker_default, mergeProps(props, {
  29517. "format": format,
  29518. "type": props.type,
  29519. "ref": commonPicker,
  29520. "onUpdate:modelValue": onModelValueUpdated
  29521. }), {
  29522. default: (scopedProps) => createVNode(ElDatePickerPanel, mergeProps({
  29523. "disabled": props.disabled,
  29524. "editable": props.editable,
  29525. "border": false
  29526. }, scopedProps), _isSlot$6(slots) ? slots : { default: () => [slots] }),
  29527. "range-separator": slots["range-separator"]
  29528. });
  29529. };
  29530. }
  29531. }));
  29532. //#endregion
  29533. //#region node_modules/element-plus/es/components/descriptions/src/description.mjs
  29534. /**
  29535. * @deprecated Removed after 3.0.0, Use `DescriptionProps` instead.
  29536. */
  29537. var descriptionProps = buildProps({
  29538. border: Boolean,
  29539. column: {
  29540. type: Number,
  29541. default: 3
  29542. },
  29543. direction: {
  29544. type: String,
  29545. values: ["horizontal", "vertical"],
  29546. default: "horizontal"
  29547. },
  29548. size: useSizeProp,
  29549. title: {
  29550. type: String,
  29551. default: ""
  29552. },
  29553. extra: {
  29554. type: String,
  29555. default: ""
  29556. },
  29557. labelWidth: { type: [String, Number] }
  29558. });
  29559. //#endregion
  29560. //#region node_modules/element-plus/es/components/descriptions/src/constants.mjs
  29561. var COMPONENT_NAME$10 = "ElDescriptionsItem";
  29562. //#endregion
  29563. //#region node_modules/element-plus/es/components/descriptions/src/description-item.mjs
  29564. var descriptionItemProps = buildProps({
  29565. label: {
  29566. type: String,
  29567. default: ""
  29568. },
  29569. span: {
  29570. type: Number,
  29571. default: 1
  29572. },
  29573. rowspan: {
  29574. type: Number,
  29575. default: 1
  29576. },
  29577. width: {
  29578. type: [String, Number],
  29579. default: ""
  29580. },
  29581. minWidth: {
  29582. type: [String, Number],
  29583. default: ""
  29584. },
  29585. labelWidth: { type: [String, Number] },
  29586. align: {
  29587. type: String,
  29588. values: columnAlignment,
  29589. default: "left"
  29590. },
  29591. labelAlign: {
  29592. type: String,
  29593. values: columnAlignment
  29594. },
  29595. className: {
  29596. type: String,
  29597. default: ""
  29598. },
  29599. labelClassName: {
  29600. type: String,
  29601. default: ""
  29602. }
  29603. });
  29604. var DescriptionItem = defineComponent({
  29605. name: COMPONENT_NAME$10,
  29606. props: descriptionItemProps
  29607. });
  29608. //#endregion
  29609. //#region node_modules/element-plus/es/components/descriptions/src/token.mjs
  29610. var descriptionsKey = Symbol("elDescriptions");
  29611. //#endregion
  29612. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs
  29613. /**
  29614. * @deprecated Removed after 3.0.0, Use `DescriptionsRowProps` instead.
  29615. */
  29616. var descriptionsRowProps = buildProps({ row: {
  29617. type: definePropType(Array),
  29618. default: () => []
  29619. } });
  29620. //#endregion
  29621. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs
  29622. var descriptions_cell_default = defineComponent({
  29623. name: "ElDescriptionsCell",
  29624. props: {
  29625. cell: { type: Object },
  29626. tag: {
  29627. type: String,
  29628. default: "td"
  29629. },
  29630. type: { type: String }
  29631. },
  29632. setup() {
  29633. return { descriptions: inject(descriptionsKey, {}) };
  29634. },
  29635. render() {
  29636. const item = getNormalizedProps(this.cell);
  29637. const directives = (this.cell?.dirs || []).map((dire) => {
  29638. const { dir, arg, modifiers, value } = dire;
  29639. return [
  29640. dir,
  29641. value,
  29642. arg,
  29643. modifiers
  29644. ];
  29645. });
  29646. const { border, direction } = this.descriptions;
  29647. const isVertical = direction === "vertical";
  29648. const renderLabel = () => this.cell?.children?.label?.() || item.label;
  29649. const renderContent = () => this.cell?.children?.default?.();
  29650. const span = item.span;
  29651. const rowspan = item.rowspan;
  29652. const align = item.align ? `is-${item.align}` : "";
  29653. const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;
  29654. const className = item.className;
  29655. const labelClassName = item.labelClassName;
  29656. const style = {
  29657. width: addUnit(this.type === "label" ? item.labelWidth ?? this.descriptions.labelWidth ?? item.width : item.width),
  29658. minWidth: addUnit(item.minWidth)
  29659. };
  29660. const ns = useNamespace("descriptions");
  29661. switch (this.type) {
  29662. case "label": return withDirectives(h$1(this.tag, {
  29663. style,
  29664. class: [
  29665. ns.e("cell"),
  29666. ns.e("label"),
  29667. ns.is("bordered-label", border),
  29668. ns.is("vertical-label", isVertical),
  29669. labelAlign,
  29670. labelClassName
  29671. ],
  29672. colSpan: isVertical ? span : 1,
  29673. rowspan: isVertical ? 1 : rowspan
  29674. }, renderLabel()), directives);
  29675. case "content": return withDirectives(h$1(this.tag, {
  29676. style,
  29677. class: [
  29678. ns.e("cell"),
  29679. ns.e("content"),
  29680. ns.is("bordered-content", border),
  29681. ns.is("vertical-content", isVertical),
  29682. align,
  29683. className
  29684. ],
  29685. colSpan: isVertical ? span : span * 2 - 1,
  29686. rowspan: isVertical ? rowspan * 2 - 1 : rowspan
  29687. }, renderContent()), directives);
  29688. default: {
  29689. const label = renderLabel();
  29690. const labelStyle = {};
  29691. const width = addUnit(item.labelWidth ?? this.descriptions.labelWidth);
  29692. if (width) {
  29693. labelStyle.width = width;
  29694. labelStyle.display = "inline-block";
  29695. }
  29696. return withDirectives(h$1("td", {
  29697. style,
  29698. class: [ns.e("cell"), align],
  29699. colSpan: span,
  29700. rowspan
  29701. }, [!isNil(label) ? h$1("span", {
  29702. style: labelStyle,
  29703. class: [ns.e("label"), labelClassName]
  29704. }, label) : void 0, h$1("span", { class: [ns.e("content"), className] }, renderContent())]), directives);
  29705. }
  29706. }
  29707. }
  29708. });
  29709. //#endregion
  29710. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.vue_vue_type_script_setup_true_lang.mjs
  29711. var _hoisted_1$43 = { key: 1 };
  29712. //#endregion
  29713. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs
  29714. var descriptions_row_default = /* @__PURE__ */ defineComponent({
  29715. name: "ElDescriptionsRow",
  29716. __name: "descriptions-row",
  29717. props: descriptionsRowProps,
  29718. setup(__props) {
  29719. const descriptions = inject(descriptionsKey, {});
  29720. return (_ctx, _cache) => {
  29721. return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  29722. return openBlock(), createBlock(unref(descriptions_cell_default), {
  29723. key: `tr1-${_index}`,
  29724. cell,
  29725. tag: "th",
  29726. type: "label"
  29727. }, null, 8, ["cell"]);
  29728. }), 128))]), createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  29729. return openBlock(), createBlock(unref(descriptions_cell_default), {
  29730. key: `tr2-${_index}`,
  29731. cell,
  29732. tag: "td",
  29733. type: "content"
  29734. }, null, 8, ["cell"]);
  29735. }), 128))])], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1$43, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  29736. return openBlock(), createElementBlock(Fragment, { key: `tr3-${_index}` }, [unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(descriptions_cell_default), {
  29737. cell,
  29738. tag: "td",
  29739. type: "label"
  29740. }, null, 8, ["cell"]), createVNode(unref(descriptions_cell_default), {
  29741. cell,
  29742. tag: "td",
  29743. type: "content"
  29744. }, null, 8, ["cell"])], 64)) : (openBlock(), createBlock(unref(descriptions_cell_default), {
  29745. key: 1,
  29746. cell,
  29747. tag: "td",
  29748. type: "both"
  29749. }, null, 8, ["cell"]))], 64);
  29750. }), 128))]));
  29751. };
  29752. }
  29753. });
  29754. //#endregion
  29755. //#region node_modules/element-plus/es/components/descriptions/index.mjs
  29756. var ElDescriptions = withInstall(/* @__PURE__ */ defineComponent({
  29757. name: "ElDescriptions",
  29758. __name: "description",
  29759. props: descriptionProps,
  29760. setup(__props) {
  29761. const props = __props;
  29762. const ns = useNamespace("descriptions");
  29763. const descriptionsSize = useFormSize();
  29764. const slots = useSlots();
  29765. provide(descriptionsKey, props);
  29766. const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
  29767. const filledNode = (node, span, count, isLast = false) => {
  29768. if (!node.props) node.props = {};
  29769. if (span > count) node.props.span = count;
  29770. if (isLast) node.props.span = span;
  29771. return node;
  29772. };
  29773. const getRows = () => {
  29774. if (!slots.default) return [];
  29775. const children = flattedChildren(slots.default()).filter((node) => node?.type?.name === COMPONENT_NAME$10);
  29776. const rows = [];
  29777. let temp = [];
  29778. let count = props.column;
  29779. let totalSpan = 0;
  29780. const rowspanTemp = [];
  29781. children.forEach((node, index) => {
  29782. const span = node.props?.span || 1;
  29783. const rowspan = node.props?.rowspan || 1;
  29784. const rowNo = rows.length;
  29785. rowspanTemp[rowNo] ||= 0;
  29786. if (rowspan > 1) for (let i = 1; i < rowspan; i++) {
  29787. rowspanTemp[rowNo + i] ||= 0;
  29788. rowspanTemp[rowNo + i]++;
  29789. totalSpan++;
  29790. }
  29791. if (rowspanTemp[rowNo] > 0) {
  29792. count -= rowspanTemp[rowNo];
  29793. rowspanTemp[rowNo] = 0;
  29794. }
  29795. if (index < children.length - 1) totalSpan += span > count ? count : span;
  29796. if (index === children.length - 1) {
  29797. const lastSpan = props.column - totalSpan % props.column;
  29798. temp.push(filledNode(node, lastSpan, count, true));
  29799. rows.push(temp);
  29800. return;
  29801. }
  29802. if (span < count) {
  29803. count -= span;
  29804. temp.push(node);
  29805. } else {
  29806. temp.push(filledNode(node, span, count));
  29807. rows.push(temp);
  29808. count = props.column;
  29809. temp = [];
  29810. }
  29811. });
  29812. return rows;
  29813. };
  29814. return (_ctx, _cache) => {
  29815. return openBlock(), createElementBlock("div", { class: normalizeClass(descriptionKls.value) }, [__props.title || __props.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  29816. key: 0,
  29817. class: normalizeClass(unref(ns).e("header"))
  29818. }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("extra")) }, [renderSlot(_ctx.$slots, "extra", {}, () => [createTextVNode(toDisplayString(__props.extra), 1)])], 2)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [createBaseVNode("table", { class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", __props.border)]) }, [createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
  29819. return openBlock(), createBlock(descriptions_row_default, {
  29820. key: _index,
  29821. row
  29822. }, null, 8, ["row"]);
  29823. }), 128))])], 2)], 2)], 2);
  29824. };
  29825. }
  29826. }), { DescriptionsItem: DescriptionItem });
  29827. var ElDescriptionsItem = withNoopInstall(DescriptionItem);
  29828. //#endregion
  29829. //#region node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
  29830. /**
  29831. * @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
  29832. */
  29833. var dialogContentProps = buildProps({
  29834. center: Boolean,
  29835. alignCenter: {
  29836. type: Boolean,
  29837. default: void 0
  29838. },
  29839. closeIcon: { type: iconPropType },
  29840. draggable: {
  29841. type: Boolean,
  29842. default: void 0
  29843. },
  29844. overflow: {
  29845. type: Boolean,
  29846. default: void 0
  29847. },
  29848. fullscreen: Boolean,
  29849. headerClass: String,
  29850. bodyClass: String,
  29851. footerClass: String,
  29852. showClose: {
  29853. type: Boolean,
  29854. default: true
  29855. },
  29856. title: {
  29857. type: String,
  29858. default: ""
  29859. },
  29860. ariaLevel: {
  29861. type: String,
  29862. default: "2"
  29863. }
  29864. });
  29865. var dialogContentEmits = { close: () => true };
  29866. var dialogContentPropsDefaults = {
  29867. alignCenter: void 0,
  29868. draggable: void 0,
  29869. overflow: void 0,
  29870. showClose: true,
  29871. title: "",
  29872. ariaLevel: "2"
  29873. };
  29874. //#endregion
  29875. //#region node_modules/element-plus/es/components/dialog/src/dialog.mjs
  29876. /**
  29877. * @deprecated Removed after 3.0.0, Use `DialogProps` instead.
  29878. */
  29879. var dialogProps = buildProps({
  29880. ...dialogContentProps,
  29881. appendToBody: Boolean,
  29882. appendTo: {
  29883. type: teleportProps.to.type,
  29884. default: "body"
  29885. },
  29886. beforeClose: { type: definePropType(Function) },
  29887. destroyOnClose: Boolean,
  29888. closeOnClickModal: {
  29889. type: Boolean,
  29890. default: true
  29891. },
  29892. closeOnPressEscape: {
  29893. type: Boolean,
  29894. default: true
  29895. },
  29896. lockScroll: {
  29897. type: Boolean,
  29898. default: true
  29899. },
  29900. modal: {
  29901. type: Boolean,
  29902. default: true
  29903. },
  29904. modalPenetrable: Boolean,
  29905. openDelay: {
  29906. type: Number,
  29907. default: 0
  29908. },
  29909. closeDelay: {
  29910. type: Number,
  29911. default: 0
  29912. },
  29913. top: { type: String },
  29914. modelValue: Boolean,
  29915. modalClass: String,
  29916. headerClass: String,
  29917. bodyClass: String,
  29918. footerClass: String,
  29919. width: { type: [String, Number] },
  29920. zIndex: { type: Number },
  29921. trapFocus: Boolean,
  29922. headerAriaLevel: {
  29923. type: String,
  29924. default: "2"
  29925. },
  29926. transition: {
  29927. type: definePropType([String, Object]),
  29928. default: void 0
  29929. }
  29930. });
  29931. var dialogEmits = {
  29932. open: () => true,
  29933. opened: () => true,
  29934. close: () => true,
  29935. closed: () => true,
  29936. [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
  29937. openAutoFocus: () => true,
  29938. closeAutoFocus: () => true
  29939. };
  29940. var dialogContextKey = Symbol("dialogContextKey");
  29941. var dialogPropsDefaults = {
  29942. ...dialogContentPropsDefaults,
  29943. appendTo: "body",
  29944. closeOnClickModal: true,
  29945. closeOnPressEscape: true,
  29946. lockScroll: true,
  29947. modal: true,
  29948. openDelay: 0,
  29949. closeDelay: 0,
  29950. headerAriaLevel: "2",
  29951. transition: void 0
  29952. };
  29953. //#endregion
  29954. //#region node_modules/element-plus/es/components/overlay/src/overlay.mjs
  29955. var overlayProps = buildProps({
  29956. mask: {
  29957. type: Boolean,
  29958. default: true
  29959. },
  29960. customMaskEvent: Boolean,
  29961. overlayClass: { type: definePropType([
  29962. String,
  29963. Array,
  29964. Object
  29965. ]) },
  29966. zIndex: { type: definePropType([String, Number]) }
  29967. });
  29968. var overlayEmits = { click: (evt) => evt instanceof MouseEvent };
  29969. var BLOCK = "overlay";
  29970. //#endregion
  29971. //#region node_modules/element-plus/es/components/overlay/index.mjs
  29972. var ElOverlay = defineComponent({
  29973. name: "ElOverlay",
  29974. props: overlayProps,
  29975. emits: overlayEmits,
  29976. setup(props, { slots, emit }) {
  29977. const ns = useNamespace(BLOCK);
  29978. const onMaskClick = (e) => {
  29979. emit("click", e);
  29980. };
  29981. const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
  29982. return () => {
  29983. return props.mask ? createVNode("div", {
  29984. class: [ns.b(), props.overlayClass],
  29985. style: { zIndex: props.zIndex },
  29986. onClick,
  29987. onMousedown,
  29988. onMouseup
  29989. }, [renderSlot(slots, "default")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, [
  29990. "onClick",
  29991. "onMouseup",
  29992. "onMousedown"
  29993. ]) : h$1("div", {
  29994. class: props.overlayClass,
  29995. style: {
  29996. zIndex: props.zIndex,
  29997. position: "fixed",
  29998. top: "0px",
  29999. right: "0px",
  30000. bottom: "0px",
  30001. left: "0px"
  30002. }
  30003. }, [renderSlot(slots, "default")]);
  30004. };
  30005. }
  30006. });
  30007. //#endregion
  30008. //#region node_modules/element-plus/es/components/dialog/src/constants.mjs
  30009. var dialogInjectionKey = Symbol("dialogInjectionKey");
  30010. var DEFAULT_DIALOG_TRANSITION = "dialog-fade";
  30011. //#endregion
  30012. //#region node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
  30013. var COMPONENT_NAME$9 = "ElDialog";
  30014. var useDialog = (props, targetRef) => {
  30015. const emit = getCurrentInstance().emit;
  30016. const { nextZIndex } = useZIndex();
  30017. let lastPosition = "";
  30018. const titleId = useId();
  30019. const bodyId = useId();
  30020. const visible = ref(false);
  30021. const closed = ref(false);
  30022. const rendered = ref(false);
  30023. const zIndex = ref(props.zIndex ?? nextZIndex());
  30024. const closing = ref(false);
  30025. let openTimer = void 0;
  30026. let closeTimer = void 0;
  30027. const config = useGlobalConfig();
  30028. const namespace = computed(() => config.value?.namespace ?? "el");
  30029. const globalConfig = computed(() => config.value?.dialog);
  30030. const style = computed(() => {
  30031. const style = {};
  30032. const varPrefix = `--${namespace.value}-dialog`;
  30033. if (!props.fullscreen) {
  30034. if (props.top) style[`${varPrefix}-margin-top`] = props.top;
  30035. const width = addUnit(props.width);
  30036. if (width) style[`${varPrefix}-width`] = width;
  30037. }
  30038. return style;
  30039. });
  30040. const _draggable = computed(() => (props.draggable ?? globalConfig.value?.draggable ?? false) && !props.fullscreen);
  30041. const _alignCenter = computed(() => props.alignCenter ?? globalConfig.value?.alignCenter ?? false);
  30042. const _overflow = computed(() => props.overflow ?? globalConfig.value?.overflow ?? false);
  30043. const overlayDialogStyle = computed(() => {
  30044. if (_alignCenter.value) return { display: "flex" };
  30045. return {};
  30046. });
  30047. const transitionConfig = computed(() => {
  30048. const transition = props.transition ?? globalConfig.value?.transition ?? "dialog-fade";
  30049. const baseConfig = {
  30050. name: transition,
  30051. onAfterEnter: afterEnter,
  30052. onBeforeLeave: beforeLeave,
  30053. onAfterLeave: afterLeave
  30054. };
  30055. if (isObject$2(transition)) {
  30056. const config = { ...transition };
  30057. const _mergeHook = (userHook, defaultHook) => {
  30058. return (el) => {
  30059. if (isArray$1(userHook)) userHook.forEach((fn) => {
  30060. if (isFunction$1(fn)) fn(el);
  30061. });
  30062. else if (isFunction$1(userHook)) userHook(el);
  30063. defaultHook();
  30064. };
  30065. };
  30066. config.onAfterEnter = _mergeHook(config.onAfterEnter, afterEnter);
  30067. config.onBeforeLeave = _mergeHook(config.onBeforeLeave, beforeLeave);
  30068. config.onAfterLeave = _mergeHook(config.onAfterLeave, afterLeave);
  30069. if (!config.name) {
  30070. config.name = DEFAULT_DIALOG_TRANSITION;
  30071. debugWarn(COMPONENT_NAME$9, `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'`);
  30072. }
  30073. return config;
  30074. }
  30075. return baseConfig;
  30076. });
  30077. function afterEnter() {
  30078. emit("opened");
  30079. }
  30080. function afterLeave() {
  30081. emit("closed");
  30082. emit(UPDATE_MODEL_EVENT, false);
  30083. if (props.destroyOnClose) rendered.value = false;
  30084. closing.value = false;
  30085. }
  30086. function beforeLeave() {
  30087. closing.value = true;
  30088. emit("close");
  30089. }
  30090. function open() {
  30091. closeTimer?.();
  30092. openTimer?.();
  30093. if (props.openDelay && props.openDelay > 0) ({stop: openTimer} = useTimeoutFn(() => doOpen(), props.openDelay));
  30094. else doOpen();
  30095. }
  30096. function close() {
  30097. openTimer?.();
  30098. closeTimer?.();
  30099. if (props.closeDelay && props.closeDelay > 0) ({stop: closeTimer} = useTimeoutFn(() => doClose(), props.closeDelay));
  30100. else doClose();
  30101. }
  30102. function handleClose() {
  30103. function hide(shouldCancel) {
  30104. if (shouldCancel) return;
  30105. closed.value = true;
  30106. visible.value = false;
  30107. }
  30108. if (props.beforeClose) props.beforeClose(hide);
  30109. else close();
  30110. }
  30111. function onModalClick() {
  30112. if (props.closeOnClickModal) handleClose();
  30113. }
  30114. function doOpen() {
  30115. if (!isClient) return;
  30116. visible.value = true;
  30117. }
  30118. function doClose() {
  30119. visible.value = false;
  30120. }
  30121. function onOpenAutoFocus() {
  30122. emit("openAutoFocus");
  30123. }
  30124. function onCloseAutoFocus() {
  30125. emit("closeAutoFocus");
  30126. }
  30127. function onFocusoutPrevented(event) {
  30128. if (event.detail?.focusReason === "pointer") event.preventDefault();
  30129. }
  30130. if (props.lockScroll) useLockscreen(visible);
  30131. function onCloseRequested() {
  30132. if (props.closeOnPressEscape) handleClose();
  30133. }
  30134. watch(() => props.zIndex, () => {
  30135. zIndex.value = props.zIndex ?? nextZIndex();
  30136. });
  30137. watch(() => props.modelValue, (val) => {
  30138. if (val) {
  30139. closed.value = false;
  30140. closing.value = false;
  30141. open();
  30142. rendered.value = true;
  30143. zIndex.value = props.zIndex ?? nextZIndex();
  30144. nextTick(() => {
  30145. emit("open");
  30146. if (targetRef.value) {
  30147. targetRef.value.parentElement.scrollTop = 0;
  30148. targetRef.value.parentElement.scrollLeft = 0;
  30149. targetRef.value.scrollTop = 0;
  30150. }
  30151. });
  30152. } else if (visible.value) close();
  30153. });
  30154. watch(() => props.fullscreen, (val) => {
  30155. if (!targetRef.value) return;
  30156. if (val) {
  30157. lastPosition = targetRef.value.style.transform;
  30158. targetRef.value.style.transform = "";
  30159. } else targetRef.value.style.transform = lastPosition;
  30160. });
  30161. onMounted(() => {
  30162. if (props.modelValue) {
  30163. visible.value = true;
  30164. rendered.value = true;
  30165. open();
  30166. }
  30167. });
  30168. return {
  30169. afterEnter,
  30170. afterLeave,
  30171. beforeLeave,
  30172. handleClose,
  30173. onModalClick,
  30174. close,
  30175. doClose,
  30176. onOpenAutoFocus,
  30177. onCloseAutoFocus,
  30178. onCloseRequested,
  30179. onFocusoutPrevented,
  30180. titleId,
  30181. bodyId,
  30182. closed,
  30183. style,
  30184. overlayDialogStyle,
  30185. rendered,
  30186. visible,
  30187. zIndex,
  30188. transitionConfig,
  30189. _draggable,
  30190. _alignCenter,
  30191. _overflow,
  30192. closing
  30193. };
  30194. };
  30195. //#endregion
  30196. //#region node_modules/element-plus/es/utils/vue/refs.mjs
  30197. var composeRefs = (...refs) => {
  30198. return (el) => {
  30199. refs.forEach((ref) => {
  30200. ref.value = el;
  30201. });
  30202. };
  30203. };
  30204. //#endregion
  30205. //#region node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs
  30206. var _hoisted_1$42 = ["aria-level"];
  30207. var _hoisted_2$25 = ["aria-label"];
  30208. var _hoisted_3$10 = ["id"];
  30209. //#endregion
  30210. //#region node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
  30211. var dialog_content_default = /* @__PURE__ */ defineComponent({
  30212. name: "ElDialogContent",
  30213. __name: "dialog-content",
  30214. props: dialogContentProps,
  30215. emits: dialogContentEmits,
  30216. setup(__props, { expose: __expose }) {
  30217. const { t } = useLocale();
  30218. const { Close } = CloseComponents;
  30219. const props = __props;
  30220. const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
  30221. const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
  30222. const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
  30223. const draggable = computed(() => !!props.draggable);
  30224. const { resetPosition, updatePosition, isDragging } = useDraggable(dialogRef, headerRef, draggable, computed(() => !!props.overflow));
  30225. const dialogKls = computed(() => [
  30226. ns.b(),
  30227. ns.is("fullscreen", props.fullscreen),
  30228. ns.is("draggable", draggable.value),
  30229. ns.is("dragging", isDragging.value),
  30230. ns.is("align-center", !!props.alignCenter),
  30231. { [ns.m("center")]: props.center }
  30232. ]);
  30233. __expose({
  30234. resetPosition,
  30235. updatePosition
  30236. });
  30237. return (_ctx, _cache) => {
  30238. return openBlock(), createElementBlock("div", {
  30239. ref: unref(composedDialogRef),
  30240. class: normalizeClass(dialogKls.value),
  30241. style: normalizeStyle(unref(style)),
  30242. tabindex: "-1"
  30243. }, [
  30244. createBaseVNode("header", {
  30245. ref_key: "headerRef",
  30246. ref: headerRef,
  30247. class: normalizeClass([
  30248. unref(ns).e("header"),
  30249. __props.headerClass,
  30250. { "show-close": __props.showClose }
  30251. ])
  30252. }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
  30253. role: "heading",
  30254. "aria-level": __props.ariaLevel,
  30255. class: normalizeClass(unref(ns).e("title"))
  30256. }, toDisplayString(__props.title), 11, _hoisted_1$42)]), __props.showClose ? (openBlock(), createElementBlock("button", {
  30257. key: 0,
  30258. "aria-label": unref(t)("el.dialog.close"),
  30259. class: normalizeClass(unref(ns).e("headerbtn")),
  30260. type: "button",
  30261. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
  30262. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  30263. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon || unref(Close))))]),
  30264. _: 1
  30265. }, 8, ["class"])], 10, _hoisted_2$25)) : createCommentVNode("v-if", true)], 2),
  30266. createBaseVNode("div", {
  30267. id: unref(bodyId),
  30268. class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
  30269. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_3$10),
  30270. _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
  30271. key: 0,
  30272. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  30273. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  30274. ], 6);
  30275. };
  30276. }
  30277. });
  30278. //#endregion
  30279. //#region node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs
  30280. var _hoisted_1$41 = [
  30281. "aria-label",
  30282. "aria-labelledby",
  30283. "aria-describedby"
  30284. ];
  30285. //#endregion
  30286. //#region node_modules/element-plus/es/components/dialog/index.mjs
  30287. var ElDialog = withInstall(/* @__PURE__ */ defineComponent({
  30288. name: "ElDialog",
  30289. inheritAttrs: false,
  30290. __name: "dialog",
  30291. props: dialogProps,
  30292. emits: dialogEmits,
  30293. setup(__props, { expose: __expose }) {
  30294. const props = __props;
  30295. const slots = useSlots();
  30296. useDeprecated({
  30297. scope: "el-dialog",
  30298. from: "the title slot",
  30299. replacement: "the header slot",
  30300. version: "3.0.0",
  30301. ref: "https://element-plus.org/en-US/component/dialog.html#slots"
  30302. }, computed(() => !!slots.title));
  30303. const ns = useNamespace("dialog");
  30304. const dialogRef = ref();
  30305. const headerRef = ref();
  30306. const dialogContentRef = ref();
  30307. const { visible, titleId, bodyId, style, overlayDialogStyle, rendered, transitionConfig, zIndex, _draggable, _alignCenter, _overflow, handleClose, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onCloseRequested, onFocusoutPrevented, closing } = useDialog(props, dialogRef);
  30308. provide(dialogInjectionKey, {
  30309. dialogRef,
  30310. headerRef,
  30311. bodyId,
  30312. ns,
  30313. rendered,
  30314. style
  30315. });
  30316. const overlayEvent = useSameTarget(onModalClick);
  30317. const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
  30318. const resetPosition = () => {
  30319. dialogContentRef.value?.resetPosition();
  30320. };
  30321. __expose({
  30322. visible,
  30323. dialogContentRef,
  30324. resetPosition,
  30325. handleClose
  30326. });
  30327. return (_ctx, _cache) => {
  30328. return openBlock(), createBlock(unref(ElTeleport), {
  30329. to: __props.appendTo,
  30330. disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
  30331. }, {
  30332. default: withCtx(() => [createVNode(Transition, mergeProps(unref(transitionConfig), { persisted: "" }), {
  30333. default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
  30334. "custom-mask-event": "",
  30335. mask: __props.modal,
  30336. "overlay-class": [
  30337. __props.modalClass ?? "",
  30338. `${unref(ns).namespace.value}-modal-dialog`,
  30339. unref(ns).is("penetrable", penetrable.value)
  30340. ],
  30341. "z-index": unref(zIndex)
  30342. }, {
  30343. default: withCtx(() => [createBaseVNode("div", {
  30344. role: "dialog",
  30345. "aria-modal": "true",
  30346. "aria-label": __props.title || void 0,
  30347. "aria-labelledby": !__props.title ? unref(titleId) : void 0,
  30348. "aria-describedby": unref(bodyId),
  30349. class: normalizeClass([`${unref(ns).namespace.value}-overlay-dialog`, unref(ns).is("closing", unref(closing))]),
  30350. style: normalizeStyle(unref(overlayDialogStyle)),
  30351. onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
  30352. onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
  30353. onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
  30354. }, [createVNode(unref(focus_trap_default$1), {
  30355. loop: "",
  30356. trapped: unref(visible),
  30357. "focus-start-el": "container",
  30358. onFocusAfterTrapped: unref(onOpenAutoFocus),
  30359. onFocusAfterReleased: unref(onCloseAutoFocus),
  30360. onFocusoutPrevented: unref(onFocusoutPrevented),
  30361. onReleaseRequested: unref(onCloseRequested)
  30362. }, {
  30363. default: withCtx(() => [unref(rendered) ? (openBlock(), createBlock(dialog_content_default, mergeProps({
  30364. key: 0,
  30365. ref_key: "dialogContentRef",
  30366. ref: dialogContentRef
  30367. }, _ctx.$attrs, {
  30368. center: __props.center,
  30369. "align-center": unref(_alignCenter),
  30370. "close-icon": __props.closeIcon,
  30371. draggable: unref(_draggable),
  30372. overflow: unref(_overflow),
  30373. fullscreen: __props.fullscreen,
  30374. "header-class": __props.headerClass,
  30375. "body-class": __props.bodyClass,
  30376. "footer-class": __props.footerClass,
  30377. "show-close": __props.showClose,
  30378. title: __props.title,
  30379. "aria-level": __props.headerAriaLevel,
  30380. onClose: unref(handleClose)
  30381. }), createSlots({
  30382. header: withCtx(() => [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  30383. key: 0,
  30384. close: unref(handleClose),
  30385. titleId: unref(titleId),
  30386. titleClass: unref(ns).e("title")
  30387. }) : renderSlot(_ctx.$slots, "title", { key: 1 })]),
  30388. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  30389. _: 2
  30390. }, [_ctx.$slots.footer ? {
  30391. name: "footer",
  30392. fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
  30393. key: "0"
  30394. } : void 0]), 1040, [
  30395. "center",
  30396. "align-center",
  30397. "close-icon",
  30398. "draggable",
  30399. "overflow",
  30400. "fullscreen",
  30401. "header-class",
  30402. "body-class",
  30403. "footer-class",
  30404. "show-close",
  30405. "title",
  30406. "aria-level",
  30407. "onClose"
  30408. ])) : createCommentVNode("v-if", true)]),
  30409. _: 3
  30410. }, 8, [
  30411. "trapped",
  30412. "onFocusAfterTrapped",
  30413. "onFocusAfterReleased",
  30414. "onFocusoutPrevented",
  30415. "onReleaseRequested"
  30416. ])], 46, _hoisted_1$41)]),
  30417. _: 3
  30418. }, 8, [
  30419. "mask",
  30420. "overlay-class",
  30421. "z-index"
  30422. ]), [[vShow, unref(visible)]])]),
  30423. _: 3
  30424. }, 16)]),
  30425. _: 3
  30426. }, 8, ["to", "disabled"]);
  30427. };
  30428. }
  30429. }));
  30430. //#endregion
  30431. //#region node_modules/element-plus/es/components/divider/src/divider.mjs
  30432. /**
  30433. * @deprecated Removed after 3.0.0, Use `DividerProps` instead.
  30434. */
  30435. var dividerProps = buildProps({
  30436. direction: {
  30437. type: String,
  30438. values: ["horizontal", "vertical"],
  30439. default: "horizontal"
  30440. },
  30441. contentPosition: {
  30442. type: String,
  30443. values: [
  30444. "left",
  30445. "center",
  30446. "right"
  30447. ],
  30448. default: "center"
  30449. },
  30450. borderStyle: {
  30451. type: definePropType(String),
  30452. default: "solid"
  30453. }
  30454. });
  30455. //#endregion
  30456. //#region node_modules/element-plus/es/components/divider/index.mjs
  30457. var ElDivider = withInstall(/* @__PURE__ */ defineComponent({
  30458. name: "ElDivider",
  30459. __name: "divider",
  30460. props: dividerProps,
  30461. setup(__props) {
  30462. const props = __props;
  30463. const ns = useNamespace("divider");
  30464. const dividerStyle = computed(() => {
  30465. return ns.cssVar({ "border-style": props.borderStyle });
  30466. });
  30467. return (_ctx, _cache) => {
  30468. return openBlock(), createElementBlock("div", {
  30469. class: normalizeClass([unref(ns).b(), unref(ns).m(__props.direction)]),
  30470. style: normalizeStyle(dividerStyle.value),
  30471. role: "separator"
  30472. }, [_ctx.$slots.default && __props.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
  30473. key: 0,
  30474. class: normalizeClass([unref(ns).e("text"), unref(ns).is(__props.contentPosition)])
  30475. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)], 6);
  30476. };
  30477. }
  30478. }));
  30479. //#endregion
  30480. //#region node_modules/element-plus/es/components/drawer/src/drawer.mjs
  30481. /**
  30482. * @deprecated Removed after 3.0.0, Use `DrawerProps` instead.
  30483. */
  30484. var drawerProps = buildProps({
  30485. ...dialogProps,
  30486. direction: {
  30487. type: String,
  30488. default: "rtl",
  30489. values: [
  30490. "ltr",
  30491. "rtl",
  30492. "ttb",
  30493. "btt"
  30494. ]
  30495. },
  30496. resizable: Boolean,
  30497. size: {
  30498. type: [String, Number],
  30499. default: "30%"
  30500. },
  30501. withHeader: {
  30502. type: Boolean,
  30503. default: true
  30504. },
  30505. modalFade: {
  30506. type: Boolean,
  30507. default: true
  30508. },
  30509. headerAriaLevel: {
  30510. type: String,
  30511. default: "2"
  30512. }
  30513. });
  30514. var drawerEmits = {
  30515. ...dialogEmits,
  30516. "resize-start": (evt, size) => evt instanceof MouseEvent && typeof size === "number",
  30517. resize: (evt, size) => evt instanceof MouseEvent && typeof size === "number",
  30518. "resize-end": (evt, size) => evt instanceof MouseEvent && typeof size === "number"
  30519. };
  30520. //#endregion
  30521. //#region node_modules/element-plus/es/components/drawer/src/composables/useResizable.mjs
  30522. function useResizable(props, target, emit) {
  30523. const { width, height } = useWindowSize();
  30524. const isHorizontal = computed(() => ["ltr", "rtl"].includes(props.direction));
  30525. const sign = computed(() => ["ltr", "ttb"].includes(props.direction) ? 1 : -1);
  30526. const windowSize = computed(() => isHorizontal.value ? width.value : height.value);
  30527. const getSize = computed(() => {
  30528. return clamp$1(startSize.value + sign.value * offset.value, 4, windowSize.value);
  30529. });
  30530. const startSize = ref(0);
  30531. const offset = ref(0);
  30532. const isResizing = ref(false);
  30533. const hasStartedDragging = ref(false);
  30534. let startPos = [];
  30535. let cleanups = [];
  30536. const getActualSize = () => {
  30537. const drawerEl = target.value?.closest("[aria-modal=\"true\"]");
  30538. if (drawerEl) return isHorizontal.value ? drawerEl.offsetWidth : drawerEl.offsetHeight;
  30539. return 100;
  30540. };
  30541. watch(() => [props.size, props.resizable], () => {
  30542. hasStartedDragging.value = false;
  30543. startSize.value = 0;
  30544. offset.value = 0;
  30545. onMouseUp();
  30546. });
  30547. const onMousedown = (e) => {
  30548. if (!props.resizable) return;
  30549. if (!hasStartedDragging.value) {
  30550. startSize.value = getActualSize();
  30551. hasStartedDragging.value = true;
  30552. }
  30553. startPos = [e.pageX, e.pageY];
  30554. isResizing.value = true;
  30555. emit("resize-start", e, startSize.value);
  30556. cleanups.push(useEventListener(window, "mouseup", onMouseUp), useEventListener(window, "mousemove", onMouseMove));
  30557. };
  30558. const onMouseMove = (e) => {
  30559. const { pageX, pageY } = e;
  30560. const offsetX = pageX - startPos[0];
  30561. const offsetY = pageY - startPos[1];
  30562. offset.value = isHorizontal.value ? offsetX : offsetY;
  30563. emit("resize", e, getSize.value);
  30564. };
  30565. const onMouseUp = (e) => {
  30566. if (!isResizing.value) return;
  30567. startPos = [];
  30568. startSize.value = getSize.value;
  30569. offset.value = 0;
  30570. isResizing.value = false;
  30571. cleanups.forEach((cleanup) => cleanup?.());
  30572. cleanups = [];
  30573. if (e) emit("resize-end", e, startSize.value);
  30574. };
  30575. const cleanup = useEventListener(target, "mousedown", onMousedown);
  30576. onBeforeUnmount(() => {
  30577. cleanup();
  30578. onMouseUp();
  30579. });
  30580. return {
  30581. size: computed(() => {
  30582. return hasStartedDragging.value ? `${getSize.value}px` : addUnit(props.size);
  30583. }),
  30584. isResizing,
  30585. isHorizontal
  30586. };
  30587. }
  30588. //#endregion
  30589. //#region node_modules/element-plus/es/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.mjs
  30590. var _hoisted_1$40 = [
  30591. "aria-label",
  30592. "aria-labelledby",
  30593. "aria-describedby"
  30594. ];
  30595. var _hoisted_2$24 = ["id", "aria-level"];
  30596. var _hoisted_3$9 = ["aria-label"];
  30597. var _hoisted_4$7 = ["id"];
  30598. //#endregion
  30599. //#region node_modules/element-plus/es/components/drawer/index.mjs
  30600. var ElDrawer = withInstall(/* @__PURE__ */ defineComponent({
  30601. name: "ElDrawer",
  30602. inheritAttrs: false,
  30603. __name: "drawer",
  30604. props: drawerProps,
  30605. emits: drawerEmits,
  30606. setup(__props, { expose: __expose, emit: __emit }) {
  30607. const props = __props;
  30608. const emit = __emit;
  30609. const slots = useSlots();
  30610. useDeprecated({
  30611. scope: "el-drawer",
  30612. from: "the title slot",
  30613. replacement: "the header slot",
  30614. version: "3.0.0",
  30615. ref: "https://element-plus.org/en-US/component/drawer.html#slots"
  30616. }, computed(() => !!slots.title));
  30617. const drawerRef = ref();
  30618. const focusStartRef = ref();
  30619. const draggerRef = ref();
  30620. const ns = useNamespace("drawer");
  30621. const { t } = useLocale();
  30622. const { afterEnter, afterLeave, beforeLeave, visible, rendered, titleId, bodyId, zIndex, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onFocusoutPrevented, onCloseRequested, handleClose } = useDialog(props, drawerRef);
  30623. const { isHorizontal, size, isResizing } = useResizable(props, draggerRef, emit);
  30624. const penetrable = computed(() => props.modalPenetrable && !props.modal);
  30625. __expose({
  30626. handleClose,
  30627. afterEnter,
  30628. afterLeave
  30629. });
  30630. return (_ctx, _cache) => {
  30631. return openBlock(), createBlock(unref(ElTeleport), {
  30632. to: __props.appendTo,
  30633. disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
  30634. }, {
  30635. default: withCtx(() => [createVNode(Transition, {
  30636. name: unref(ns).b("fade"),
  30637. onAfterEnter: unref(afterEnter),
  30638. onAfterLeave: unref(afterLeave),
  30639. onBeforeLeave: unref(beforeLeave),
  30640. persisted: ""
  30641. }, {
  30642. default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
  30643. mask: __props.modal,
  30644. "overlay-class": [
  30645. unref(ns).is("drawer"),
  30646. __props.modalClass ?? "",
  30647. `${unref(ns).namespace.value}-modal-drawer`,
  30648. unref(ns).is("penetrable", penetrable.value)
  30649. ],
  30650. "z-index": unref(zIndex),
  30651. onClick: unref(onModalClick)
  30652. }, {
  30653. default: withCtx(() => [createVNode(unref(focus_trap_default$1), {
  30654. loop: "",
  30655. trapped: unref(visible),
  30656. "focus-trap-el": drawerRef.value,
  30657. "focus-start-el": focusStartRef.value,
  30658. onFocusAfterTrapped: unref(onOpenAutoFocus),
  30659. onFocusAfterReleased: unref(onCloseAutoFocus),
  30660. onFocusoutPrevented: unref(onFocusoutPrevented),
  30661. onReleaseRequested: unref(onCloseRequested)
  30662. }, {
  30663. default: withCtx(() => [createBaseVNode("div", mergeProps({
  30664. ref_key: "drawerRef",
  30665. ref: drawerRef,
  30666. "aria-modal": "true",
  30667. "aria-label": __props.title || void 0,
  30668. "aria-labelledby": !__props.title ? unref(titleId) : void 0,
  30669. "aria-describedby": unref(bodyId)
  30670. }, _ctx.$attrs, {
  30671. class: [
  30672. unref(ns).b(),
  30673. __props.direction,
  30674. unref(visible) && "open",
  30675. unref(ns).is("dragging", unref(isResizing))
  30676. ],
  30677. style: { [unref(isHorizontal) ? "width" : "height"]: unref(size) },
  30678. role: "dialog",
  30679. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  30680. }), [
  30681. createBaseVNode("span", {
  30682. ref_key: "focusStartRef",
  30683. ref: focusStartRef,
  30684. class: normalizeClass(unref(ns).e("sr-focus")),
  30685. tabindex: "-1"
  30686. }, null, 2),
  30687. __props.withHeader ? (openBlock(), createElementBlock("header", {
  30688. key: 0,
  30689. class: normalizeClass([unref(ns).e("header"), __props.headerClass])
  30690. }, [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  30691. key: 0,
  30692. close: unref(handleClose),
  30693. titleId: unref(titleId),
  30694. titleClass: unref(ns).e("title")
  30695. }, () => [createBaseVNode("span", {
  30696. id: unref(titleId),
  30697. role: "heading",
  30698. "aria-level": __props.headerAriaLevel,
  30699. class: normalizeClass(unref(ns).e("title"))
  30700. }, toDisplayString(__props.title), 11, _hoisted_2$24)]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [createCommentVNode(" DEPRECATED SLOT ")]), __props.showClose ? (openBlock(), createElementBlock("button", {
  30701. key: 2,
  30702. "aria-label": unref(t)("el.drawer.close"),
  30703. class: normalizeClass(unref(ns).e("close-btn")),
  30704. type: "button",
  30705. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClose) && unref(handleClose)(...args))
  30706. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  30707. default: withCtx(() => [createVNode(unref(close_default))]),
  30708. _: 1
  30709. }, 8, ["class"])], 10, _hoisted_3$9)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  30710. unref(rendered) ? (openBlock(), createElementBlock("div", {
  30711. key: 1,
  30712. id: unref(bodyId),
  30713. class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
  30714. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_4$7)) : createCommentVNode("v-if", true),
  30715. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  30716. key: 2,
  30717. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  30718. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true),
  30719. __props.resizable ? (openBlock(), createElementBlock("div", {
  30720. key: 3,
  30721. ref_key: "draggerRef",
  30722. ref: draggerRef,
  30723. style: normalizeStyle({ zIndex: unref(zIndex) }),
  30724. class: normalizeClass(unref(ns).e("dragger"))
  30725. }, null, 6)) : createCommentVNode("v-if", true)
  30726. ], 16, _hoisted_1$40)]),
  30727. _: 3
  30728. }, 8, [
  30729. "trapped",
  30730. "focus-trap-el",
  30731. "focus-start-el",
  30732. "onFocusAfterTrapped",
  30733. "onFocusAfterReleased",
  30734. "onFocusoutPrevented",
  30735. "onReleaseRequested"
  30736. ])]),
  30737. _: 3
  30738. }, 8, [
  30739. "mask",
  30740. "overlay-class",
  30741. "z-index",
  30742. "onClick"
  30743. ]), [[vShow, unref(visible)]])]),
  30744. _: 3
  30745. }, 8, [
  30746. "name",
  30747. "onAfterEnter",
  30748. "onAfterLeave",
  30749. "onBeforeLeave"
  30750. ])]),
  30751. _: 3
  30752. }, 8, ["to", "disabled"]);
  30753. };
  30754. }
  30755. }));
  30756. //#endregion
  30757. //#region node_modules/element-plus/es/components/dropdown/src/dropdown.mjs
  30758. var dropdownProps = buildProps({
  30759. trigger: {
  30760. ...useTooltipTriggerProps.trigger,
  30761. type: definePropType([String, Array])
  30762. },
  30763. triggerKeys: {
  30764. type: definePropType(Array),
  30765. default: () => [
  30766. EVENT_CODE.enter,
  30767. EVENT_CODE.numpadEnter,
  30768. EVENT_CODE.space,
  30769. EVENT_CODE.down
  30770. ]
  30771. },
  30772. virtualTriggering: useTooltipTriggerProps.virtualTriggering,
  30773. virtualRef: useTooltipTriggerProps.virtualRef,
  30774. effect: {
  30775. ...useTooltipContentProps.effect,
  30776. default: "light"
  30777. },
  30778. type: { type: definePropType(String) },
  30779. placement: {
  30780. type: definePropType(String),
  30781. default: "bottom"
  30782. },
  30783. popperOptions: {
  30784. type: definePropType(Object),
  30785. default: () => ({})
  30786. },
  30787. id: String,
  30788. size: {
  30789. type: String,
  30790. default: ""
  30791. },
  30792. splitButton: Boolean,
  30793. hideOnClick: {
  30794. type: Boolean,
  30795. default: true
  30796. },
  30797. loop: {
  30798. type: Boolean,
  30799. default: true
  30800. },
  30801. showArrow: {
  30802. type: Boolean,
  30803. default: true
  30804. },
  30805. showTimeout: {
  30806. type: Number,
  30807. default: 150
  30808. },
  30809. hideTimeout: {
  30810. type: Number,
  30811. default: 150
  30812. },
  30813. tabindex: {
  30814. type: definePropType([Number, String]),
  30815. default: 0
  30816. },
  30817. maxHeight: {
  30818. type: definePropType([Number, String]),
  30819. default: ""
  30820. },
  30821. popperClass: useTooltipContentProps.popperClass,
  30822. popperStyle: useTooltipContentProps.popperStyle,
  30823. disabled: Boolean,
  30824. role: {
  30825. type: String,
  30826. values: roleTypes,
  30827. default: "menu"
  30828. },
  30829. buttonProps: { type: definePropType(Object) },
  30830. teleported: useTooltipContentProps.teleported,
  30831. appendTo: useTooltipContentProps.appendTo,
  30832. persistent: {
  30833. type: Boolean,
  30834. default: true
  30835. }
  30836. });
  30837. var dropdownItemProps = buildProps({
  30838. command: {
  30839. type: [
  30840. Object,
  30841. String,
  30842. Number
  30843. ],
  30844. default: () => ({})
  30845. },
  30846. disabled: Boolean,
  30847. divided: Boolean,
  30848. textValue: String,
  30849. icon: { type: iconPropType }
  30850. });
  30851. var dropdownMenuProps = buildProps({ onKeydown: { type: definePropType(Function) } });
  30852. var FIRST_KEYS = [
  30853. EVENT_CODE.down,
  30854. EVENT_CODE.pageDown,
  30855. EVENT_CODE.home
  30856. ];
  30857. var LAST_KEYS = [
  30858. EVENT_CODE.up,
  30859. EVENT_CODE.pageUp,
  30860. EVENT_CODE.end
  30861. ];
  30862. var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
  30863. //#endregion
  30864. //#region node_modules/element-plus/es/components/dropdown/src/tokens.mjs
  30865. var DROPDOWN_INJECTION_KEY = Symbol("elDropdown");
  30866. var DROPDOWN_INSTANCE_INJECTION_KEY = "elDropdown";
  30867. //#endregion
  30868. //#region node_modules/element-plus/es/components/collection/src/collection.vue_vue_type_script_lang.mjs
  30869. var collection_vue_vue_type_script_lang_default = defineComponent({ inheritAttrs: false });
  30870. //#endregion
  30871. //#region node_modules/element-plus/es/components/collection/src/collection2.mjs
  30872. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  30873. return renderSlot(_ctx.$slots, "default");
  30874. }
  30875. var collection_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_vue_vue_type_script_lang_default, [["render", _sfc_render$16]]);
  30876. //#endregion
  30877. //#region node_modules/element-plus/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs
  30878. var collection_item_vue_vue_type_script_lang_default = defineComponent({
  30879. name: "ElCollectionItem",
  30880. inheritAttrs: false
  30881. });
  30882. //#endregion
  30883. //#region node_modules/element-plus/es/components/collection/src/collection-item.mjs
  30884. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  30885. return renderSlot(_ctx.$slots, "default");
  30886. }
  30887. var collection_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_item_vue_vue_type_script_lang_default, [["render", _sfc_render$15]]);
  30888. //#endregion
  30889. //#region node_modules/element-plus/es/components/collection/src/collection.mjs
  30890. var COLLECTION_ITEM_SIGN = `data-el-collection-item`;
  30891. var createCollectionWithScope = (name) => {
  30892. const COLLECTION_NAME = `El${name}Collection`;
  30893. const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
  30894. const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
  30895. const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
  30896. return {
  30897. COLLECTION_INJECTION_KEY,
  30898. COLLECTION_ITEM_INJECTION_KEY,
  30899. ElCollection: Object.assign({}, collection_default, {
  30900. name: COLLECTION_NAME,
  30901. setup() {
  30902. const collectionRef = ref();
  30903. const itemMap = /* @__PURE__ */ new Map();
  30904. const getItems = (() => {
  30905. const collectionEl = unref(collectionRef);
  30906. if (!collectionEl) return [];
  30907. const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
  30908. return [...itemMap.values()].sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
  30909. });
  30910. provide(COLLECTION_INJECTION_KEY, {
  30911. itemMap,
  30912. getItems,
  30913. collectionRef
  30914. });
  30915. }
  30916. }),
  30917. ElCollectionItem: Object.assign({}, collection_item_default, {
  30918. name: COLLECTION_ITEM_NAME,
  30919. setup(_, { attrs }) {
  30920. const collectionItemRef = ref();
  30921. const collectionInjection = inject(COLLECTION_INJECTION_KEY, void 0);
  30922. provide(COLLECTION_ITEM_INJECTION_KEY, { collectionItemRef });
  30923. onMounted(() => {
  30924. const collectionItemEl = unref(collectionItemRef);
  30925. if (collectionItemEl) collectionInjection.itemMap.set(collectionItemEl, {
  30926. ref: collectionItemEl,
  30927. ...attrs
  30928. });
  30929. });
  30930. onBeforeUnmount(() => {
  30931. const collectionItemEl = unref(collectionItemRef);
  30932. collectionInjection.itemMap.delete(collectionItemEl);
  30933. });
  30934. }
  30935. })
  30936. };
  30937. };
  30938. //#endregion
  30939. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
  30940. var rovingFocusGroupProps = buildProps({
  30941. style: { type: definePropType([
  30942. String,
  30943. Array,
  30944. Object
  30945. ]) },
  30946. currentTabId: { type: definePropType(String) },
  30947. defaultCurrentTabId: String,
  30948. loop: Boolean,
  30949. dir: {
  30950. type: String,
  30951. values: ["ltr", "rtl"],
  30952. default: "ltr"
  30953. },
  30954. orientation: { type: definePropType(String) },
  30955. onBlur: Function,
  30956. onFocus: Function,
  30957. onMousedown: Function
  30958. });
  30959. var { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY } = createCollectionWithScope("RovingFocusGroup");
  30960. //#endregion
  30961. //#region node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
  30962. var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
  30963. var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
  30964. //#endregion
  30965. //#region node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
  30966. var MAP_KEY_TO_FOCUS_INTENT = {
  30967. ArrowLeft: "prev",
  30968. ArrowUp: "prev",
  30969. ArrowRight: "next",
  30970. ArrowDown: "next",
  30971. PageUp: "first",
  30972. Home: "first",
  30973. PageDown: "last",
  30974. End: "last"
  30975. };
  30976. var getDirectionAwareKey = (key, dir) => {
  30977. if (dir !== "rtl") return key;
  30978. switch (key) {
  30979. case EVENT_CODE.right: return EVENT_CODE.left;
  30980. case EVENT_CODE.left: return EVENT_CODE.right;
  30981. default: return key;
  30982. }
  30983. };
  30984. var getFocusIntent = (event, orientation, dir) => {
  30985. const key = getDirectionAwareKey(getEventCode(event), dir);
  30986. if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key)) return void 0;
  30987. if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key)) return void 0;
  30988. return MAP_KEY_TO_FOCUS_INTENT[key];
  30989. };
  30990. var reorderArray = (array, atIdx) => {
  30991. return array.map((_, idx) => array[(idx + atIdx) % array.length]);
  30992. };
  30993. var focusFirst = (elements) => {
  30994. const { activeElement: prevActive } = document;
  30995. for (const element of elements) {
  30996. if (element === prevActive) return;
  30997. element.focus();
  30998. if (prevActive !== document.activeElement) return;
  30999. }
  31000. };
  31001. //#endregion
  31002. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs
  31003. var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
  31004. var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
  31005. var EVT_OPTS = {
  31006. bubbles: false,
  31007. cancelable: true
  31008. };
  31009. var roving_focus_group_impl_vue_vue_type_script_lang_default = defineComponent({
  31010. name: "ElRovingFocusGroupImpl",
  31011. inheritAttrs: false,
  31012. props: rovingFocusGroupProps,
  31013. emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
  31014. setup(props, { emit }) {
  31015. const currentTabbedId = ref((props.currentTabId || props.defaultCurrentTabId) ?? null);
  31016. const isBackingOut = ref(false);
  31017. const isClickFocus = ref(false);
  31018. const rovingFocusGroupRef = ref();
  31019. const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
  31020. const rovingFocusGroupRootStyle = computed(() => {
  31021. return [{ outline: "none" }, props.style];
  31022. });
  31023. const onItemFocus = (tabbedId) => {
  31024. emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
  31025. };
  31026. const onItemShiftTab = () => {
  31027. isBackingOut.value = true;
  31028. };
  31029. const onMousedown = composeEventHandlers((e) => {
  31030. props.onMousedown?.(e);
  31031. }, () => {
  31032. isClickFocus.value = true;
  31033. });
  31034. const onFocus = composeEventHandlers((e) => {
  31035. props.onFocus?.(e);
  31036. }, (e) => {
  31037. const isKeyboardFocus = !unref(isClickFocus);
  31038. const { target, currentTarget } = e;
  31039. if (target === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
  31040. const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
  31041. currentTarget?.dispatchEvent(entryFocusEvt);
  31042. if (!entryFocusEvt.defaultPrevented) {
  31043. const items = getItems().filter((item) => item.focusable);
  31044. focusFirst([
  31045. items.find((item) => item.active),
  31046. items.find((item) => item.id === unref(currentTabbedId)),
  31047. ...items
  31048. ].filter(Boolean).map((item) => item.ref));
  31049. }
  31050. }
  31051. isClickFocus.value = false;
  31052. });
  31053. const onBlur = composeEventHandlers((e) => {
  31054. props.onBlur?.(e);
  31055. }, () => {
  31056. isBackingOut.value = false;
  31057. });
  31058. const handleEntryFocus = (...args) => {
  31059. emit("entryFocus", ...args);
  31060. };
  31061. const onKeydown = (e) => {
  31062. const focusIntent = getFocusIntent(e);
  31063. if (focusIntent) {
  31064. e.preventDefault();
  31065. let elements = getItems().filter((item) => item.focusable).map((item) => item.ref);
  31066. switch (focusIntent) {
  31067. case "last":
  31068. elements.reverse();
  31069. break;
  31070. case "prev":
  31071. case "next": {
  31072. if (focusIntent === "prev") elements.reverse();
  31073. const currentIdx = elements.indexOf(e.currentTarget);
  31074. elements = props.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
  31075. break;
  31076. }
  31077. default: break;
  31078. }
  31079. nextTick(() => {
  31080. focusFirst(elements);
  31081. });
  31082. }
  31083. };
  31084. provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
  31085. currentTabbedId: readonly(currentTabbedId),
  31086. loop: toRef(props, "loop"),
  31087. tabIndex: computed(() => {
  31088. return unref(isBackingOut) ? -1 : 0;
  31089. }),
  31090. rovingFocusGroupRef,
  31091. rovingFocusGroupRootStyle,
  31092. orientation: toRef(props, "orientation"),
  31093. dir: toRef(props, "dir"),
  31094. onItemFocus,
  31095. onItemShiftTab,
  31096. onBlur,
  31097. onFocus,
  31098. onMousedown,
  31099. onKeydown
  31100. });
  31101. watch(() => props.currentTabId, (val) => {
  31102. currentTabbedId.value = val ?? null;
  31103. });
  31104. useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
  31105. }
  31106. });
  31107. //#endregion
  31108. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
  31109. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  31110. return renderSlot(_ctx.$slots, "default");
  31111. }
  31112. //#endregion
  31113. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
  31114. var roving_focus_group_vue_vue_type_script_lang_default = defineComponent({
  31115. name: "ElRovingFocusGroup",
  31116. components: {
  31117. ElFocusGroupCollection: ElCollection,
  31118. ElRovingFocusGroupImpl: /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$14]])
  31119. }
  31120. });
  31121. //#endregion
  31122. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
  31123. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  31124. const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
  31125. const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
  31126. return openBlock(), createBlock(_component_el_focus_group_collection, null, {
  31127. default: withCtx(() => [createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
  31128. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  31129. _: 3
  31130. }, 16)]),
  31131. _: 3
  31132. });
  31133. }
  31134. var roving_focus_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_vue_vue_type_script_lang_default, [["render", _sfc_render$13]]);
  31135. //#endregion
  31136. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs
  31137. var roving_focus_item_vue_vue_type_script_lang_default = defineComponent({
  31138. components: { ElRovingFocusCollectionItem: ElCollectionItem },
  31139. props: {
  31140. focusable: {
  31141. type: Boolean,
  31142. default: true
  31143. },
  31144. active: Boolean
  31145. },
  31146. emits: [
  31147. "mousedown",
  31148. "focus",
  31149. "keydown"
  31150. ],
  31151. setup(props, { emit }) {
  31152. const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  31153. const id = useId();
  31154. const rovingFocusGroupItemRef = ref();
  31155. const handleMousedown = composeEventHandlers((e) => {
  31156. emit("mousedown", e);
  31157. }, (e) => {
  31158. if (!props.focusable) e.preventDefault();
  31159. else onItemFocus(unref(id));
  31160. });
  31161. const handleFocus = composeEventHandlers((e) => {
  31162. emit("focus", e);
  31163. }, () => {
  31164. onItemFocus(unref(id));
  31165. });
  31166. const handleKeydown = composeEventHandlers((e) => {
  31167. emit("keydown", e);
  31168. }, (e) => {
  31169. const { shiftKey, target, currentTarget } = e;
  31170. if (getEventCode(e) === EVENT_CODE.tab && shiftKey) {
  31171. onItemShiftTab();
  31172. return;
  31173. }
  31174. if (target !== currentTarget) return;
  31175. onKeydown(e);
  31176. });
  31177. const isCurrentTab = computed(() => currentTabbedId.value === unref(id));
  31178. provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
  31179. rovingFocusGroupItemRef,
  31180. tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1),
  31181. handleMousedown,
  31182. handleFocus,
  31183. handleKeydown
  31184. });
  31185. return {
  31186. id,
  31187. handleKeydown,
  31188. handleFocus,
  31189. handleMousedown
  31190. };
  31191. }
  31192. });
  31193. //#endregion
  31194. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
  31195. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  31196. const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
  31197. return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
  31198. id: _ctx.id,
  31199. focusable: _ctx.focusable,
  31200. active: _ctx.active
  31201. }, {
  31202. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  31203. _: 3
  31204. }, 8, [
  31205. "id",
  31206. "focusable",
  31207. "active"
  31208. ]);
  31209. }
  31210. var roving_focus_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_item_vue_vue_type_script_lang_default, [["render", _sfc_render$12]]);
  31211. //#endregion
  31212. //#region node_modules/element-plus/es/components/roving-focus-group/index.mjs
  31213. var roving_focus_group_default$1 = roving_focus_group_default;
  31214. //#endregion
  31215. //#region node_modules/element-plus/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs
  31216. var { ButtonGroup: ElButtonGroup$1 } = ElButton;
  31217. var dropdown_vue_vue_type_script_lang_default = defineComponent({
  31218. name: "ElDropdown",
  31219. components: {
  31220. ElButton,
  31221. ElButtonGroup: ElButtonGroup$1,
  31222. ElScrollbar,
  31223. ElTooltip,
  31224. ElRovingFocusGroup: roving_focus_group_default$1,
  31225. ElOnlyChild: OnlyChild,
  31226. ElIcon,
  31227. ArrowDown: arrow_down_default
  31228. },
  31229. props: dropdownProps,
  31230. emits: [
  31231. "visible-change",
  31232. "click",
  31233. "command"
  31234. ],
  31235. setup(props, { emit }) {
  31236. const _instance = getCurrentInstance();
  31237. const ns = useNamespace("dropdown");
  31238. const { t } = useLocale();
  31239. const triggeringElementRef = ref();
  31240. const referenceElementRef = ref();
  31241. const popperRef = ref();
  31242. const contentRef = ref();
  31243. const scrollbar = ref(null);
  31244. const currentTabId = ref(null);
  31245. const isUsingKeyboard = ref(false);
  31246. const wrapStyle = computed(() => ({ maxHeight: addUnit(props.maxHeight) }));
  31247. const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)]);
  31248. const trigger = computed(() => castArray$1(props.trigger));
  31249. const defaultTriggerId = useId().value;
  31250. const triggerId = computed(() => props.id || defaultTriggerId);
  31251. function handleClick() {
  31252. popperRef.value?.onClose(void 0, 0);
  31253. }
  31254. function handleClose() {
  31255. popperRef.value?.onClose();
  31256. }
  31257. function handleOpen() {
  31258. popperRef.value?.onOpen();
  31259. }
  31260. const dropdownSize = useFormSize();
  31261. function commandHandler(...args) {
  31262. emit("command", ...args);
  31263. }
  31264. function onItemEnter() {}
  31265. function onItemLeave() {
  31266. const contentEl = unref(contentRef);
  31267. trigger.value.includes("hover") && contentEl?.focus({ preventScroll: true });
  31268. currentTabId.value = null;
  31269. }
  31270. function handleCurrentTabIdChange(id) {
  31271. currentTabId.value = id;
  31272. }
  31273. function handleBeforeShowTooltip() {
  31274. emit("visible-change", true);
  31275. }
  31276. function handleShowTooltip(event) {
  31277. isUsingKeyboard.value = event?.type === "keydown";
  31278. contentRef.value?.focus();
  31279. }
  31280. function handleBeforeHideTooltip() {
  31281. emit("visible-change", false);
  31282. }
  31283. provide(DROPDOWN_INJECTION_KEY, {
  31284. contentRef,
  31285. role: computed(() => props.role),
  31286. triggerId,
  31287. isUsingKeyboard,
  31288. onItemEnter,
  31289. onItemLeave,
  31290. handleClose
  31291. });
  31292. provide(DROPDOWN_INSTANCE_INJECTION_KEY, {
  31293. instance: _instance,
  31294. dropdownSize,
  31295. handleClick,
  31296. commandHandler,
  31297. trigger: toRef(props, "trigger"),
  31298. hideOnClick: toRef(props, "hideOnClick")
  31299. });
  31300. const handlerMainButtonClick = (event) => {
  31301. emit("click", event);
  31302. };
  31303. return {
  31304. t,
  31305. ns,
  31306. scrollbar,
  31307. wrapStyle,
  31308. dropdownTriggerKls,
  31309. dropdownSize,
  31310. triggerId,
  31311. currentTabId,
  31312. handleCurrentTabIdChange,
  31313. handlerMainButtonClick,
  31314. handleClose,
  31315. handleOpen,
  31316. handleBeforeShowTooltip,
  31317. handleShowTooltip,
  31318. handleBeforeHideTooltip,
  31319. popperRef,
  31320. contentRef,
  31321. triggeringElementRef,
  31322. referenceElementRef
  31323. };
  31324. }
  31325. });
  31326. //#endregion
  31327. //#region node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
  31328. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  31329. const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group");
  31330. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  31331. const _component_el_only_child = resolveComponent("el-only-child");
  31332. const _component_el_tooltip = resolveComponent("el-tooltip");
  31333. const _component_el_button = resolveComponent("el-button");
  31334. const _component_arrow_down = resolveComponent("arrow-down");
  31335. const _component_el_icon = resolveComponent("el-icon");
  31336. const _component_el_button_group = resolveComponent("el-button-group");
  31337. return openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)]) }, [createVNode(_component_el_tooltip, {
  31338. ref: "popperRef",
  31339. role: _ctx.role,
  31340. effect: _ctx.effect,
  31341. "fallback-placements": ["bottom", "top"],
  31342. "popper-options": _ctx.popperOptions,
  31343. "gpu-acceleration": false,
  31344. placement: _ctx.placement,
  31345. "popper-class": [_ctx.ns.e("popper"), _ctx.popperClass],
  31346. "popper-style": _ctx.popperStyle,
  31347. trigger: _ctx.trigger,
  31348. "trigger-keys": _ctx.triggerKeys,
  31349. "trigger-target-el": _ctx.contentRef,
  31350. "show-arrow": _ctx.showArrow,
  31351. "show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0,
  31352. "hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0,
  31353. "virtual-ref": _ctx.virtualRef ?? _ctx.triggeringElementRef,
  31354. "virtual-triggering": _ctx.virtualTriggering || _ctx.splitButton,
  31355. disabled: _ctx.disabled,
  31356. transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
  31357. teleported: _ctx.teleported,
  31358. "append-to": _ctx.appendTo,
  31359. pure: "",
  31360. "focus-on-target": "",
  31361. persistent: _ctx.persistent,
  31362. onBeforeShow: _ctx.handleBeforeShowTooltip,
  31363. onShow: _ctx.handleShowTooltip,
  31364. onBeforeHide: _ctx.handleBeforeHideTooltip
  31365. }, createSlots({
  31366. content: withCtx(() => [createVNode(_component_el_scrollbar, {
  31367. ref: "scrollbar",
  31368. "wrap-style": _ctx.wrapStyle,
  31369. tag: "div",
  31370. "view-class": _ctx.ns.e("list")
  31371. }, {
  31372. default: withCtx(() => [createVNode(_component_el_roving_focus_group, {
  31373. loop: _ctx.loop,
  31374. "current-tab-id": _ctx.currentTabId,
  31375. orientation: "horizontal",
  31376. onCurrentTabIdChange: _ctx.handleCurrentTabIdChange
  31377. }, {
  31378. default: withCtx(() => [renderSlot(_ctx.$slots, "dropdown")]),
  31379. _: 3
  31380. }, 8, [
  31381. "loop",
  31382. "current-tab-id",
  31383. "onCurrentTabIdChange"
  31384. ])]),
  31385. _: 3
  31386. }, 8, ["wrap-style", "view-class"])]),
  31387. _: 2
  31388. }, [!_ctx.splitButton ? {
  31389. name: "default",
  31390. fn: withCtx(() => [createVNode(_component_el_only_child, {
  31391. id: _ctx.triggerId,
  31392. ref: "triggeringElementRef",
  31393. role: "button",
  31394. tabindex: _ctx.tabindex
  31395. }, {
  31396. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  31397. _: 3
  31398. }, 8, ["id", "tabindex"])]),
  31399. key: "0"
  31400. } : void 0]), 1032, [
  31401. "role",
  31402. "effect",
  31403. "popper-options",
  31404. "placement",
  31405. "popper-class",
  31406. "popper-style",
  31407. "trigger",
  31408. "trigger-keys",
  31409. "trigger-target-el",
  31410. "show-arrow",
  31411. "show-after",
  31412. "hide-after",
  31413. "virtual-ref",
  31414. "virtual-triggering",
  31415. "disabled",
  31416. "transition",
  31417. "teleported",
  31418. "append-to",
  31419. "persistent",
  31420. "onBeforeShow",
  31421. "onShow",
  31422. "onBeforeHide"
  31423. ]), _ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
  31424. default: withCtx(() => [createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
  31425. size: _ctx.dropdownSize,
  31426. type: _ctx.type,
  31427. disabled: _ctx.disabled,
  31428. tabindex: _ctx.tabindex,
  31429. onClick: _ctx.handlerMainButtonClick
  31430. }), {
  31431. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  31432. _: 3
  31433. }, 16, [
  31434. "size",
  31435. "type",
  31436. "disabled",
  31437. "tabindex",
  31438. "onClick"
  31439. ]), createVNode(_component_el_button, mergeProps({
  31440. id: _ctx.triggerId,
  31441. ref: "triggeringElementRef"
  31442. }, _ctx.buttonProps, {
  31443. role: "button",
  31444. size: _ctx.dropdownSize,
  31445. type: _ctx.type,
  31446. class: _ctx.ns.e("caret-button"),
  31447. disabled: _ctx.disabled,
  31448. tabindex: _ctx.tabindex,
  31449. "aria-label": _ctx.t("el.dropdown.toggleDropdown")
  31450. }), {
  31451. default: withCtx(() => [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("icon")) }, {
  31452. default: withCtx(() => [createVNode(_component_arrow_down)]),
  31453. _: 1
  31454. }, 8, ["class"])]),
  31455. _: 1
  31456. }, 16, [
  31457. "id",
  31458. "size",
  31459. "type",
  31460. "class",
  31461. "disabled",
  31462. "tabindex",
  31463. "aria-label"
  31464. ])]),
  31465. _: 3
  31466. })) : createCommentVNode("v-if", true)], 2);
  31467. }
  31468. var dropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$11]]);
  31469. //#endregion
  31470. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs
  31471. var dropdown_item_impl_vue_vue_type_script_lang_default = defineComponent({
  31472. name: "DropdownItemImpl",
  31473. components: { ElIcon },
  31474. props: dropdownItemProps,
  31475. emits: [
  31476. "pointermove",
  31477. "pointerleave",
  31478. "click",
  31479. "clickimpl"
  31480. ],
  31481. setup(_, { emit }) {
  31482. const ns = useNamespace("dropdown");
  31483. const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0);
  31484. const { collectionItemRef: rovingFocusCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY, void 0);
  31485. const { rovingFocusGroupItemRef, tabIndex, handleFocus, handleKeydown: handleItemKeydown, handleMousedown } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0);
  31486. const itemRef = composeRefs(rovingFocusCollectionItemRef, rovingFocusGroupItemRef);
  31487. const role = computed(() => {
  31488. if (menuRole.value === "menu") return "menuitem";
  31489. else if (menuRole.value === "navigation") return "link";
  31490. return "button";
  31491. });
  31492. const handleKeydown = composeEventHandlers((e) => {
  31493. const code = getEventCode(e);
  31494. if ([
  31495. EVENT_CODE.enter,
  31496. EVENT_CODE.numpadEnter,
  31497. EVENT_CODE.space
  31498. ].includes(code)) {
  31499. e.preventDefault();
  31500. e.stopImmediatePropagation();
  31501. emit("clickimpl", e);
  31502. return true;
  31503. }
  31504. }, handleItemKeydown);
  31505. return {
  31506. ns,
  31507. itemRef,
  31508. dataset: { [COLLECTION_ITEM_SIGN]: "" },
  31509. role,
  31510. tabIndex,
  31511. handleFocus,
  31512. handleKeydown,
  31513. handleMousedown
  31514. };
  31515. }
  31516. });
  31517. //#endregion
  31518. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs
  31519. var _hoisted_1$39 = [
  31520. "aria-disabled",
  31521. "tabindex",
  31522. "role"
  31523. ];
  31524. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  31525. const _component_el_icon = resolveComponent("el-icon");
  31526. return openBlock(), createElementBlock(Fragment, null, [_ctx.divided ? (openBlock(), createElementBlock("li", {
  31527. key: 0,
  31528. role: "separator",
  31529. class: normalizeClass(_ctx.ns.bem("menu", "item", "divided"))
  31530. }, null, 2)) : createCommentVNode("v-if", true), createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, {
  31531. ..._ctx.dataset,
  31532. ..._ctx.$attrs
  31533. }, {
  31534. "aria-disabled": _ctx.disabled,
  31535. class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
  31536. tabindex: _ctx.tabIndex,
  31537. role: _ctx.role,
  31538. onClick: _cache[0] || (_cache[0] = (e) => _ctx.$emit("clickimpl", e)),
  31539. onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  31540. onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
  31541. onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
  31542. onPointermove: _cache[4] || (_cache[4] = (e) => _ctx.$emit("pointermove", e)),
  31543. onPointerleave: _cache[5] || (_cache[5] = (e) => _ctx.$emit("pointerleave", e))
  31544. }), [_ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
  31545. default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))])]),
  31546. _: 3
  31547. })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$39)], 64);
  31548. }
  31549. var dropdown_item_impl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$10]]);
  31550. //#endregion
  31551. //#region node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs
  31552. var useDropdown = () => {
  31553. const elDropdown = inject(DROPDOWN_INSTANCE_INJECTION_KEY, {});
  31554. return {
  31555. elDropdown,
  31556. _elDropdownSize: computed(() => elDropdown?.dropdownSize)
  31557. };
  31558. };
  31559. //#endregion
  31560. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs
  31561. var dropdown_item_vue_vue_type_script_lang_default = defineComponent({
  31562. name: "ElDropdownItem",
  31563. components: {
  31564. ElRovingFocusItem: roving_focus_item_default,
  31565. ElDropdownItemImpl: dropdown_item_impl_default
  31566. },
  31567. inheritAttrs: false,
  31568. props: dropdownItemProps,
  31569. emits: [
  31570. "pointermove",
  31571. "pointerleave",
  31572. "click"
  31573. ],
  31574. setup(props, { emit, attrs }) {
  31575. const { elDropdown } = useDropdown();
  31576. const _instance = getCurrentInstance();
  31577. const { onItemEnter, onItemLeave } = inject(DROPDOWN_INJECTION_KEY, void 0);
  31578. const handlePointerMove = composeEventHandlers((e) => {
  31579. emit("pointermove", e);
  31580. return e.defaultPrevented;
  31581. }, whenMouse((e) => {
  31582. if (props.disabled) {
  31583. onItemLeave(e);
  31584. return;
  31585. }
  31586. const target = e.currentTarget;
  31587. /**
  31588. * This handles the following scenario:
  31589. * when the item contains a form element such as input element
  31590. * when the mouse is moving over the element itself which is contained by
  31591. * the item, the default focusing logic should be prevented so that
  31592. * it won't cause weird action.
  31593. */
  31594. if (target === document.activeElement || target.contains(document.activeElement)) return;
  31595. onItemEnter(e);
  31596. if (!e.defaultPrevented) target?.focus({ preventScroll: true });
  31597. }));
  31598. const handlePointerLeave = composeEventHandlers((e) => {
  31599. emit("pointerleave", e);
  31600. return e.defaultPrevented;
  31601. }, whenMouse(onItemLeave));
  31602. return {
  31603. handleClick: composeEventHandlers((e) => {
  31604. if (props.disabled) return;
  31605. emit("click", e);
  31606. return e.type !== "keydown" && e.defaultPrevented;
  31607. }, (e) => {
  31608. if (props.disabled) {
  31609. e.stopImmediatePropagation();
  31610. return;
  31611. }
  31612. if (elDropdown?.hideOnClick?.value) elDropdown.handleClick?.();
  31613. elDropdown.commandHandler?.(props.command, _instance, e);
  31614. }),
  31615. handlePointerMove,
  31616. handlePointerLeave,
  31617. propsAndAttrs: computed(() => ({
  31618. ...props,
  31619. ...attrs
  31620. }))
  31621. };
  31622. }
  31623. });
  31624. //#endregion
  31625. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
  31626. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  31627. const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl");
  31628. const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item");
  31629. return openBlock(), createBlock(_component_el_roving_focus_item, { focusable: !_ctx.disabled }, {
  31630. default: withCtx(() => [createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, {
  31631. onPointerleave: _ctx.handlePointerLeave,
  31632. onPointermove: _ctx.handlePointerMove,
  31633. onClickimpl: _ctx.handleClick
  31634. }), createSlots({
  31635. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  31636. _: 2
  31637. }, [_ctx.$slots.icon ? {
  31638. name: "icon",
  31639. fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
  31640. key: "0"
  31641. } : void 0]), 1040, [
  31642. "onPointerleave",
  31643. "onPointermove",
  31644. "onClickimpl"
  31645. ])]),
  31646. _: 3
  31647. }, 8, ["focusable"]);
  31648. }
  31649. var dropdown_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_vue_vue_type_script_lang_default, [["render", _sfc_render$9]]);
  31650. //#endregion
  31651. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs
  31652. var dropdown_menu_vue_vue_type_script_lang_default = defineComponent({
  31653. name: "ElDropdownMenu",
  31654. props: dropdownMenuProps,
  31655. setup(props) {
  31656. const ns = useNamespace("dropdown");
  31657. const { _elDropdownSize } = useDropdown();
  31658. const size = _elDropdownSize.value;
  31659. const { contentRef, role, triggerId, isUsingKeyboard, handleClose } = inject(DROPDOWN_INJECTION_KEY, void 0);
  31660. const { rovingFocusGroupRef, rovingFocusGroupRootStyle, onBlur, onFocus, onKeydown, onMousedown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  31661. const { collectionRef: rovingFocusGroupCollectionRef } = inject(COLLECTION_INJECTION_KEY, void 0);
  31662. const dropdownKls = computed(() => {
  31663. return [ns.b("menu"), ns.bm("menu", size?.value)];
  31664. });
  31665. const dropdownListWrapperRef = composeRefs(contentRef, rovingFocusGroupRef, rovingFocusGroupCollectionRef);
  31666. const handleKeydown = composeEventHandlers((e) => {
  31667. props.onKeydown?.(e);
  31668. }, (e) => {
  31669. const { currentTarget, target } = e;
  31670. const code = getEventCode(e);
  31671. if (currentTarget.contains(target)) {}
  31672. if (EVENT_CODE.tab === code) return handleClose();
  31673. onKeydown(e);
  31674. });
  31675. function handleFocus(e) {
  31676. isUsingKeyboard.value && onFocus(e);
  31677. }
  31678. return {
  31679. size,
  31680. rovingFocusGroupRootStyle,
  31681. dropdownKls,
  31682. role,
  31683. triggerId,
  31684. dropdownListWrapperRef,
  31685. handleKeydown,
  31686. onBlur,
  31687. handleFocus,
  31688. onMousedown
  31689. };
  31690. }
  31691. });
  31692. //#endregion
  31693. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs
  31694. var _hoisted_1$38 = ["role", "aria-labelledby"];
  31695. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  31696. return openBlock(), createElementBlock("ul", {
  31697. ref: _ctx.dropdownListWrapperRef,
  31698. class: normalizeClass(_ctx.dropdownKls),
  31699. style: normalizeStyle(_ctx.rovingFocusGroupRootStyle),
  31700. tabindex: -1,
  31701. role: _ctx.role,
  31702. "aria-labelledby": _ctx.triggerId,
  31703. onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  31704. onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
  31705. onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
  31706. onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onMousedown && _ctx.onMousedown(...args), ["self"]))
  31707. }, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$38);
  31708. }
  31709. var dropdown_menu_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_menu_vue_vue_type_script_lang_default, [["render", _sfc_render$8]]);
  31710. //#endregion
  31711. //#region node_modules/element-plus/es/components/dropdown/index.mjs
  31712. var ElDropdown = withInstall(dropdown_default, {
  31713. DropdownItem: dropdown_item_default,
  31714. DropdownMenu: dropdown_menu_default
  31715. });
  31716. var ElDropdownItem = withNoopInstall(dropdown_item_default);
  31717. var ElDropdownMenu = withNoopInstall(dropdown_menu_default);
  31718. //#endregion
  31719. //#region node_modules/element-plus/es/components/empty/src/empty.mjs
  31720. /**
  31721. * @deprecated Removed after 3.0.0, Use `EmptyProps` instead.
  31722. */
  31723. var emptyProps = buildProps({
  31724. image: {
  31725. type: String,
  31726. default: ""
  31727. },
  31728. imageSize: Number,
  31729. description: {
  31730. type: String,
  31731. default: ""
  31732. }
  31733. });
  31734. //#endregion
  31735. //#region node_modules/element-plus/es/components/empty/src/img-empty.vue_vue_type_script_setup_true_lang.mjs
  31736. var _hoisted_1$37 = {
  31737. viewBox: "0 0 79 86",
  31738. version: "1.1",
  31739. xmlns: "http://www.w3.org/2000/svg",
  31740. "xmlns:xlink": "http://www.w3.org/1999/xlink"
  31741. };
  31742. var _hoisted_2$23 = ["id"];
  31743. var _hoisted_3$8 = ["stop-color"];
  31744. var _hoisted_4$6 = ["stop-color"];
  31745. var _hoisted_5$4 = ["id"];
  31746. var _hoisted_6$1 = ["stop-color"];
  31747. var _hoisted_7 = ["stop-color"];
  31748. var _hoisted_8 = ["id"];
  31749. var _hoisted_9 = {
  31750. stroke: "none",
  31751. "stroke-width": "1",
  31752. fill: "none",
  31753. "fill-rule": "evenodd"
  31754. };
  31755. var _hoisted_10 = { transform: "translate(-1268.000000, -535.000000)" };
  31756. var _hoisted_11 = { transform: "translate(1268.000000, 535.000000)" };
  31757. var _hoisted_12 = ["fill"];
  31758. var _hoisted_13 = ["fill"];
  31759. var _hoisted_14 = { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" };
  31760. var _hoisted_15 = ["fill"];
  31761. var _hoisted_16 = ["fill"];
  31762. var _hoisted_17 = ["fill"];
  31763. var _hoisted_18 = ["fill"];
  31764. var _hoisted_19 = ["fill"];
  31765. var _hoisted_20 = { transform: "translate(53.000000, 45.000000)" };
  31766. var _hoisted_21 = ["fill", "xlink:href"];
  31767. var _hoisted_22 = ["fill", "mask"];
  31768. var _hoisted_23 = ["fill"];
  31769. //#endregion
  31770. //#region node_modules/element-plus/es/components/empty/src/img-empty.mjs
  31771. var img_empty_default = /* @__PURE__ */ defineComponent({
  31772. name: "ImgEmpty",
  31773. __name: "img-empty",
  31774. setup(__props) {
  31775. const ns = useNamespace("empty");
  31776. const id = useId();
  31777. return (_ctx, _cache) => {
  31778. return openBlock(), createElementBlock("svg", _hoisted_1$37, [createBaseVNode("defs", null, [
  31779. createBaseVNode("linearGradient", {
  31780. id: `linearGradient-1-${unref(id)}`,
  31781. x1: "38.8503086%",
  31782. y1: "0%",
  31783. x2: "61.1496914%",
  31784. y2: "100%"
  31785. }, [createBaseVNode("stop", {
  31786. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
  31787. offset: "0%"
  31788. }, null, 8, _hoisted_3$8), createBaseVNode("stop", {
  31789. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-4")})`,
  31790. offset: "100%"
  31791. }, null, 8, _hoisted_4$6)], 8, _hoisted_2$23),
  31792. createBaseVNode("linearGradient", {
  31793. id: `linearGradient-2-${unref(id)}`,
  31794. x1: "0%",
  31795. y1: "9.5%",
  31796. x2: "100%",
  31797. y2: "90.5%"
  31798. }, [createBaseVNode("stop", {
  31799. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
  31800. offset: "0%"
  31801. }, null, 8, _hoisted_6$1), createBaseVNode("stop", {
  31802. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`,
  31803. offset: "100%"
  31804. }, null, 8, _hoisted_7)], 8, _hoisted_5$4),
  31805. createBaseVNode("rect", {
  31806. id: `path-3-${unref(id)}`,
  31807. x: "0",
  31808. y: "0",
  31809. width: "17",
  31810. height: "36"
  31811. }, null, 8, _hoisted_8)
  31812. ]), createBaseVNode("g", _hoisted_9, [createBaseVNode("g", _hoisted_10, [createBaseVNode("g", _hoisted_11, [
  31813. createBaseVNode("path", {
  31814. 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",
  31815. fill: `var(${unref(ns).cssVarBlockName("fill-color-3")})`
  31816. }, null, 8, _hoisted_12),
  31817. createBaseVNode("polygon", {
  31818. fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
  31819. transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
  31820. points: "13 58 53 58 42 45 2 45"
  31821. }, null, 8, _hoisted_13),
  31822. createBaseVNode("g", _hoisted_14, [
  31823. createBaseVNode("polygon", {
  31824. fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
  31825. transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
  31826. points: "2.84078316e-14 3 18 3 23 7 5 7"
  31827. }, null, 8, _hoisted_15),
  31828. createBaseVNode("polygon", {
  31829. fill: `var(${unref(ns).cssVarBlockName("fill-color-5")})`,
  31830. points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
  31831. }, null, 8, _hoisted_16),
  31832. createBaseVNode("rect", {
  31833. fill: `url(#linearGradient-1-${unref(id)})`,
  31834. transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
  31835. x: "38",
  31836. y: "7",
  31837. width: "17",
  31838. height: "36"
  31839. }, null, 8, _hoisted_17),
  31840. createBaseVNode("polygon", {
  31841. fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
  31842. transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
  31843. points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
  31844. }, null, 8, _hoisted_18)
  31845. ]),
  31846. createBaseVNode("rect", {
  31847. fill: `url(#linearGradient-2-${unref(id)})`,
  31848. x: "13",
  31849. y: "45",
  31850. width: "40",
  31851. height: "36"
  31852. }, null, 8, _hoisted_19),
  31853. createBaseVNode("g", _hoisted_20, [createBaseVNode("use", {
  31854. fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`,
  31855. transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
  31856. "xlink:href": `#path-3-${unref(id)}`
  31857. }, null, 8, _hoisted_21), createBaseVNode("polygon", {
  31858. fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`,
  31859. mask: `url(#mask-4-${unref(id)})`,
  31860. transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
  31861. points: "7 0 24 0 20 18 7 16.5"
  31862. }, null, 8, _hoisted_22)]),
  31863. createBaseVNode("polygon", {
  31864. fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
  31865. transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
  31866. points: "62 45 79 45 70 58 53 58"
  31867. }, null, 8, _hoisted_23)
  31868. ])])])]);
  31869. };
  31870. }
  31871. });
  31872. //#endregion
  31873. //#region node_modules/element-plus/es/components/empty/src/empty.vue_vue_type_script_setup_true_lang.mjs
  31874. var _hoisted_1$36 = ["src"];
  31875. var _hoisted_2$22 = { key: 1 };
  31876. //#endregion
  31877. //#region node_modules/element-plus/es/components/empty/index.mjs
  31878. var ElEmpty = withInstall(/* @__PURE__ */ defineComponent({
  31879. name: "ElEmpty",
  31880. __name: "empty",
  31881. props: emptyProps,
  31882. setup(__props) {
  31883. const props = __props;
  31884. const { t } = useLocale();
  31885. const ns = useNamespace("empty");
  31886. const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
  31887. const imageStyle = computed(() => ({ width: addUnit(props.imageSize) }));
  31888. return (_ctx, _cache) => {
  31889. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  31890. createBaseVNode("div", {
  31891. class: normalizeClass(unref(ns).e("image")),
  31892. style: normalizeStyle(imageStyle.value)
  31893. }, [__props.image ? (openBlock(), createElementBlock("img", {
  31894. key: 0,
  31895. src: __props.image,
  31896. ondragstart: "return false"
  31897. }, null, 8, _hoisted_1$36)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [createVNode(img_empty_default)])], 6),
  31898. createBaseVNode("div", { class: normalizeClass(unref(ns).e("description")) }, [_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_2$22, toDisplayString(emptyDescription.value), 1))], 2),
  31899. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  31900. key: 0,
  31901. class: normalizeClass(unref(ns).e("bottom"))
  31902. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  31903. ], 2);
  31904. };
  31905. }
  31906. }));
  31907. //#endregion
  31908. //#region node_modules/element-plus/es/components/image/src/image.mjs
  31909. /**
  31910. * @deprecated Removed after 3.0.0, Use `ImageProps` instead.
  31911. */
  31912. var imageProps = buildProps({
  31913. hideOnClickModal: Boolean,
  31914. src: {
  31915. type: String,
  31916. default: ""
  31917. },
  31918. fit: {
  31919. type: String,
  31920. values: [
  31921. "",
  31922. "contain",
  31923. "cover",
  31924. "fill",
  31925. "none",
  31926. "scale-down"
  31927. ],
  31928. default: ""
  31929. },
  31930. loading: {
  31931. type: String,
  31932. values: ["eager", "lazy"]
  31933. },
  31934. lazy: Boolean,
  31935. scrollContainer: { type: definePropType([String, Object]) },
  31936. previewSrcList: {
  31937. type: definePropType(Array),
  31938. default: () => mutable([])
  31939. },
  31940. previewTeleported: Boolean,
  31941. zIndex: { type: Number },
  31942. initialIndex: {
  31943. type: Number,
  31944. default: 0
  31945. },
  31946. infinite: {
  31947. type: Boolean,
  31948. default: true
  31949. },
  31950. closeOnPressEscape: {
  31951. type: Boolean,
  31952. default: true
  31953. },
  31954. zoomRate: {
  31955. type: Number,
  31956. default: 1.2
  31957. },
  31958. scale: {
  31959. type: Number,
  31960. default: 1
  31961. },
  31962. minScale: {
  31963. type: Number,
  31964. default: .2
  31965. },
  31966. maxScale: {
  31967. type: Number,
  31968. default: 7
  31969. },
  31970. showProgress: Boolean,
  31971. crossorigin: { type: definePropType(String) }
  31972. });
  31973. var imageEmits = {
  31974. load: (evt) => evt instanceof Event,
  31975. error: (evt) => evt instanceof Event,
  31976. switch: (val) => isNumber(val),
  31977. close: () => true,
  31978. show: () => true
  31979. };
  31980. //#endregion
  31981. //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs
  31982. /**
  31983. * @deprecated Removed after 3.0.0, Use `ImageViewerProps` instead.
  31984. */
  31985. var imageViewerProps = buildProps({
  31986. urlList: {
  31987. type: definePropType(Array),
  31988. default: () => mutable([])
  31989. },
  31990. zIndex: { type: Number },
  31991. initialIndex: {
  31992. type: Number,
  31993. default: 0
  31994. },
  31995. infinite: {
  31996. type: Boolean,
  31997. default: true
  31998. },
  31999. hideOnClickModal: Boolean,
  32000. teleported: Boolean,
  32001. closeOnPressEscape: {
  32002. type: Boolean,
  32003. default: true
  32004. },
  32005. zoomRate: {
  32006. type: Number,
  32007. default: 1.2
  32008. },
  32009. scale: {
  32010. type: Number,
  32011. default: 1
  32012. },
  32013. minScale: {
  32014. type: Number,
  32015. default: .2
  32016. },
  32017. maxScale: {
  32018. type: Number,
  32019. default: 7
  32020. },
  32021. showProgress: Boolean,
  32022. crossorigin: { type: definePropType(String) }
  32023. });
  32024. var imageViewerEmits = {
  32025. close: () => true,
  32026. error: (evt) => evt instanceof Event,
  32027. switch: (index) => isNumber(index),
  32028. rotate: (deg) => isNumber(deg)
  32029. };
  32030. //#endregion
  32031. //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.mjs
  32032. var _hoisted_1$35 = ["src", "crossorigin"];
  32033. //#endregion
  32034. //#region node_modules/element-plus/es/components/image-viewer/index.mjs
  32035. var ElImageViewer = withInstall(/* @__PURE__ */ defineComponent({
  32036. name: "ElImageViewer",
  32037. __name: "image-viewer",
  32038. props: imageViewerProps,
  32039. emits: imageViewerEmits,
  32040. setup(__props, { expose: __expose, emit: __emit }) {
  32041. const modes = {
  32042. CONTAIN: {
  32043. name: "contain",
  32044. icon: markRaw(full_screen_default)
  32045. },
  32046. ORIGINAL: {
  32047. name: "original",
  32048. icon: markRaw(scale_to_original_default)
  32049. }
  32050. };
  32051. const props = __props;
  32052. const emit = __emit;
  32053. let stopWheelListener;
  32054. const { t } = useLocale();
  32055. const ns = useNamespace("image-viewer");
  32056. const { nextZIndex } = useZIndex();
  32057. const wrapper = ref();
  32058. const imgRef = ref();
  32059. const scopeEventListener = effectScope();
  32060. const scaleClamped = computed(() => {
  32061. const { scale, minScale, maxScale } = props;
  32062. return clamp$1(scale, minScale, maxScale);
  32063. });
  32064. const loading = ref(true);
  32065. const loadError = ref(false);
  32066. const visible = ref(false);
  32067. const activeIndex = ref(props.initialIndex);
  32068. const mode = shallowRef(modes.CONTAIN);
  32069. const transform = ref({
  32070. scale: scaleClamped.value,
  32071. deg: 0,
  32072. offsetX: 0,
  32073. offsetY: 0,
  32074. enableTransition: false
  32075. });
  32076. const zIndex = ref(props.zIndex ?? nextZIndex());
  32077. useLockscreen(visible, { ns });
  32078. const isSingle = computed(() => {
  32079. const { urlList } = props;
  32080. return urlList.length <= 1;
  32081. });
  32082. const isFirst = computed(() => activeIndex.value === 0);
  32083. const isLast = computed(() => activeIndex.value === props.urlList.length - 1);
  32084. const currentImg = computed(() => props.urlList[activeIndex.value]);
  32085. const arrowPrevKls = computed(() => [
  32086. ns.e("btn"),
  32087. ns.e("prev"),
  32088. ns.is("disabled", !props.infinite && isFirst.value)
  32089. ]);
  32090. const arrowNextKls = computed(() => [
  32091. ns.e("btn"),
  32092. ns.e("next"),
  32093. ns.is("disabled", !props.infinite && isLast.value)
  32094. ]);
  32095. const imgStyle = computed(() => {
  32096. const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
  32097. let translateX = offsetX / scale;
  32098. let translateY = offsetY / scale;
  32099. const radian = deg * Math.PI / 180;
  32100. const cosRadian = Math.cos(radian);
  32101. const sinRadian = Math.sin(radian);
  32102. translateX = translateX * cosRadian + translateY * sinRadian;
  32103. translateY = translateY * cosRadian - offsetX / scale * sinRadian;
  32104. const style = {
  32105. transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
  32106. transition: enableTransition ? "transform .3s" : ""
  32107. };
  32108. if (mode.value.name === modes.CONTAIN.name) style.maxWidth = style.maxHeight = "100%";
  32109. return style;
  32110. });
  32111. const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
  32112. function hide() {
  32113. unregisterEventListener();
  32114. stopWheelListener?.();
  32115. visible.value = false;
  32116. emit("close");
  32117. }
  32118. function registerEventListener() {
  32119. const keydownHandler = throttle((e) => {
  32120. switch (getEventCode(e)) {
  32121. case EVENT_CODE.esc:
  32122. props.closeOnPressEscape && hide();
  32123. break;
  32124. case EVENT_CODE.space:
  32125. toggleMode();
  32126. break;
  32127. case EVENT_CODE.left:
  32128. prev();
  32129. break;
  32130. case EVENT_CODE.up:
  32131. handleActions("zoomIn");
  32132. break;
  32133. case EVENT_CODE.right:
  32134. next();
  32135. break;
  32136. case EVENT_CODE.down:
  32137. handleActions("zoomOut");
  32138. break;
  32139. }
  32140. });
  32141. const mousewheelHandler = throttle((e) => {
  32142. handleActions((e.deltaY || e.deltaX) < 0 ? "zoomIn" : "zoomOut", {
  32143. zoomRate: props.zoomRate,
  32144. enableTransition: false
  32145. });
  32146. });
  32147. scopeEventListener.run(() => {
  32148. useEventListener(document, "keydown", keydownHandler);
  32149. useEventListener(wrapper, "wheel", mousewheelHandler);
  32150. });
  32151. }
  32152. function unregisterEventListener() {
  32153. scopeEventListener.stop();
  32154. }
  32155. function handleImgLoad() {
  32156. loading.value = false;
  32157. }
  32158. function handleImgError(e) {
  32159. loadError.value = true;
  32160. loading.value = false;
  32161. emit("error", e);
  32162. e.target.alt = t("el.image.error");
  32163. }
  32164. function handleMouseDown(e) {
  32165. if (loading.value || e.button !== 0 || !wrapper.value) return;
  32166. transform.value.enableTransition = false;
  32167. const { offsetX, offsetY } = transform.value;
  32168. const startX = e.pageX;
  32169. const startY = e.pageY;
  32170. const dragHandler = throttle((ev) => {
  32171. transform.value = {
  32172. ...transform.value,
  32173. offsetX: offsetX + ev.pageX - startX,
  32174. offsetY: offsetY + ev.pageY - startY
  32175. };
  32176. });
  32177. const removeMousemove = useEventListener(document, "mousemove", dragHandler);
  32178. const removeMouseup = useEventListener(document, "mouseup", () => {
  32179. removeMousemove();
  32180. removeMouseup();
  32181. });
  32182. e.preventDefault();
  32183. }
  32184. function handleTouchStart(e) {
  32185. if (loading.value || !wrapper.value || e.touches.length !== 1) return;
  32186. transform.value.enableTransition = false;
  32187. const { offsetX, offsetY } = transform.value;
  32188. const { pageX: startX, pageY: startY } = e.touches[0];
  32189. const dragHandler = throttle((ev) => {
  32190. const targetTouch = ev.touches[0];
  32191. transform.value = {
  32192. ...transform.value,
  32193. offsetX: offsetX + targetTouch.pageX - startX,
  32194. offsetY: offsetY + targetTouch.pageY - startY
  32195. };
  32196. });
  32197. const removeTouchmove = useEventListener(document, "touchmove", dragHandler);
  32198. const removeTouchend = useEventListener(document, "touchend", () => {
  32199. removeTouchmove();
  32200. removeTouchend();
  32201. });
  32202. e.preventDefault();
  32203. }
  32204. function reset() {
  32205. transform.value = {
  32206. scale: scaleClamped.value,
  32207. deg: 0,
  32208. offsetX: 0,
  32209. offsetY: 0,
  32210. enableTransition: false
  32211. };
  32212. }
  32213. function toggleMode() {
  32214. if (loading.value || loadError.value) return;
  32215. const modeNames = keysOf(modes);
  32216. const modeValues = Object.values(modes);
  32217. const currentMode = mode.value.name;
  32218. mode.value = modes[modeNames[(modeValues.findIndex((i) => i.name === currentMode) + 1) % modeNames.length]];
  32219. reset();
  32220. }
  32221. function setActiveItem(index) {
  32222. loadError.value = false;
  32223. const len = props.urlList.length;
  32224. activeIndex.value = (index + len) % len;
  32225. }
  32226. function prev() {
  32227. if (isFirst.value && !props.infinite) return;
  32228. setActiveItem(activeIndex.value - 1);
  32229. }
  32230. function next() {
  32231. if (isLast.value && !props.infinite) return;
  32232. setActiveItem(activeIndex.value + 1);
  32233. }
  32234. function handleActions(action, options = {}) {
  32235. if (loading.value || loadError.value) return;
  32236. const { minScale, maxScale } = props;
  32237. const { zoomRate, rotateDeg, enableTransition } = {
  32238. zoomRate: props.zoomRate,
  32239. rotateDeg: 90,
  32240. enableTransition: true,
  32241. ...options
  32242. };
  32243. switch (action) {
  32244. case "zoomOut":
  32245. if (transform.value.scale > minScale) transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
  32246. break;
  32247. case "zoomIn":
  32248. if (transform.value.scale < maxScale) transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
  32249. break;
  32250. case "clockwise":
  32251. transform.value.deg += rotateDeg;
  32252. emit("rotate", transform.value.deg);
  32253. break;
  32254. case "anticlockwise":
  32255. transform.value.deg -= rotateDeg;
  32256. emit("rotate", transform.value.deg);
  32257. break;
  32258. }
  32259. transform.value.enableTransition = enableTransition;
  32260. }
  32261. function onFocusoutPrevented(event) {
  32262. if (event.detail?.focusReason === "pointer") event.preventDefault();
  32263. }
  32264. function onCloseRequested() {
  32265. if (props.closeOnPressEscape) hide();
  32266. }
  32267. function wheelHandler(e) {
  32268. if (!e.ctrlKey) return;
  32269. if (e.deltaY < 0) {
  32270. e.preventDefault();
  32271. return false;
  32272. } else if (e.deltaY > 0) {
  32273. e.preventDefault();
  32274. return false;
  32275. }
  32276. }
  32277. watch(() => scaleClamped.value, (val) => {
  32278. transform.value.scale = val;
  32279. });
  32280. watch(currentImg, () => {
  32281. nextTick(() => {
  32282. if (!imgRef.value?.complete) loading.value = true;
  32283. });
  32284. });
  32285. watch(activeIndex, (val) => {
  32286. reset();
  32287. emit("switch", val);
  32288. });
  32289. onMounted(() => {
  32290. visible.value = true;
  32291. registerEventListener();
  32292. stopWheelListener = useEventListener("wheel", wheelHandler, { passive: false });
  32293. });
  32294. __expose({ setActiveItem });
  32295. return (_ctx, _cache) => {
  32296. return openBlock(), createBlock(unref(ElTeleport), {
  32297. to: "body",
  32298. disabled: !__props.teleported
  32299. }, {
  32300. default: withCtx(() => [createVNode(Transition, {
  32301. name: "viewer-fade",
  32302. appear: ""
  32303. }, {
  32304. default: withCtx(() => [createBaseVNode("div", {
  32305. ref_key: "wrapper",
  32306. ref: wrapper,
  32307. tabindex: -1,
  32308. class: normalizeClass(unref(ns).e("wrapper")),
  32309. style: normalizeStyle({ zIndex: zIndex.value })
  32310. }, [createVNode(unref(focus_trap_default$1), {
  32311. loop: "",
  32312. trapped: "",
  32313. "focus-trap-el": wrapper.value,
  32314. "focus-start-el": "container",
  32315. onFocusoutPrevented,
  32316. onReleaseRequested: onCloseRequested
  32317. }, {
  32318. default: withCtx(() => [
  32319. createBaseVNode("div", {
  32320. class: normalizeClass(unref(ns).e("mask")),
  32321. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => __props.hideOnClickModal && hide(), ["self"]))
  32322. }, null, 2),
  32323. createCommentVNode(" CLOSE "),
  32324. createBaseVNode("span", {
  32325. class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
  32326. onClick: hide
  32327. }, [createVNode(unref(ElIcon), null, {
  32328. default: withCtx(() => [createVNode(unref(close_default))]),
  32329. _: 1
  32330. })], 2),
  32331. createCommentVNode(" ARROW "),
  32332. !isSingle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("span", {
  32333. class: normalizeClass(arrowPrevKls.value),
  32334. onClick: prev
  32335. }, [createVNode(unref(ElIcon), null, {
  32336. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  32337. _: 1
  32338. })], 2), createBaseVNode("span", {
  32339. class: normalizeClass(arrowNextKls.value),
  32340. onClick: next
  32341. }, [createVNode(unref(ElIcon), null, {
  32342. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  32343. _: 1
  32344. })], 2)], 64)) : createCommentVNode("v-if", true),
  32345. _ctx.$slots.progress || __props.showProgress ? (openBlock(), createElementBlock("div", {
  32346. key: 1,
  32347. class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
  32348. }, [renderSlot(_ctx.$slots, "progress", {
  32349. activeIndex: activeIndex.value,
  32350. total: __props.urlList.length
  32351. }, () => [createTextVNode(toDisplayString(progress.value), 1)])], 2)) : createCommentVNode("v-if", true),
  32352. createCommentVNode(" ACTIONS "),
  32353. createBaseVNode("div", { class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")]) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("actions__inner")) }, [renderSlot(_ctx.$slots, "toolbar", {
  32354. actions: handleActions,
  32355. prev,
  32356. next,
  32357. reset: toggleMode,
  32358. activeIndex: activeIndex.value,
  32359. setActiveItem
  32360. }, () => [
  32361. createVNode(unref(ElIcon), { onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut")) }, {
  32362. default: withCtx(() => [createVNode(unref(zoom_out_default))]),
  32363. _: 1
  32364. }),
  32365. createVNode(unref(ElIcon), { onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn")) }, {
  32366. default: withCtx(() => [createVNode(unref(zoom_in_default))]),
  32367. _: 1
  32368. }),
  32369. createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
  32370. createVNode(unref(ElIcon), { onClick: toggleMode }, {
  32371. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mode.value.icon)))]),
  32372. _: 1
  32373. }),
  32374. createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
  32375. createVNode(unref(ElIcon), { onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise")) }, {
  32376. default: withCtx(() => [createVNode(unref(refresh_left_default))]),
  32377. _: 1
  32378. }),
  32379. createVNode(unref(ElIcon), { onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise")) }, {
  32380. default: withCtx(() => [createVNode(unref(refresh_right_default))]),
  32381. _: 1
  32382. })
  32383. ])], 2)], 2),
  32384. createCommentVNode(" CANVAS "),
  32385. createBaseVNode("div", { class: normalizeClass(unref(ns).e("canvas")) }, [loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
  32386. key: 0,
  32387. activeIndex: activeIndex.value,
  32388. src: currentImg.value
  32389. }) : (openBlock(), createElementBlock("img", {
  32390. ref_key: "imgRef",
  32391. ref: imgRef,
  32392. key: currentImg.value,
  32393. src: currentImg.value,
  32394. style: normalizeStyle(imgStyle.value),
  32395. class: normalizeClass(unref(ns).e("img")),
  32396. crossorigin: __props.crossorigin,
  32397. onLoad: handleImgLoad,
  32398. onError: handleImgError,
  32399. onMousedown: handleMouseDown,
  32400. onTouchstart: handleTouchStart
  32401. }, null, 46, _hoisted_1$35))], 2),
  32402. renderSlot(_ctx.$slots, "default")
  32403. ]),
  32404. _: 3
  32405. }, 8, ["focus-trap-el"])], 6)]),
  32406. _: 3
  32407. })]),
  32408. _: 3
  32409. }, 8, ["disabled"]);
  32410. };
  32411. }
  32412. }));
  32413. //#endregion
  32414. //#region node_modules/element-plus/es/components/image/src/image.vue_vue_type_script_setup_true_lang.mjs
  32415. var _hoisted_1$34 = [
  32416. "src",
  32417. "loading",
  32418. "crossorigin"
  32419. ];
  32420. var _hoisted_2$21 = { key: 0 };
  32421. //#endregion
  32422. //#region node_modules/element-plus/es/components/image/index.mjs
  32423. var ElImage = withInstall(/* @__PURE__ */ defineComponent({
  32424. name: "ElImage",
  32425. inheritAttrs: false,
  32426. __name: "image",
  32427. props: imageProps,
  32428. emits: imageEmits,
  32429. setup(__props, { expose: __expose, emit: __emit }) {
  32430. const props = __props;
  32431. const emit = __emit;
  32432. const { t } = useLocale();
  32433. const ns = useNamespace("image");
  32434. const rawAttrs = useAttrs$1();
  32435. const containerAttrs = computed(() => {
  32436. return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
  32437. });
  32438. const imgAttrs = useAttrs({
  32439. excludeListeners: true,
  32440. excludeKeys: computed(() => {
  32441. return Object.keys(containerAttrs.value);
  32442. })
  32443. });
  32444. const imageSrc = ref();
  32445. const hasLoadError = ref(false);
  32446. const isLoading = ref(true);
  32447. const showViewer = ref(false);
  32448. const container = ref();
  32449. const _scrollContainer = ref();
  32450. const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
  32451. let stopScrollListener;
  32452. const imageKls = computed(() => [
  32453. ns.e("inner"),
  32454. preview.value && ns.e("preview"),
  32455. isLoading.value && ns.is("loading")
  32456. ]);
  32457. const imageStyle = computed(() => {
  32458. const { fit } = props;
  32459. if (isClient && fit) return { objectFit: fit };
  32460. return {};
  32461. });
  32462. const preview = computed(() => {
  32463. const { previewSrcList } = props;
  32464. return isArray$1(previewSrcList) && previewSrcList.length > 0;
  32465. });
  32466. const imageIndex = computed(() => {
  32467. const { previewSrcList, initialIndex } = props;
  32468. let previewIndex = initialIndex;
  32469. if (initialIndex > previewSrcList.length - 1) previewIndex = 0;
  32470. return previewIndex;
  32471. });
  32472. const isManual = computed(() => {
  32473. if (props.loading === "eager") return false;
  32474. return !supportLoading && props.loading === "lazy" || props.lazy;
  32475. });
  32476. const loadImage = () => {
  32477. if (!isClient) return;
  32478. isLoading.value = true;
  32479. hasLoadError.value = false;
  32480. imageSrc.value = props.src;
  32481. };
  32482. function handleLoad(event) {
  32483. isLoading.value = false;
  32484. hasLoadError.value = false;
  32485. emit("load", event);
  32486. }
  32487. function handleError(event) {
  32488. isLoading.value = false;
  32489. hasLoadError.value = true;
  32490. emit("error", event);
  32491. }
  32492. function handleLazyLoad(isIntersecting) {
  32493. if (isIntersecting) {
  32494. loadImage();
  32495. removeLazyLoadListener();
  32496. }
  32497. }
  32498. const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true);
  32499. async function addLazyLoadListener() {
  32500. if (!isClient) return;
  32501. await nextTick();
  32502. const { scrollContainer } = props;
  32503. if (isElement$1(scrollContainer)) _scrollContainer.value = scrollContainer;
  32504. else if (isString(scrollContainer) && scrollContainer !== "") _scrollContainer.value = document.querySelector(scrollContainer) ?? void 0;
  32505. else if (container.value) {
  32506. const scrollContainer = getScrollContainer(container.value);
  32507. _scrollContainer.value = isWindow(scrollContainer) ? void 0 : scrollContainer;
  32508. }
  32509. const { stop } = useIntersectionObserver(container, ([entry]) => {
  32510. lazyLoadHandler(entry.isIntersecting);
  32511. }, { root: _scrollContainer });
  32512. stopScrollListener = stop;
  32513. }
  32514. function removeLazyLoadListener() {
  32515. if (!isClient || !lazyLoadHandler) return;
  32516. stopScrollListener?.();
  32517. _scrollContainer.value = void 0;
  32518. stopScrollListener = void 0;
  32519. }
  32520. function clickHandler() {
  32521. if (!preview.value) return;
  32522. showViewer.value = true;
  32523. emit("show");
  32524. }
  32525. function closeViewer() {
  32526. showViewer.value = false;
  32527. emit("close");
  32528. }
  32529. function switchViewer(val) {
  32530. emit("switch", val);
  32531. }
  32532. watch(() => props.src, () => {
  32533. if (isManual.value) {
  32534. isLoading.value = true;
  32535. hasLoadError.value = false;
  32536. removeLazyLoadListener();
  32537. addLazyLoadListener();
  32538. } else loadImage();
  32539. });
  32540. onMounted(() => {
  32541. if (isManual.value) addLazyLoadListener();
  32542. else loadImage();
  32543. });
  32544. __expose({ showPreview: clickHandler });
  32545. return (_ctx, _cache) => {
  32546. return openBlock(), createElementBlock("div", mergeProps({
  32547. ref_key: "container",
  32548. ref: container
  32549. }, containerAttrs.value, { class: [unref(ns).b(), _ctx.$attrs.class] }), [hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("error")) }, toDisplayString(unref(t)("el.image.error")), 3)]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
  32550. src: imageSrc.value,
  32551. loading: __props.loading,
  32552. style: imageStyle.value,
  32553. class: imageKls.value,
  32554. crossorigin: __props.crossorigin,
  32555. onClick: clickHandler,
  32556. onLoad: handleLoad,
  32557. onError: handleError
  32558. }), null, 16, _hoisted_1$34)) : createCommentVNode("v-if", true), isLoading.value ? (openBlock(), createElementBlock("div", {
  32559. key: 1,
  32560. class: normalizeClass(unref(ns).e("wrapper"))
  32561. }, [renderSlot(_ctx.$slots, "placeholder", {}, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("placeholder")) }, null, 2)])], 2)) : createCommentVNode("v-if", true)], 64)), preview.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
  32562. key: 0,
  32563. "z-index": __props.zIndex,
  32564. "initial-index": imageIndex.value,
  32565. infinite: __props.infinite,
  32566. "zoom-rate": __props.zoomRate,
  32567. "min-scale": __props.minScale,
  32568. "max-scale": __props.maxScale,
  32569. "show-progress": __props.showProgress,
  32570. "url-list": __props.previewSrcList,
  32571. scale: __props.scale,
  32572. crossorigin: __props.crossorigin,
  32573. "hide-on-click-modal": __props.hideOnClickModal,
  32574. teleported: __props.previewTeleported,
  32575. "close-on-press-escape": __props.closeOnPressEscape,
  32576. onClose: closeViewer,
  32577. onSwitch: switchViewer
  32578. }, createSlots({
  32579. toolbar: withCtx((toolbar) => [renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))]),
  32580. default: withCtx(() => [_ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_2$21, [renderSlot(_ctx.$slots, "viewer")])) : createCommentVNode("v-if", true)]),
  32581. _: 2
  32582. }, [_ctx.$slots.progress ? {
  32583. name: "progress",
  32584. fn: withCtx((progress) => [renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))]),
  32585. key: "0"
  32586. } : void 0, _ctx.$slots["viewer-error"] ? {
  32587. name: "viewer-error",
  32588. fn: withCtx((viewerError) => [renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))]),
  32589. key: "1"
  32590. } : void 0]), 1032, [
  32591. "z-index",
  32592. "initial-index",
  32593. "infinite",
  32594. "zoom-rate",
  32595. "min-scale",
  32596. "max-scale",
  32597. "show-progress",
  32598. "url-list",
  32599. "scale",
  32600. "crossorigin",
  32601. "hide-on-click-modal",
  32602. "teleported",
  32603. "close-on-press-escape"
  32604. ])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true)], 16);
  32605. };
  32606. }
  32607. }));
  32608. //#endregion
  32609. //#region node_modules/element-plus/es/components/input-number/src/input-number.mjs
  32610. /**
  32611. * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
  32612. */
  32613. var inputNumberProps = buildProps({
  32614. id: {
  32615. type: String,
  32616. default: void 0
  32617. },
  32618. step: {
  32619. type: Number,
  32620. default: 1
  32621. },
  32622. stepStrictly: Boolean,
  32623. max: {
  32624. type: Number,
  32625. default: Number.MAX_SAFE_INTEGER
  32626. },
  32627. min: {
  32628. type: Number,
  32629. default: Number.MIN_SAFE_INTEGER
  32630. },
  32631. modelValue: { type: [Number, null] },
  32632. readonly: Boolean,
  32633. disabled: {
  32634. type: Boolean,
  32635. default: void 0
  32636. },
  32637. size: useSizeProp,
  32638. controls: {
  32639. type: Boolean,
  32640. default: true
  32641. },
  32642. controlsPosition: {
  32643. type: String,
  32644. default: "",
  32645. values: ["", "right"]
  32646. },
  32647. valueOnClear: {
  32648. type: definePropType([
  32649. String,
  32650. Number,
  32651. null
  32652. ]),
  32653. validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
  32654. default: null
  32655. },
  32656. name: String,
  32657. placeholder: String,
  32658. precision: {
  32659. type: Number,
  32660. validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
  32661. },
  32662. validateEvent: {
  32663. type: Boolean,
  32664. default: true
  32665. },
  32666. ...useAriaProps(["ariaLabel"]),
  32667. inputmode: {
  32668. type: definePropType(String),
  32669. default: void 0
  32670. },
  32671. align: {
  32672. type: definePropType(String),
  32673. default: "center"
  32674. },
  32675. disabledScientific: Boolean
  32676. });
  32677. var inputNumberEmits = {
  32678. [CHANGE_EVENT]: (cur, prev) => prev !== cur,
  32679. blur: (e) => e instanceof FocusEvent,
  32680. focus: (e) => e instanceof FocusEvent,
  32681. [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
  32682. [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
  32683. };
  32684. //#endregion
  32685. //#region node_modules/element-plus/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs
  32686. var _hoisted_1$33 = ["aria-label"];
  32687. var _hoisted_2$20 = ["aria-label"];
  32688. //#endregion
  32689. //#region node_modules/element-plus/es/components/input-number/index.mjs
  32690. var ElInputNumber = withInstall(/* @__PURE__ */ defineComponent({
  32691. name: "ElInputNumber",
  32692. __name: "input-number",
  32693. props: inputNumberProps,
  32694. emits: inputNumberEmits,
  32695. setup(__props, { expose: __expose, emit: __emit }) {
  32696. const props = __props;
  32697. const emit = __emit;
  32698. const { t } = useLocale();
  32699. const ns = useNamespace("input-number");
  32700. const input = ref();
  32701. const data = reactive({
  32702. currentValue: props.modelValue,
  32703. userInput: null
  32704. });
  32705. const { formItem } = useFormItem();
  32706. const minDisabled = computed(() => isNumber(props.modelValue) && props.modelValue <= props.min);
  32707. const maxDisabled = computed(() => isNumber(props.modelValue) && props.modelValue >= props.max);
  32708. const numPrecision = computed(() => {
  32709. const stepPrecision = getPrecision(props.step);
  32710. if (!isUndefined(props.precision)) {
  32711. if (stepPrecision > props.precision) debugWarn("InputNumber", "precision should not be less than the decimal places of step");
  32712. return props.precision;
  32713. } else return Math.max(getPrecision(props.modelValue), stepPrecision);
  32714. });
  32715. const controlsAtRight = computed(() => {
  32716. return props.controls && props.controlsPosition === "right";
  32717. });
  32718. const inputNumberSize = useFormSize();
  32719. const inputNumberDisabled = useFormDisabled();
  32720. const displayValue = computed(() => {
  32721. if (data.userInput !== null) return data.userInput;
  32722. let currentValue = data.currentValue;
  32723. if (isNil(currentValue)) return "";
  32724. if (isNumber(currentValue)) {
  32725. if (Number.isNaN(currentValue)) return "";
  32726. if (!isUndefined(props.precision)) currentValue = currentValue.toFixed(props.precision);
  32727. }
  32728. return currentValue;
  32729. });
  32730. const toPrecision = (num, pre) => {
  32731. if (isUndefined(pre)) pre = numPrecision.value;
  32732. if (pre === 0) return Math.round(num);
  32733. let snum = String(num);
  32734. const pointPos = snum.indexOf(".");
  32735. if (pointPos === -1) return num;
  32736. if (!snum.replace(".", "").split("")[pointPos + pre]) return num;
  32737. const length = snum.length;
  32738. if (snum.charAt(length - 1) === "5") snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
  32739. return Number.parseFloat(Number(snum).toFixed(pre));
  32740. };
  32741. const getPrecision = (value) => {
  32742. if (isNil(value)) return 0;
  32743. const valueString = value.toString();
  32744. const dotPosition = valueString.indexOf(".");
  32745. let precision = 0;
  32746. if (dotPosition !== -1) precision = valueString.length - dotPosition - 1;
  32747. return precision;
  32748. };
  32749. const ensurePrecision = (val, coefficient = 1) => {
  32750. if (!isNumber(val)) return data.currentValue;
  32751. if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {
  32752. debugWarn("InputNumber", "The value has reached the maximum safe integer limit.");
  32753. return val;
  32754. } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {
  32755. debugWarn("InputNumber", "The value has reached the minimum safe integer limit.");
  32756. return val;
  32757. }
  32758. return toPrecision(val + props.step * coefficient);
  32759. };
  32760. const handleKeydown = (event) => {
  32761. const code = getEventCode(event);
  32762. const key = getEventKey(event);
  32763. if (props.disabledScientific && ["e", "E"].includes(key)) {
  32764. event.preventDefault();
  32765. return;
  32766. }
  32767. switch (code) {
  32768. case EVENT_CODE.up:
  32769. event.preventDefault();
  32770. increase();
  32771. break;
  32772. case EVENT_CODE.down:
  32773. event.preventDefault();
  32774. decrease();
  32775. break;
  32776. }
  32777. };
  32778. const increase = () => {
  32779. if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return;
  32780. setCurrentValue(ensurePrecision(Number(displayValue.value) || 0));
  32781. emit(INPUT_EVENT, data.currentValue);
  32782. setCurrentValueToModelValue();
  32783. };
  32784. const decrease = () => {
  32785. if (props.readonly || inputNumberDisabled.value || minDisabled.value) return;
  32786. setCurrentValue(ensurePrecision(Number(displayValue.value) || 0, -1));
  32787. emit(INPUT_EVENT, data.currentValue);
  32788. setCurrentValueToModelValue();
  32789. };
  32790. const verifyValue = (value, update) => {
  32791. const { max, min, step, precision, stepStrictly, valueOnClear } = props;
  32792. if (max < min) throwError("InputNumber", "min should not be greater than max.");
  32793. let newVal = Number(value);
  32794. if (isNil(value) || Number.isNaN(newVal)) return null;
  32795. if (value === "") {
  32796. if (valueOnClear === null) return null;
  32797. newVal = isString(valueOnClear) ? {
  32798. min,
  32799. max
  32800. }[valueOnClear] : valueOnClear;
  32801. }
  32802. if (stepStrictly) {
  32803. newVal = toPrecision(Math.round(toPrecision(newVal / step)) * step, precision);
  32804. if (newVal !== value) update && emit("update:modelValue", newVal);
  32805. }
  32806. if (!isUndefined(precision)) newVal = toPrecision(newVal, precision);
  32807. if (newVal > max || newVal < min) {
  32808. newVal = newVal > max ? max : min;
  32809. update && emit("update:modelValue", newVal);
  32810. }
  32811. return newVal;
  32812. };
  32813. const setCurrentValue = (value, emitChange = true) => {
  32814. const oldVal = data.currentValue;
  32815. const newVal = verifyValue(value);
  32816. if (!emitChange) {
  32817. emit(UPDATE_MODEL_EVENT, newVal);
  32818. return;
  32819. }
  32820. data.userInput = null;
  32821. if (oldVal === newVal && value) return;
  32822. emit(UPDATE_MODEL_EVENT, newVal);
  32823. if (oldVal !== newVal) emit(CHANGE_EVENT, newVal, oldVal);
  32824. if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
  32825. data.currentValue = newVal;
  32826. };
  32827. const handleInput = (value) => {
  32828. data.userInput = value;
  32829. const newVal = value === "" ? null : Number(value);
  32830. emit(INPUT_EVENT, newVal);
  32831. setCurrentValue(newVal, false);
  32832. };
  32833. const handleInputChange = (value) => {
  32834. const newVal = value !== "" ? Number(value) : "";
  32835. if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") setCurrentValue(newVal);
  32836. setCurrentValueToModelValue();
  32837. data.userInput = null;
  32838. };
  32839. const focus = () => {
  32840. input.value?.focus?.();
  32841. };
  32842. const blur = () => {
  32843. input.value?.blur?.();
  32844. };
  32845. const handleFocus = (event) => {
  32846. emit("focus", event);
  32847. };
  32848. const handleBlur = (event) => {
  32849. data.userInput = null;
  32850. if (data.currentValue === null && input.value?.input) input.value.input.value = "";
  32851. emit("blur", event);
  32852. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  32853. };
  32854. const setCurrentValueToModelValue = () => {
  32855. if (data.currentValue !== props.modelValue) data.currentValue = props.modelValue;
  32856. };
  32857. const handleWheel = (e) => {
  32858. if (document.activeElement === e.target) e.preventDefault();
  32859. };
  32860. watch(() => props.modelValue, (value, oldValue) => {
  32861. const newValue = verifyValue(value, true);
  32862. if (data.userInput === null && newValue !== oldValue) data.currentValue = newValue;
  32863. }, { immediate: true });
  32864. watch(() => props.precision, () => {
  32865. data.currentValue = verifyValue(props.modelValue);
  32866. });
  32867. onMounted(() => {
  32868. const { min, max, modelValue } = props;
  32869. const innerInput = input.value?.input;
  32870. innerInput.setAttribute("role", "spinbutton");
  32871. if (Number.isFinite(max)) innerInput.setAttribute("aria-valuemax", String(max));
  32872. else innerInput.removeAttribute("aria-valuemax");
  32873. if (Number.isFinite(min)) innerInput.setAttribute("aria-valuemin", String(min));
  32874. else innerInput.removeAttribute("aria-valuemin");
  32875. innerInput.setAttribute("aria-valuenow", data.currentValue || data.currentValue === 0 ? String(data.currentValue) : "");
  32876. innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
  32877. if (!isNumber(modelValue) && modelValue != null) {
  32878. let val = Number(modelValue);
  32879. if (Number.isNaN(val)) val = null;
  32880. emit(UPDATE_MODEL_EVENT, val);
  32881. }
  32882. innerInput.addEventListener("wheel", handleWheel, { passive: false });
  32883. });
  32884. onUpdated(() => {
  32885. (input.value?.input)?.setAttribute("aria-valuenow", `${data.currentValue ?? ""}`);
  32886. });
  32887. __expose({
  32888. focus,
  32889. blur
  32890. });
  32891. return (_ctx, _cache) => {
  32892. return openBlock(), createElementBlock("div", {
  32893. class: normalizeClass([
  32894. unref(ns).b(),
  32895. unref(ns).m(unref(inputNumberSize)),
  32896. unref(ns).is("disabled", unref(inputNumberDisabled)),
  32897. unref(ns).is("without-controls", !__props.controls),
  32898. unref(ns).is("controls-right", controlsAtRight.value),
  32899. unref(ns).is(__props.align, !!__props.align)
  32900. ]),
  32901. onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
  32902. }, [
  32903. __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
  32904. key: 0,
  32905. role: "button",
  32906. "aria-label": unref(t)("el.inputNumber.decrease"),
  32907. class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", minDisabled.value)]),
  32908. onKeydown: withKeys(decrease, ["enter"])
  32909. }, [renderSlot(_ctx.$slots, "decrease-icon", {}, () => [createVNode(unref(ElIcon), null, {
  32910. default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_down_default), { key: 0 })) : (openBlock(), createBlock(unref(minus_default), { key: 1 }))]),
  32911. _: 1
  32912. })])], 42, _hoisted_1$33)), [[unref(vRepeatClick), decrease]]) : createCommentVNode("v-if", true),
  32913. __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
  32914. key: 1,
  32915. role: "button",
  32916. "aria-label": unref(t)("el.inputNumber.increase"),
  32917. class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", maxDisabled.value)]),
  32918. onKeydown: withKeys(increase, ["enter"])
  32919. }, [renderSlot(_ctx.$slots, "increase-icon", {}, () => [createVNode(unref(ElIcon), null, {
  32920. default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_up_default), { key: 0 })) : (openBlock(), createBlock(unref(plus_default), { key: 1 }))]),
  32921. _: 1
  32922. })])], 42, _hoisted_2$20)), [[unref(vRepeatClick), increase]]) : createCommentVNode("v-if", true),
  32923. createVNode(unref(ElInput), {
  32924. id: __props.id,
  32925. ref_key: "input",
  32926. ref: input,
  32927. type: "number",
  32928. step: __props.step,
  32929. "model-value": displayValue.value,
  32930. placeholder: __props.placeholder,
  32931. readonly: __props.readonly,
  32932. disabled: unref(inputNumberDisabled),
  32933. size: unref(inputNumberSize),
  32934. max: __props.max,
  32935. min: __props.min,
  32936. name: __props.name,
  32937. "aria-label": __props.ariaLabel,
  32938. "validate-event": false,
  32939. inputmode: __props.inputmode,
  32940. onKeydown: handleKeydown,
  32941. onBlur: handleBlur,
  32942. onFocus: handleFocus,
  32943. onInput: handleInput,
  32944. onChange: handleInputChange
  32945. }, createSlots({ _: 2 }, [_ctx.$slots.prefix ? {
  32946. name: "prefix",
  32947. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  32948. key: "0"
  32949. } : void 0, _ctx.$slots.suffix ? {
  32950. name: "suffix",
  32951. fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
  32952. key: "1"
  32953. } : void 0]), 1032, [
  32954. "id",
  32955. "step",
  32956. "model-value",
  32957. "placeholder",
  32958. "readonly",
  32959. "disabled",
  32960. "size",
  32961. "max",
  32962. "min",
  32963. "name",
  32964. "aria-label",
  32965. "inputmode"
  32966. ])
  32967. ], 34);
  32968. };
  32969. }
  32970. }));
  32971. //#endregion
  32972. //#region node_modules/element-plus/es/components/input-tag/src/input-tag.mjs
  32973. /**
  32974. * @deprecated Removed after 3.0.0, Use `InputTagProps` instead.
  32975. */
  32976. var inputTagProps = buildProps({
  32977. modelValue: { type: definePropType(Array) },
  32978. max: Number,
  32979. tagType: {
  32980. ...tagProps.type,
  32981. default: "info"
  32982. },
  32983. tagEffect: tagProps.effect,
  32984. effect: {
  32985. type: definePropType(String),
  32986. default: "light"
  32987. },
  32988. trigger: {
  32989. type: definePropType(String),
  32990. default: EVENT_CODE.enter
  32991. },
  32992. draggable: Boolean,
  32993. delimiter: {
  32994. type: [String, RegExp],
  32995. default: ""
  32996. },
  32997. size: useSizeProp,
  32998. clearable: Boolean,
  32999. clearIcon: {
  33000. type: iconPropType,
  33001. default: circle_close_default
  33002. },
  33003. disabled: {
  33004. type: Boolean,
  33005. default: void 0
  33006. },
  33007. validateEvent: {
  33008. type: Boolean,
  33009. default: true
  33010. },
  33011. readonly: Boolean,
  33012. autofocus: Boolean,
  33013. id: {
  33014. type: String,
  33015. default: void 0
  33016. },
  33017. tabindex: {
  33018. type: [String, Number],
  33019. default: 0
  33020. },
  33021. maxlength: { type: [String, Number] },
  33022. minlength: { type: [String, Number] },
  33023. placeholder: String,
  33024. autocomplete: {
  33025. type: definePropType(String),
  33026. default: "off"
  33027. },
  33028. saveOnBlur: {
  33029. type: Boolean,
  33030. default: true
  33031. },
  33032. collapseTags: Boolean,
  33033. collapseTagsTooltip: Boolean,
  33034. maxCollapseTags: {
  33035. type: Number,
  33036. default: 1
  33037. },
  33038. ariaLabel: String
  33039. });
  33040. var inputTagEmits = {
  33041. [UPDATE_MODEL_EVENT]: (value) => isArray$1(value) || isUndefined(value),
  33042. [CHANGE_EVENT]: (value) => isArray$1(value) || isUndefined(value),
  33043. [INPUT_EVENT]: (value) => isString(value),
  33044. "add-tag": (value) => isString(value) || isArray$1(value),
  33045. "remove-tag": (value, index) => isString(value) && isNumber(index),
  33046. "drag-tag": (oldIndex, newIndex, value) => isNumber(oldIndex) && isNumber(newIndex) && isString(value),
  33047. focus: (evt) => evt instanceof FocusEvent,
  33048. blur: (evt) => evt instanceof FocusEvent,
  33049. clear: () => true
  33050. };
  33051. //#endregion
  33052. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-drag-tag.mjs
  33053. function useDragTag({ wrapperRef, handleDragged, afterDragged }) {
  33054. const ns = useNamespace("input-tag");
  33055. const dropIndicatorRef = shallowRef();
  33056. const showDropIndicator = ref(false);
  33057. let draggingIndex;
  33058. let draggingTag;
  33059. let dropIndex;
  33060. let dropType;
  33061. function getTagClassName(index) {
  33062. return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`;
  33063. }
  33064. function handleDragStart(event, index) {
  33065. draggingIndex = index;
  33066. draggingTag = wrapperRef.value.querySelector(getTagClassName(index));
  33067. if (draggingTag) draggingTag.style.opacity = "0.5";
  33068. event.dataTransfer.effectAllowed = "move";
  33069. }
  33070. function handleDragOver(event, index) {
  33071. dropIndex = index;
  33072. event.preventDefault();
  33073. event.dataTransfer.dropEffect = "move";
  33074. if (isUndefined(draggingIndex) || draggingIndex === index) {
  33075. showDropIndicator.value = false;
  33076. return;
  33077. }
  33078. const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect();
  33079. const dropPrev = !(draggingIndex + 1 === index);
  33080. const dropNext = !(draggingIndex - 1 === index);
  33081. const distance = event.clientX - dropPosition.left;
  33082. const prevPercent = dropPrev ? dropNext ? .5 : 1 : -1;
  33083. const nextPercent = dropNext ? dropPrev ? .5 : 0 : 1;
  33084. if (distance <= dropPosition.width * prevPercent) dropType = "before";
  33085. else if (distance > dropPosition.width * nextPercent) dropType = "after";
  33086. else dropType = void 0;
  33087. const innerEl = wrapperRef.value.querySelector(`.${ns.e("inner")}`);
  33088. const innerPosition = innerEl.getBoundingClientRect();
  33089. const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2;
  33090. const indicatorTop = dropPosition.top - innerPosition.top;
  33091. let indicatorLeft = -9999;
  33092. if (dropType === "before") indicatorLeft = Math.max(dropPosition.left - innerPosition.left - gap, Math.floor(-gap / 2));
  33093. else if (dropType === "after") {
  33094. const left = dropPosition.right - innerPosition.left;
  33095. indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap);
  33096. }
  33097. setStyle(dropIndicatorRef.value, {
  33098. top: `${indicatorTop}px`,
  33099. left: `${indicatorLeft}px`
  33100. });
  33101. showDropIndicator.value = !!dropType;
  33102. }
  33103. function handleDragEnd(event) {
  33104. event.preventDefault();
  33105. if (draggingTag) draggingTag.style.opacity = "";
  33106. if (dropType && !isUndefined(draggingIndex) && !isUndefined(dropIndex) && draggingIndex !== dropIndex) handleDragged(draggingIndex, dropIndex, dropType);
  33107. showDropIndicator.value = false;
  33108. draggingIndex = void 0;
  33109. draggingTag = null;
  33110. dropIndex = void 0;
  33111. dropType = void 0;
  33112. afterDragged?.();
  33113. }
  33114. return {
  33115. dropIndicatorRef,
  33116. showDropIndicator,
  33117. handleDragStart,
  33118. handleDragOver,
  33119. handleDragEnd
  33120. };
  33121. }
  33122. //#endregion
  33123. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-hovering.mjs
  33124. function useHovering() {
  33125. const hovering = ref(false);
  33126. const handleMouseEnter = () => {
  33127. hovering.value = true;
  33128. };
  33129. const handleMouseLeave = () => {
  33130. hovering.value = false;
  33131. };
  33132. return {
  33133. hovering,
  33134. handleMouseEnter,
  33135. handleMouseLeave
  33136. };
  33137. }
  33138. //#endregion
  33139. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag.mjs
  33140. function useInputTag({ props, emit, formItem }) {
  33141. const disabled = useFormDisabled();
  33142. const size = useFormSize();
  33143. const inputRef = shallowRef();
  33144. const inputValue = ref();
  33145. const tagTooltipRef = ref();
  33146. const tagSize = computed(() => {
  33147. return ["small"].includes(size.value) ? "small" : "default";
  33148. });
  33149. const placeholder = computed(() => {
  33150. return props.modelValue?.length ? void 0 : props.placeholder;
  33151. });
  33152. const closable = computed(() => !(props.readonly || disabled.value));
  33153. const inputLimit = computed(() => {
  33154. return isUndefined(props.max) ? false : (props.modelValue?.length ?? 0) >= props.max;
  33155. });
  33156. const showTagList = computed(() => {
  33157. return props.collapseTags ? props.modelValue?.slice(0, props.maxCollapseTags) : props.modelValue;
  33158. });
  33159. const collapseTagList = computed(() => {
  33160. return props.collapseTags ? props.modelValue?.slice(props.maxCollapseTags) : [];
  33161. });
  33162. const addTagsEmit = (value) => {
  33163. const list = [...props.modelValue ?? [], ...castArray$1(value)];
  33164. emit(UPDATE_MODEL_EVENT, list);
  33165. emit(CHANGE_EVENT, list);
  33166. emit("add-tag", value);
  33167. inputValue.value = void 0;
  33168. };
  33169. const getDelimitedTags = (input) => {
  33170. const parts = input.split(props.delimiter);
  33171. const tags = parts.length > 1 ? parts.map((val) => val.trim()).filter(Boolean) : [];
  33172. if (props.max) {
  33173. const maxInsert = props.max - (props.modelValue?.length ?? 0);
  33174. tags.splice(maxInsert);
  33175. }
  33176. return tags.length === 1 ? tags[0] : tags;
  33177. };
  33178. const handlePaste = (event) => {
  33179. const pasted = event.clipboardData?.getData("text");
  33180. if (props.readonly || inputLimit.value || !props.delimiter || !pasted) return;
  33181. const { selectionStart = 0, selectionEnd = 0, value } = event.target;
  33182. const nextValue = value.slice(0, selectionStart) + pasted + value.slice(selectionEnd);
  33183. const tags = getDelimitedTags(nextValue);
  33184. if (tags.length) {
  33185. addTagsEmit(tags);
  33186. emit(INPUT_EVENT, nextValue);
  33187. event.preventDefault();
  33188. }
  33189. };
  33190. const handleInput = (event) => {
  33191. if (inputLimit.value) {
  33192. inputValue.value = void 0;
  33193. return;
  33194. }
  33195. if (isComposing.value) return;
  33196. if (props.delimiter && inputValue.value) {
  33197. const tags = getDelimitedTags(inputValue.value);
  33198. if (tags.length) addTagsEmit(tags);
  33199. }
  33200. emit(INPUT_EVENT, event.target.value);
  33201. };
  33202. const handleKeydown = (event) => {
  33203. if (isComposing.value) return;
  33204. switch (getEventCode(event)) {
  33205. case props.trigger:
  33206. event.preventDefault();
  33207. event.stopPropagation();
  33208. handleAddTag();
  33209. break;
  33210. case EVENT_CODE.numpadEnter:
  33211. if (props.trigger === EVENT_CODE.enter) {
  33212. event.preventDefault();
  33213. event.stopPropagation();
  33214. handleAddTag();
  33215. }
  33216. break;
  33217. case EVENT_CODE.backspace:
  33218. if (!inputValue.value && props.modelValue?.length) {
  33219. event.preventDefault();
  33220. event.stopPropagation();
  33221. handleRemoveTag(props.modelValue.length - 1);
  33222. }
  33223. break;
  33224. }
  33225. };
  33226. const handleKeyup = (event) => {
  33227. if (isComposing.value || !isAndroid()) return;
  33228. switch (getEventCode(event)) {
  33229. case EVENT_CODE.space:
  33230. if (props.trigger === EVENT_CODE.space) {
  33231. event.preventDefault();
  33232. event.stopPropagation();
  33233. handleAddTag();
  33234. }
  33235. break;
  33236. }
  33237. };
  33238. const handleAddTag = () => {
  33239. const value = inputValue.value?.trim();
  33240. if (!value || inputLimit.value) return;
  33241. addTagsEmit(value);
  33242. };
  33243. const handleRemoveTag = (index) => {
  33244. const value = (props.modelValue ?? []).slice();
  33245. const [item] = value.splice(index, 1);
  33246. emit(UPDATE_MODEL_EVENT, value);
  33247. emit(CHANGE_EVENT, value);
  33248. emit("remove-tag", item, index);
  33249. };
  33250. const handleClear = () => {
  33251. inputValue.value = void 0;
  33252. emit(UPDATE_MODEL_EVENT, void 0);
  33253. emit(CHANGE_EVENT, void 0);
  33254. emit("clear");
  33255. };
  33256. const handleDragged = (draggingIndex, dropIndex, type) => {
  33257. const value = (props.modelValue ?? []).slice();
  33258. const [draggedItem] = value.splice(draggingIndex, 1);
  33259. const step = dropIndex > draggingIndex && type === "before" ? -1 : dropIndex < draggingIndex && type === "after" ? 1 : 0;
  33260. value.splice(dropIndex + step, 0, draggedItem);
  33261. emit(UPDATE_MODEL_EVENT, value);
  33262. emit(CHANGE_EVENT, value);
  33263. emit("drag-tag", draggingIndex, dropIndex + step, draggedItem);
  33264. };
  33265. const focus = () => {
  33266. inputRef.value?.focus();
  33267. };
  33268. const blur = () => {
  33269. inputRef.value?.blur();
  33270. };
  33271. const { wrapperRef, isFocused } = useFocusController(inputRef, {
  33272. disabled,
  33273. beforeBlur(event) {
  33274. return tagTooltipRef.value?.isFocusInsideContent(event);
  33275. },
  33276. afterBlur() {
  33277. if (props.saveOnBlur) handleAddTag();
  33278. else inputValue.value = void 0;
  33279. if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
  33280. }
  33281. });
  33282. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: handleInput });
  33283. watch(() => props.modelValue, () => {
  33284. if (props.validateEvent) formItem?.validate?.(CHANGE_EVENT).catch((err) => debugWarn(err));
  33285. });
  33286. return {
  33287. inputRef,
  33288. wrapperRef,
  33289. tagTooltipRef,
  33290. isFocused,
  33291. isComposing,
  33292. inputValue,
  33293. size,
  33294. tagSize,
  33295. placeholder,
  33296. closable,
  33297. disabled,
  33298. inputLimit,
  33299. showTagList,
  33300. collapseTagList,
  33301. handleDragged,
  33302. handlePaste,
  33303. handleInput,
  33304. handleKeydown,
  33305. handleKeyup,
  33306. handleAddTag,
  33307. handleRemoveTag,
  33308. handleClear,
  33309. handleCompositionStart,
  33310. handleCompositionUpdate,
  33311. handleCompositionEnd,
  33312. focus,
  33313. blur
  33314. };
  33315. }
  33316. //#endregion
  33317. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag-dom.mjs
  33318. function useInputTagDom({ props, isFocused, hovering, disabled, inputValue, size, validateState, validateIcon, needStatusIcon }) {
  33319. const attrs = useAttrs$1();
  33320. const slots = useSlots();
  33321. const ns = useNamespace("input-tag");
  33322. const nsInput = useNamespace("input");
  33323. const collapseItemRef = ref();
  33324. const innerRef = ref();
  33325. const containerKls = computed(() => [
  33326. ns.b(),
  33327. ns.is("focused", isFocused.value),
  33328. ns.is("hovering", hovering.value),
  33329. ns.is("disabled", disabled.value),
  33330. ns.m(size.value),
  33331. ns.e("wrapper"),
  33332. attrs.class
  33333. ]);
  33334. const containerStyle = computed(() => [attrs.style]);
  33335. const innerKls = computed(() => [
  33336. ns.e("inner"),
  33337. ns.is("draggable", props.draggable),
  33338. ns.is("left-space", !props.modelValue?.length && !slots.prefix),
  33339. ns.is("right-space", !props.modelValue?.length && !showSuffix.value)
  33340. ]);
  33341. const showClear = computed(() => {
  33342. return props.clearable && !disabled.value && !props.readonly && (props.modelValue?.length || inputValue.value) && (isFocused.value || hovering.value);
  33343. });
  33344. const showSuffix = computed(() => {
  33345. return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value;
  33346. });
  33347. const states = reactive({
  33348. innerWidth: 0,
  33349. collapseItemWidth: 0
  33350. });
  33351. const getGapWidth = () => {
  33352. if (!innerRef.value) return 0;
  33353. const style = window.getComputedStyle(innerRef.value);
  33354. return Number.parseFloat(style.gap || "6px");
  33355. };
  33356. const resetInnerWidth = () => {
  33357. states.innerWidth = Number.parseFloat(window.getComputedStyle(innerRef.value).width);
  33358. };
  33359. const resetCollapseItemWidth = () => {
  33360. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  33361. };
  33362. const tagStyle = computed(() => {
  33363. if (!props.collapseTags) return {};
  33364. const gapWidth = getGapWidth();
  33365. const inputSlotWidth = gapWidth + 11;
  33366. const maxWidth = collapseItemRef.value && props.maxCollapseTags === 1 ? states.innerWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.innerWidth - inputSlotWidth;
  33367. return { maxWidth: `${Math.max(maxWidth, 0)}px` };
  33368. });
  33369. useResizeObserver(innerRef, resetInnerWidth);
  33370. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  33371. return {
  33372. ns,
  33373. nsInput,
  33374. containerKls,
  33375. containerStyle,
  33376. innerKls,
  33377. showClear,
  33378. showSuffix,
  33379. tagStyle,
  33380. collapseItemRef,
  33381. innerRef
  33382. };
  33383. }
  33384. //#endregion
  33385. //#region node_modules/element-plus/es/components/input-tag/src/input-tag.vue_vue_type_script_setup_true_lang.mjs
  33386. var _hoisted_1$32 = [
  33387. "id",
  33388. "minlength",
  33389. "maxlength",
  33390. "disabled",
  33391. "readonly",
  33392. "autocomplete",
  33393. "tabindex",
  33394. "placeholder",
  33395. "autofocus",
  33396. "ariaLabel"
  33397. ];
  33398. var _hoisted_2$19 = ["textContent"];
  33399. //#endregion
  33400. //#region node_modules/element-plus/es/components/input-tag/index.mjs
  33401. var ElInputTag = withInstall(/* @__PURE__ */ defineComponent({
  33402. name: "ElInputTag",
  33403. inheritAttrs: false,
  33404. __name: "input-tag",
  33405. props: inputTagProps,
  33406. emits: inputTagEmits,
  33407. setup(__props, { expose: __expose, emit: __emit }) {
  33408. const props = __props;
  33409. const emit = __emit;
  33410. const attrs = useAttrs();
  33411. const slots = useSlots();
  33412. const { form, formItem } = useFormItem();
  33413. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  33414. const needStatusIcon = computed(() => form?.statusIcon ?? false);
  33415. const validateState = computed(() => formItem?.validateState || "");
  33416. const validateIcon = computed(() => {
  33417. return validateState.value && ValidateComponentsMap[validateState.value];
  33418. });
  33419. const { inputRef, wrapperRef, tagTooltipRef, isFocused, inputValue, size, tagSize, placeholder, closable, disabled, showTagList, collapseTagList, handleDragged, handlePaste, handleInput, handleKeydown, handleKeyup, handleRemoveTag, handleClear, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd, focus, blur } = useInputTag({
  33420. props,
  33421. emit,
  33422. formItem
  33423. });
  33424. const { hovering, handleMouseEnter, handleMouseLeave } = useHovering();
  33425. const { calculatorRef, inputStyle } = useCalcInputWidth();
  33426. const { dropIndicatorRef, showDropIndicator, handleDragStart, handleDragOver, handleDragEnd } = useDragTag({
  33427. wrapperRef,
  33428. handleDragged,
  33429. afterDragged: focus
  33430. });
  33431. const { ns, nsInput, containerKls, containerStyle, innerKls, showClear, showSuffix, tagStyle, collapseItemRef, innerRef } = useInputTagDom({
  33432. props,
  33433. hovering,
  33434. isFocused,
  33435. inputValue,
  33436. disabled,
  33437. size,
  33438. validateState,
  33439. validateIcon,
  33440. needStatusIcon
  33441. });
  33442. __expose({
  33443. focus,
  33444. blur
  33445. });
  33446. return (_ctx, _cache) => {
  33447. return openBlock(), createElementBlock("div", {
  33448. ref_key: "wrapperRef",
  33449. ref: wrapperRef,
  33450. class: normalizeClass(unref(containerKls)),
  33451. style: normalizeStyle(unref(containerStyle)),
  33452. onMouseenter: _cache[9] || (_cache[9] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  33453. onMouseleave: _cache[10] || (_cache[10] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args))
  33454. }, [
  33455. unref(slots).prefix ? (openBlock(), createElementBlock("div", {
  33456. key: 0,
  33457. class: normalizeClass(unref(ns).e("prefix"))
  33458. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  33459. createBaseVNode("div", {
  33460. ref_key: "innerRef",
  33461. ref: innerRef,
  33462. class: normalizeClass(unref(innerKls))
  33463. }, [
  33464. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showTagList), (item, index) => {
  33465. return openBlock(), createBlock(unref(ElTag), {
  33466. key: index,
  33467. size: unref(tagSize),
  33468. closable: unref(closable),
  33469. type: __props.tagType,
  33470. effect: __props.tagEffect,
  33471. draggable: unref(closable) && __props.draggable,
  33472. style: normalizeStyle(unref(tagStyle)),
  33473. "disable-transitions": "",
  33474. onClose: ($event) => unref(handleRemoveTag)(index),
  33475. onDragstart: (event) => unref(handleDragStart)(event, index),
  33476. onDragover: (event) => unref(handleDragOver)(event, index),
  33477. onDragend: unref(handleDragEnd),
  33478. onDrop: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  33479. }, {
  33480. default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
  33481. value: item,
  33482. index
  33483. }, () => [createTextVNode(toDisplayString(item), 1)])]),
  33484. _: 2
  33485. }, 1032, [
  33486. "size",
  33487. "closable",
  33488. "type",
  33489. "effect",
  33490. "draggable",
  33491. "style",
  33492. "onClose",
  33493. "onDragstart",
  33494. "onDragover",
  33495. "onDragend"
  33496. ]);
  33497. }), 128)),
  33498. __props.collapseTags && __props.modelValue && __props.modelValue.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
  33499. key: 0,
  33500. ref_key: "tagTooltipRef",
  33501. ref: tagTooltipRef,
  33502. disabled: !__props.collapseTagsTooltip,
  33503. "fallback-placements": [
  33504. "bottom",
  33505. "top",
  33506. "right",
  33507. "left"
  33508. ],
  33509. effect: __props.effect,
  33510. placement: "bottom"
  33511. }, {
  33512. default: withCtx(() => [createBaseVNode("div", {
  33513. ref_key: "collapseItemRef",
  33514. ref: collapseItemRef,
  33515. class: normalizeClass(unref(ns).e("collapse-tag"))
  33516. }, [createVNode(unref(ElTag), {
  33517. closable: false,
  33518. size: unref(tagSize),
  33519. type: __props.tagType,
  33520. effect: __props.tagEffect,
  33521. "disable-transitions": ""
  33522. }, {
  33523. default: withCtx(() => [createTextVNode(" + " + toDisplayString(__props.modelValue.length - __props.maxCollapseTags), 1)]),
  33524. _: 1
  33525. }, 8, [
  33526. "size",
  33527. "type",
  33528. "effect"
  33529. ])], 2)]),
  33530. content: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-tag-list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(collapseTagList), (item, index) => {
  33531. return openBlock(), createBlock(unref(ElTag), {
  33532. key: index,
  33533. size: unref(tagSize),
  33534. closable: unref(closable),
  33535. type: __props.tagType,
  33536. effect: __props.tagEffect,
  33537. "disable-transitions": "",
  33538. onClose: ($event) => unref(handleRemoveTag)(index + __props.maxCollapseTags)
  33539. }, {
  33540. default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
  33541. value: item,
  33542. index: index + __props.maxCollapseTags
  33543. }, () => [createTextVNode(toDisplayString(item), 1)])]),
  33544. _: 2
  33545. }, 1032, [
  33546. "size",
  33547. "closable",
  33548. "type",
  33549. "effect",
  33550. "onClose"
  33551. ]);
  33552. }), 128))], 2)]),
  33553. _: 3
  33554. }, 8, ["disabled", "effect"])) : createCommentVNode("v-if", true),
  33555. createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-wrapper")) }, [withDirectives(createBaseVNode("input", mergeProps({
  33556. id: unref(inputId),
  33557. ref_key: "inputRef",
  33558. ref: inputRef,
  33559. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null)
  33560. }, unref(attrs), {
  33561. type: "text",
  33562. minlength: __props.minlength,
  33563. maxlength: __props.maxlength,
  33564. disabled: unref(disabled),
  33565. readonly: __props.readonly,
  33566. autocomplete: __props.autocomplete,
  33567. tabindex: __props.tabindex,
  33568. placeholder: unref(placeholder),
  33569. autofocus: __props.autofocus,
  33570. ariaLabel: __props.ariaLabel,
  33571. class: unref(ns).e("input"),
  33572. style: unref(inputStyle),
  33573. onCompositionstart: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  33574. onCompositionupdate: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  33575. onCompositionend: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  33576. onPaste: _cache[5] || (_cache[5] = (...args) => unref(handlePaste) && unref(handlePaste)(...args)),
  33577. onInput: _cache[6] || (_cache[6] = (...args) => unref(handleInput) && unref(handleInput)(...args)),
  33578. onKeydown: _cache[7] || (_cache[7] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)),
  33579. onKeyup: _cache[8] || (_cache[8] = (...args) => unref(handleKeyup) && unref(handleKeyup)(...args))
  33580. }), null, 16, _hoisted_1$32), [[vModelText, unref(inputValue)]]), createBaseVNode("span", {
  33581. ref_key: "calculatorRef",
  33582. ref: calculatorRef,
  33583. "aria-hidden": "true",
  33584. class: normalizeClass(unref(ns).e("input-calculator")),
  33585. textContent: toDisplayString(unref(inputValue))
  33586. }, null, 10, _hoisted_2$19)], 2),
  33587. withDirectives(createBaseVNode("div", {
  33588. ref_key: "dropIndicatorRef",
  33589. ref: dropIndicatorRef,
  33590. class: normalizeClass(unref(ns).e("drop-indicator"))
  33591. }, null, 2), [[vShow, unref(showDropIndicator)]])
  33592. ], 2),
  33593. unref(showSuffix) ? (openBlock(), createElementBlock("div", {
  33594. key: 1,
  33595. class: normalizeClass(unref(ns).e("suffix"))
  33596. }, [
  33597. renderSlot(_ctx.$slots, "suffix"),
  33598. unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
  33599. key: 0,
  33600. class: normalizeClass([unref(ns).e("icon"), unref(ns).e("clear")]),
  33601. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  33602. onClick: unref(handleClear)
  33603. }, {
  33604. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  33605. _: 1
  33606. }, 8, [
  33607. "class",
  33608. "onMousedown",
  33609. "onClick"
  33610. ])) : createCommentVNode("v-if", true),
  33611. validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  33612. key: 1,
  33613. class: normalizeClass([
  33614. unref(nsInput).e("icon"),
  33615. unref(nsInput).e("validateIcon"),
  33616. unref(nsInput).is("loading", validateState.value === "validating")
  33617. ])
  33618. }, {
  33619. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
  33620. _: 1
  33621. }, 8, ["class"])) : createCommentVNode("v-if", true)
  33622. ], 2)) : createCommentVNode("v-if", true)
  33623. ], 38);
  33624. };
  33625. }
  33626. }));
  33627. //#endregion
  33628. //#region node_modules/element-plus/es/components/link/src/link.mjs
  33629. /**
  33630. * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
  33631. */
  33632. var linkProps = buildProps({
  33633. type: {
  33634. type: String,
  33635. values: [
  33636. "primary",
  33637. "success",
  33638. "warning",
  33639. "info",
  33640. "danger",
  33641. "default"
  33642. ],
  33643. default: void 0
  33644. },
  33645. underline: {
  33646. type: [Boolean, String],
  33647. values: [
  33648. true,
  33649. false,
  33650. "always",
  33651. "never",
  33652. "hover"
  33653. ],
  33654. default: void 0
  33655. },
  33656. disabled: Boolean,
  33657. href: {
  33658. type: String,
  33659. default: ""
  33660. },
  33661. target: {
  33662. type: String,
  33663. default: "_self"
  33664. },
  33665. icon: { type: iconPropType }
  33666. });
  33667. var linkEmits = { click: (evt) => evt instanceof MouseEvent };
  33668. //#endregion
  33669. //#region node_modules/element-plus/es/components/link/src/link.vue_vue_type_script_setup_true_lang.mjs
  33670. var _hoisted_1$31 = ["href", "target"];
  33671. //#endregion
  33672. //#region node_modules/element-plus/es/components/link/index.mjs
  33673. var ElLink = withInstall(/* @__PURE__ */ defineComponent({
  33674. name: "ElLink",
  33675. __name: "link",
  33676. props: linkProps,
  33677. emits: linkEmits,
  33678. setup(__props, { emit: __emit }) {
  33679. const props = __props;
  33680. const emit = __emit;
  33681. const globalConfig = useGlobalConfig("link");
  33682. useDeprecated({
  33683. scope: "el-link",
  33684. from: "The underline option (boolean)",
  33685. replacement: "'always' | 'hover' | 'never'",
  33686. version: "3.0.0",
  33687. ref: "https://element-plus.org/en-US/component/link.html#underline"
  33688. }, computed(() => isBoolean(props.underline)));
  33689. const ns = useNamespace("link");
  33690. const linkKls = computed(() => [
  33691. ns.b(),
  33692. ns.m(props.type ?? globalConfig.value?.type ?? "default"),
  33693. ns.is("disabled", props.disabled),
  33694. ns.is("underline", underline.value === "always"),
  33695. ns.is("hover-underline", underline.value === "hover" && !props.disabled)
  33696. ]);
  33697. const underline = computed(() => {
  33698. if (isBoolean(props.underline)) return props.underline ? "hover" : "never";
  33699. else return props.underline ?? globalConfig.value?.underline ?? "hover";
  33700. });
  33701. function handleClick(event) {
  33702. if (!props.disabled) emit("click", event);
  33703. }
  33704. return (_ctx, _cache) => {
  33705. return openBlock(), createElementBlock("a", {
  33706. class: normalizeClass(linkKls.value),
  33707. href: __props.disabled || !__props.href ? void 0 : __props.href,
  33708. target: __props.disabled || !__props.href ? void 0 : __props.target,
  33709. onClick: handleClick
  33710. }, [
  33711. __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  33712. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  33713. _: 1
  33714. })) : createCommentVNode("v-if", true),
  33715. _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  33716. key: 1,
  33717. class: normalizeClass(unref(ns).e("inner"))
  33718. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true),
  33719. _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
  33720. ], 10, _hoisted_1$31);
  33721. };
  33722. }
  33723. }));
  33724. //#endregion
  33725. //#region node_modules/element-plus/es/components/menu/src/tokens.mjs
  33726. var MENU_INJECTION_KEY = "rootMenu";
  33727. var SUB_MENU_INJECTION_KEY = "subMenu:";
  33728. //#endregion
  33729. //#region node_modules/element-plus/es/components/menu/src/use-menu.mjs
  33730. function useMenu(instance, currentIndex) {
  33731. const indexPath = computed(() => {
  33732. let parent = instance.parent;
  33733. const path = [currentIndex.value];
  33734. while (parent.type.name !== "ElMenu") {
  33735. if (parent.props.index) path.unshift(parent.props.index);
  33736. parent = parent.parent;
  33737. }
  33738. return path;
  33739. });
  33740. return {
  33741. parentMenu: computed(() => {
  33742. let parent = instance.parent;
  33743. while (parent && !["ElMenu", "ElSubMenu"].includes(parent.type.name)) parent = parent.parent;
  33744. return parent;
  33745. }),
  33746. indexPath
  33747. };
  33748. }
  33749. //#endregion
  33750. //#region node_modules/element-plus/es/components/menu/src/use-menu-color.mjs
  33751. function useMenuColor(props) {
  33752. return computed(() => {
  33753. const color = props.backgroundColor;
  33754. return color ? new TinyColor(color).shade(20).toString() : "";
  33755. });
  33756. }
  33757. //#endregion
  33758. //#region node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs
  33759. var useMenuCssVar = (props, level) => {
  33760. const ns = useNamespace("menu");
  33761. return computed(() => ns.cssVarBlock({
  33762. "text-color": props.textColor || "",
  33763. "hover-text-color": props.textColor || "",
  33764. "bg-color": props.backgroundColor || "",
  33765. "hover-bg-color": useMenuColor(props).value || "",
  33766. "active-color": props.activeTextColor || "",
  33767. level: `${level}`
  33768. }));
  33769. };
  33770. //#endregion
  33771. //#region node_modules/element-plus/es/components/menu/src/sub-menu.mjs
  33772. var subMenuProps = buildProps({
  33773. index: {
  33774. type: String,
  33775. required: true
  33776. },
  33777. showTimeout: Number,
  33778. hideTimeout: Number,
  33779. popperClass: String,
  33780. popperStyle: { type: definePropType([String, Object]) },
  33781. disabled: Boolean,
  33782. teleported: {
  33783. type: Boolean,
  33784. default: void 0
  33785. },
  33786. popperOffset: Number,
  33787. expandCloseIcon: { type: iconPropType },
  33788. expandOpenIcon: { type: iconPropType },
  33789. collapseCloseIcon: { type: iconPropType },
  33790. collapseOpenIcon: { type: iconPropType }
  33791. });
  33792. var COMPONENT_NAME$8 = "ElSubMenu";
  33793. var sub_menu_default = defineComponent({
  33794. name: COMPONENT_NAME$8,
  33795. props: subMenuProps,
  33796. setup(props, { slots, expose }) {
  33797. const instance = getCurrentInstance();
  33798. const { indexPath, parentMenu } = useMenu(instance, computed(() => props.index));
  33799. const nsMenu = useNamespace("menu");
  33800. const nsSubMenu = useNamespace("sub-menu");
  33801. const rootMenu = inject(MENU_INJECTION_KEY);
  33802. if (!rootMenu) throwError(COMPONENT_NAME$8, "can not inject root menu");
  33803. const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
  33804. if (!subMenu) throwError(COMPONENT_NAME$8, "can not inject sub menu");
  33805. const items = ref({});
  33806. const subMenus = ref({});
  33807. let timeout;
  33808. const mouseInChild = ref(false);
  33809. const verticalTitleRef = ref();
  33810. const vPopper = ref();
  33811. const isFirstLevel = computed(() => subMenu.level === 0);
  33812. const currentPlacement = computed(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
  33813. const subMenuTitleIcon = computed(() => {
  33814. if (mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse) {
  33815. if (props.expandCloseIcon && props.expandOpenIcon) return opened.value ? props.expandOpenIcon : props.expandCloseIcon;
  33816. return arrow_down_default;
  33817. } else {
  33818. if (props.collapseCloseIcon && props.collapseOpenIcon) return opened.value ? props.collapseOpenIcon : props.collapseCloseIcon;
  33819. return arrow_right_default;
  33820. }
  33821. });
  33822. const appendToBody = computed(() => {
  33823. const value = props.teleported;
  33824. return isUndefined(value) ? isFirstLevel.value : value;
  33825. });
  33826. const menuTransitionName = computed(() => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top`);
  33827. const fallbackPlacements = computed(() => mode.value === "horizontal" && isFirstLevel.value ? [
  33828. "bottom-start",
  33829. "bottom-end",
  33830. "top-start",
  33831. "top-end",
  33832. "right-start",
  33833. "left-start"
  33834. ] : [
  33835. "right-start",
  33836. "right",
  33837. "right-end",
  33838. "left-start",
  33839. "bottom-start",
  33840. "bottom-end",
  33841. "top-start",
  33842. "top-end"
  33843. ]);
  33844. const opened = computed(() => rootMenu.openedMenus.includes(props.index));
  33845. const active = computed(() => [...Object.values(items.value), ...Object.values(subMenus.value)].some(({ active }) => active));
  33846. const mode = computed(() => rootMenu.props.mode);
  33847. const persistent = computed(() => rootMenu.props.persistent);
  33848. const item = reactive({
  33849. index: props.index,
  33850. indexPath,
  33851. active
  33852. });
  33853. const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1);
  33854. const subMenuPopperOffset = computed(() => props.popperOffset ?? rootMenu.props.popperOffset);
  33855. const subMenuPopperClass = computed(() => props.popperClass ?? rootMenu.props.popperClass);
  33856. const subMenuPopperStyle = computed(() => props.popperStyle ?? rootMenu.props.popperStyle);
  33857. const subMenuShowTimeout = computed(() => props.showTimeout ?? rootMenu.props.showTimeout);
  33858. const subMenuHideTimeout = computed(() => props.hideTimeout ?? rootMenu.props.hideTimeout);
  33859. const doDestroy = () => vPopper.value?.popperRef?.popperInstanceRef?.destroy();
  33860. const handleCollapseToggle = (value) => {
  33861. if (!value) doDestroy();
  33862. };
  33863. const handleClick = () => {
  33864. if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) return;
  33865. rootMenu.handleSubMenuClick({
  33866. index: props.index,
  33867. indexPath: indexPath.value,
  33868. active: active.value
  33869. });
  33870. };
  33871. const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => {
  33872. if (event.type === "focus") return;
  33873. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
  33874. subMenu.mouseInChild.value = true;
  33875. return;
  33876. }
  33877. subMenu.mouseInChild.value = true;
  33878. timeout?.();
  33879. ({stop: timeout} = useTimeoutFn(() => {
  33880. rootMenu.openMenu(props.index, indexPath.value);
  33881. }, showTimeout));
  33882. if (appendToBody.value) parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter"));
  33883. if (event.type === "mouseenter" && event.target) nextTick(() => {
  33884. focusElement(event.target, { preventScroll: true });
  33885. });
  33886. };
  33887. const handleMouseleave = (deepDispatch = false) => {
  33888. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") {
  33889. subMenu.mouseInChild.value = false;
  33890. return;
  33891. }
  33892. timeout?.();
  33893. subMenu.mouseInChild.value = false;
  33894. ({stop: timeout} = useTimeoutFn(() => !mouseInChild.value && rootMenu.closeMenu(props.index, indexPath.value), subMenuHideTimeout.value));
  33895. if (appendToBody.value && deepDispatch) subMenu.handleMouseleave?.(true);
  33896. };
  33897. watch(() => rootMenu.props.collapse, (value) => handleCollapseToggle(Boolean(value)));
  33898. {
  33899. const addSubMenu = (item) => {
  33900. subMenus.value[item.index] = item;
  33901. };
  33902. const removeSubMenu = (item) => {
  33903. delete subMenus.value[item.index];
  33904. };
  33905. provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
  33906. addSubMenu,
  33907. removeSubMenu,
  33908. handleMouseleave,
  33909. mouseInChild,
  33910. level: subMenu.level + 1
  33911. });
  33912. }
  33913. expose({ opened });
  33914. onMounted(() => {
  33915. rootMenu.addSubMenu(item);
  33916. subMenu.addSubMenu(item);
  33917. });
  33918. onBeforeUnmount(() => {
  33919. subMenu.removeSubMenu(item);
  33920. rootMenu.removeSubMenu(item);
  33921. });
  33922. return () => {
  33923. const titleTag = [slots.title?.(), h$1(ElIcon, {
  33924. class: nsSubMenu.e("icon-arrow"),
  33925. style: { transform: opened.value ? props.expandCloseIcon && props.expandOpenIcon || props.collapseCloseIcon && props.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none" }
  33926. }, { default: () => isString(subMenuTitleIcon.value) ? h$1(instance.appContext.components[subMenuTitleIcon.value]) : h$1(subMenuTitleIcon.value) })];
  33927. const child = rootMenu.isMenuPopup ? h$1(ElTooltip, {
  33928. ref: vPopper,
  33929. visible: opened.value,
  33930. effect: "light",
  33931. pure: true,
  33932. offset: subMenuPopperOffset.value,
  33933. showArrow: false,
  33934. persistent: persistent.value,
  33935. popperClass: subMenuPopperClass.value,
  33936. popperStyle: subMenuPopperStyle.value,
  33937. placement: currentPlacement.value,
  33938. teleported: appendToBody.value,
  33939. fallbackPlacements: fallbackPlacements.value,
  33940. transition: menuTransitionName.value,
  33941. gpuAcceleration: false
  33942. }, {
  33943. content: () => h$1("div", {
  33944. class: [
  33945. nsMenu.m(mode.value),
  33946. nsMenu.m("popup-container"),
  33947. subMenuPopperClass.value
  33948. ],
  33949. onMouseenter: (evt) => handleMouseenter(evt, 100),
  33950. onMouseleave: () => handleMouseleave(true),
  33951. onFocus: (evt) => handleMouseenter(evt, 100)
  33952. }, [h$1("ul", {
  33953. class: [
  33954. nsMenu.b(),
  33955. nsMenu.m("popup"),
  33956. nsMenu.m(`popup-${currentPlacement.value}`)
  33957. ],
  33958. style: ulStyle.value
  33959. }, [slots.default?.()])]),
  33960. default: () => h$1("div", {
  33961. class: nsSubMenu.e("title"),
  33962. onClick: handleClick
  33963. }, titleTag)
  33964. }) : h$1(Fragment, {}, [h$1("div", {
  33965. class: nsSubMenu.e("title"),
  33966. ref: verticalTitleRef,
  33967. onClick: handleClick
  33968. }, titleTag), h$1(ElCollapseTransition, {}, { default: () => withDirectives(h$1("ul", {
  33969. role: "menu",
  33970. class: [nsMenu.b(), nsMenu.m("inline")],
  33971. style: ulStyle.value
  33972. }, [slots.default?.()]), [[vShow, opened.value]]) })]);
  33973. return h$1("li", {
  33974. class: [
  33975. nsSubMenu.b(),
  33976. nsSubMenu.is("active", active.value),
  33977. nsSubMenu.is("opened", opened.value),
  33978. nsSubMenu.is("disabled", props.disabled)
  33979. ],
  33980. role: "menuitem",
  33981. ariaHaspopup: true,
  33982. ariaExpanded: opened.value,
  33983. onMouseenter: handleMouseenter,
  33984. onMouseleave: () => handleMouseleave(),
  33985. onFocus: handleMouseenter
  33986. }, [child]);
  33987. };
  33988. }
  33989. });
  33990. //#endregion
  33991. //#region node_modules/element-plus/es/components/menu/src/utils/submenu.mjs
  33992. var SubMenu = class {
  33993. constructor(parent, domNode) {
  33994. this.parent = parent;
  33995. this.domNode = domNode;
  33996. this.subIndex = 0;
  33997. this.subIndex = 0;
  33998. this.init();
  33999. }
  34000. init() {
  34001. this.subMenuItems = this.domNode.querySelectorAll("li");
  34002. this.addListeners();
  34003. }
  34004. gotoSubIndex(idx) {
  34005. if (idx === this.subMenuItems.length) idx = 0;
  34006. else if (idx < 0) idx = this.subMenuItems.length - 1;
  34007. this.subMenuItems[idx].focus();
  34008. this.subIndex = idx;
  34009. }
  34010. addListeners() {
  34011. const parentNode = this.parent.domNode;
  34012. Array.prototype.forEach.call(this.subMenuItems, (el) => {
  34013. el.addEventListener("keydown", (event) => {
  34014. const code = getEventCode(event);
  34015. let prevDef = false;
  34016. switch (code) {
  34017. case EVENT_CODE.down:
  34018. this.gotoSubIndex(this.subIndex + 1);
  34019. prevDef = true;
  34020. break;
  34021. case EVENT_CODE.up:
  34022. this.gotoSubIndex(this.subIndex - 1);
  34023. prevDef = true;
  34024. break;
  34025. case EVENT_CODE.tab:
  34026. triggerEvent(parentNode, "mouseleave");
  34027. break;
  34028. case EVENT_CODE.enter:
  34029. case EVENT_CODE.numpadEnter:
  34030. case EVENT_CODE.space:
  34031. prevDef = true;
  34032. event.currentTarget.click();
  34033. break;
  34034. }
  34035. if (prevDef) {
  34036. event.preventDefault();
  34037. event.stopPropagation();
  34038. }
  34039. return false;
  34040. });
  34041. });
  34042. }
  34043. };
  34044. //#endregion
  34045. //#region node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs
  34046. var MenuItem = class {
  34047. constructor(domNode, namespace) {
  34048. this.domNode = domNode;
  34049. this.submenu = null;
  34050. this.submenu = null;
  34051. this.init(namespace);
  34052. }
  34053. init(namespace) {
  34054. this.domNode.setAttribute("tabindex", "0");
  34055. const menuChild = this.domNode.querySelector(`.${namespace}-menu`);
  34056. if (menuChild) this.submenu = new SubMenu(this, menuChild);
  34057. this.addListeners();
  34058. }
  34059. addListeners() {
  34060. this.domNode.addEventListener("keydown", (event) => {
  34061. const code = getEventCode(event);
  34062. let prevDef = false;
  34063. switch (code) {
  34064. case EVENT_CODE.down:
  34065. triggerEvent(event.currentTarget, "mouseenter");
  34066. this.submenu && this.submenu.gotoSubIndex(0);
  34067. prevDef = true;
  34068. break;
  34069. case EVENT_CODE.up:
  34070. triggerEvent(event.currentTarget, "mouseenter");
  34071. this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
  34072. prevDef = true;
  34073. break;
  34074. case EVENT_CODE.tab:
  34075. triggerEvent(event.currentTarget, "mouseleave");
  34076. break;
  34077. case EVENT_CODE.enter:
  34078. case EVENT_CODE.numpadEnter:
  34079. case EVENT_CODE.space:
  34080. prevDef = true;
  34081. event.currentTarget.click();
  34082. break;
  34083. }
  34084. if (prevDef) event.preventDefault();
  34085. });
  34086. }
  34087. };
  34088. //#endregion
  34089. //#region node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs
  34090. var Menu = class {
  34091. constructor(domNode, namespace) {
  34092. this.domNode = domNode;
  34093. this.init(namespace);
  34094. }
  34095. init(namespace) {
  34096. const menuChildren = this.domNode.childNodes;
  34097. Array.from(menuChildren).forEach((child) => {
  34098. if (child.nodeType === 1) new MenuItem(child, namespace);
  34099. });
  34100. }
  34101. };
  34102. //#endregion
  34103. //#region node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs
  34104. var menu_collapse_transition_default = /* @__PURE__ */ defineComponent({
  34105. name: "ElMenuCollapseTransition",
  34106. __name: "menu-collapse-transition",
  34107. setup(__props) {
  34108. const ns = useNamespace("menu");
  34109. const listeners = {
  34110. onBeforeEnter: (el) => el.style.opacity = "0.2",
  34111. onEnter(el, done) {
  34112. addClass(el, `${ns.namespace.value}-opacity-transition`);
  34113. el.style.opacity = "1";
  34114. done();
  34115. },
  34116. onAfterEnter(el) {
  34117. removeClass(el, `${ns.namespace.value}-opacity-transition`);
  34118. el.style.opacity = "";
  34119. },
  34120. onBeforeLeave(el) {
  34121. if (!el.dataset) el.dataset = {};
  34122. if (hasClass(el, ns.m("collapse"))) {
  34123. removeClass(el, ns.m("collapse"));
  34124. el.dataset.oldOverflow = el.style.overflow;
  34125. el.dataset.scrollWidth = el.clientWidth.toString();
  34126. addClass(el, ns.m("collapse"));
  34127. } else {
  34128. addClass(el, ns.m("collapse"));
  34129. el.dataset.oldOverflow = el.style.overflow;
  34130. el.dataset.scrollWidth = el.clientWidth.toString();
  34131. removeClass(el, ns.m("collapse"));
  34132. }
  34133. el.style.width = `${el.scrollWidth}px`;
  34134. el.style.overflow = "hidden";
  34135. },
  34136. onLeave(el) {
  34137. addClass(el, "horizontal-collapse-transition");
  34138. el.style.width = `${el.dataset.scrollWidth}px`;
  34139. }
  34140. };
  34141. return (_ctx, _cache) => {
  34142. return openBlock(), createBlock(Transition, mergeProps({ mode: "out-in" }, listeners), {
  34143. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  34144. _: 3
  34145. }, 16);
  34146. };
  34147. }
  34148. });
  34149. //#endregion
  34150. //#region node_modules/element-plus/es/components/menu/src/menu.mjs
  34151. var menuProps = buildProps({
  34152. mode: {
  34153. type: String,
  34154. values: ["horizontal", "vertical"],
  34155. default: "vertical"
  34156. },
  34157. defaultActive: {
  34158. type: String,
  34159. default: ""
  34160. },
  34161. defaultOpeneds: {
  34162. type: definePropType(Array),
  34163. default: () => mutable([])
  34164. },
  34165. uniqueOpened: Boolean,
  34166. router: Boolean,
  34167. menuTrigger: {
  34168. type: String,
  34169. values: ["hover", "click"],
  34170. default: "hover"
  34171. },
  34172. collapse: Boolean,
  34173. backgroundColor: String,
  34174. textColor: String,
  34175. activeTextColor: String,
  34176. closeOnClickOutside: Boolean,
  34177. collapseTransition: {
  34178. type: Boolean,
  34179. default: true
  34180. },
  34181. ellipsis: {
  34182. type: Boolean,
  34183. default: true
  34184. },
  34185. popperOffset: {
  34186. type: Number,
  34187. default: 6
  34188. },
  34189. ellipsisIcon: {
  34190. type: iconPropType,
  34191. default: () => more_default
  34192. },
  34193. popperEffect: {
  34194. type: definePropType(String),
  34195. default: "dark"
  34196. },
  34197. popperClass: String,
  34198. popperStyle: { type: definePropType([String, Object]) },
  34199. showTimeout: {
  34200. type: Number,
  34201. default: 300
  34202. },
  34203. hideTimeout: {
  34204. type: Number,
  34205. default: 300
  34206. },
  34207. persistent: {
  34208. type: Boolean,
  34209. default: true
  34210. }
  34211. });
  34212. var checkIndexPath = (indexPath) => isArray$1(indexPath) && indexPath.every((path) => isString(path));
  34213. var menuEmits = {
  34214. close: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  34215. open: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  34216. select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject$2(item) && (isUndefined(routerResult) || routerResult instanceof Promise)
  34217. };
  34218. var DEFAULT_MORE_ITEM_WIDTH = 64;
  34219. var menu_default = defineComponent({
  34220. name: "ElMenu",
  34221. props: menuProps,
  34222. emits: menuEmits,
  34223. setup(props, { emit, slots, expose }) {
  34224. const instance = getCurrentInstance();
  34225. const router = instance.appContext.config.globalProperties.$router;
  34226. const menu = ref();
  34227. const subMenu = ref();
  34228. const nsMenu = useNamespace("menu");
  34229. const nsSubMenu = useNamespace("sub-menu");
  34230. let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
  34231. const sliceIndex = ref(-1);
  34232. const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
  34233. const activeIndex = ref(props.defaultActive);
  34234. const items = ref({});
  34235. const subMenus = ref({});
  34236. const isMenuPopup = computed(() => props.mode === "horizontal" || props.mode === "vertical" && props.collapse);
  34237. const initMenu = () => {
  34238. const activeItem = activeIndex.value && items.value[activeIndex.value];
  34239. if (!activeItem || props.mode === "horizontal" || props.collapse) return;
  34240. activeItem.indexPath.forEach((index) => {
  34241. const subMenu = subMenus.value[index];
  34242. subMenu && openMenu(index, subMenu.indexPath);
  34243. });
  34244. };
  34245. const openMenu = (index, indexPath) => {
  34246. if (openedMenus.value.includes(index)) return;
  34247. if (props.uniqueOpened) openedMenus.value = openedMenus.value.filter((index) => indexPath.includes(index));
  34248. openedMenus.value.push(index);
  34249. emit("open", index, indexPath);
  34250. };
  34251. const close = (index) => {
  34252. const i = openedMenus.value.indexOf(index);
  34253. if (i !== -1) openedMenus.value.splice(i, 1);
  34254. };
  34255. const closeMenu = (index, indexPath) => {
  34256. close(index);
  34257. emit("close", index, indexPath);
  34258. };
  34259. const handleSubMenuClick = ({ index, indexPath }) => {
  34260. openedMenus.value.includes(index) ? closeMenu(index, indexPath) : openMenu(index, indexPath);
  34261. };
  34262. const handleMenuItemClick = (menuItem) => {
  34263. if (props.mode === "horizontal" || props.collapse) openedMenus.value = [];
  34264. const { index, indexPath } = menuItem;
  34265. if (isNil(index) || isNil(indexPath)) return;
  34266. if (props.router && router) {
  34267. const route = menuItem.route || index;
  34268. const routerResult = router.push(route).then((res) => {
  34269. if (!res) activeIndex.value = index;
  34270. return res;
  34271. });
  34272. emit("select", index, indexPath, {
  34273. index,
  34274. indexPath,
  34275. route
  34276. }, routerResult);
  34277. } else {
  34278. activeIndex.value = index;
  34279. emit("select", index, indexPath, {
  34280. index,
  34281. indexPath
  34282. });
  34283. }
  34284. };
  34285. const updateActiveIndex = (val) => {
  34286. const itemsInData = items.value;
  34287. activeIndex.value = (itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props.defaultActive])?.index ?? val;
  34288. };
  34289. const calcMenuItemWidth = (menuItem) => {
  34290. const computedStyle = getComputedStyle(menuItem);
  34291. const marginLeft = Number.parseInt(computedStyle.marginLeft, 10);
  34292. const marginRight = Number.parseInt(computedStyle.marginRight, 10);
  34293. return menuItem.offsetWidth + marginLeft + marginRight || 0;
  34294. };
  34295. const calcSliceIndex = () => {
  34296. if (!menu.value) return -1;
  34297. const items = Array.from(menu.value.childNodes).filter((item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue));
  34298. const computedMenuStyle = getComputedStyle(menu.value);
  34299. const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10);
  34300. const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10);
  34301. const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight;
  34302. let calcWidth = 0;
  34303. let sliceIndex = 0;
  34304. items.forEach((item, index) => {
  34305. calcWidth += calcMenuItemWidth(item);
  34306. if (calcWidth <= menuWidth - moreItemWidth) sliceIndex = index + 1;
  34307. });
  34308. return sliceIndex === items.length ? -1 : sliceIndex;
  34309. };
  34310. const getIndexPath = (index) => subMenus.value[index].indexPath;
  34311. const debounce = (fn, wait = 33.34) => {
  34312. let timer;
  34313. return () => {
  34314. timer && clearTimeout(timer);
  34315. timer = setTimeout(() => {
  34316. fn();
  34317. }, wait);
  34318. };
  34319. };
  34320. let isFirstTimeRender = true;
  34321. const handleResize = () => {
  34322. const el = unrefElement(subMenu);
  34323. if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH;
  34324. if (sliceIndex.value === calcSliceIndex()) return;
  34325. const callback = () => {
  34326. sliceIndex.value = -1;
  34327. nextTick(() => {
  34328. sliceIndex.value = calcSliceIndex();
  34329. });
  34330. };
  34331. isFirstTimeRender ? callback() : debounce(callback)();
  34332. isFirstTimeRender = false;
  34333. };
  34334. watch(() => props.defaultActive, (currentActive) => {
  34335. if (!items.value[currentActive]) activeIndex.value = "";
  34336. updateActiveIndex(currentActive);
  34337. });
  34338. watch(() => props.collapse, (value) => {
  34339. if (value) openedMenus.value = [];
  34340. });
  34341. watch(items.value, initMenu);
  34342. let resizeStopper;
  34343. watchEffect(() => {
  34344. if (props.mode === "horizontal" && props.ellipsis) resizeStopper = useResizeObserver(menu, handleResize).stop;
  34345. else resizeStopper?.();
  34346. });
  34347. const mouseInChild = ref(false);
  34348. {
  34349. const addSubMenu = (item) => {
  34350. subMenus.value[item.index] = item;
  34351. };
  34352. const removeSubMenu = (item) => {
  34353. delete subMenus.value[item.index];
  34354. };
  34355. const addMenuItem = (item) => {
  34356. items.value[item.index] = item;
  34357. };
  34358. const removeMenuItem = (item) => {
  34359. delete items.value[item.index];
  34360. };
  34361. provide(MENU_INJECTION_KEY, reactive({
  34362. props,
  34363. openedMenus,
  34364. items,
  34365. subMenus,
  34366. activeIndex,
  34367. isMenuPopup,
  34368. addMenuItem,
  34369. removeMenuItem,
  34370. addSubMenu,
  34371. removeSubMenu,
  34372. openMenu,
  34373. closeMenu,
  34374. handleMenuItemClick,
  34375. handleSubMenuClick
  34376. }));
  34377. provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
  34378. addSubMenu,
  34379. removeSubMenu,
  34380. mouseInChild,
  34381. level: 0
  34382. });
  34383. }
  34384. onMounted(() => {
  34385. if (props.mode === "horizontal") new Menu(instance.vnode.el, nsMenu.namespace.value);
  34386. });
  34387. {
  34388. const open = (index) => {
  34389. const { indexPath } = subMenus.value[index];
  34390. indexPath.forEach((i) => openMenu(i, indexPath));
  34391. };
  34392. expose({
  34393. open,
  34394. close,
  34395. updateActiveIndex,
  34396. handleResize
  34397. });
  34398. }
  34399. const ulStyle = useMenuCssVar(props, 0);
  34400. return () => {
  34401. let slot = slots.default?.() ?? [];
  34402. const vShowMore = [];
  34403. if (props.mode === "horizontal" && menu.value) {
  34404. const originalSlot = flattedChildren(slot).filter((vnode) => {
  34405. return vnode?.shapeFlag !== 8;
  34406. });
  34407. const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value);
  34408. const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value);
  34409. if (slotMore?.length && props.ellipsis) {
  34410. slot = slotDefault;
  34411. vShowMore.push(h$1(sub_menu_default, {
  34412. ref: subMenu,
  34413. index: "sub-menu-more",
  34414. class: nsSubMenu.e("hide-arrow"),
  34415. popperOffset: props.popperOffset
  34416. }, {
  34417. title: () => h$1(ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => h$1(props.ellipsisIcon) }),
  34418. default: () => slotMore
  34419. }));
  34420. }
  34421. }
  34422. const directives = props.closeOnClickOutside ? [[ClickOutside, () => {
  34423. if (!openedMenus.value.length) return;
  34424. if (!mouseInChild.value) {
  34425. openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
  34426. openedMenus.value = [];
  34427. }
  34428. }]] : [];
  34429. const vMenu = withDirectives(h$1("ul", {
  34430. key: String(props.collapse),
  34431. role: "menubar",
  34432. ref: menu,
  34433. style: ulStyle.value,
  34434. class: {
  34435. [nsMenu.b()]: true,
  34436. [nsMenu.m(props.mode)]: true,
  34437. [nsMenu.m("collapse")]: props.collapse
  34438. }
  34439. }, [...slot, ...vShowMore]), directives);
  34440. if (props.collapseTransition && props.mode === "vertical") return h$1(menu_collapse_transition_default, () => vMenu);
  34441. return vMenu;
  34442. };
  34443. }
  34444. });
  34445. //#endregion
  34446. //#region node_modules/element-plus/es/components/menu/src/menu-item.mjs
  34447. /**
  34448. * @deprecated Removed after 3.0.0, Use `MenuItemProps` instead.
  34449. */
  34450. var menuItemProps = buildProps({
  34451. index: {
  34452. type: definePropType([String, null]),
  34453. default: null
  34454. },
  34455. route: { type: definePropType([String, Object]) },
  34456. disabled: Boolean
  34457. });
  34458. var menuItemEmits = { click: (item) => isString(item.index) && isArray$1(item.indexPath) };
  34459. //#endregion
  34460. //#region node_modules/element-plus/es/components/menu/src/menu-item-group.mjs
  34461. /**
  34462. * @deprecated Removed after 3.0.0, Use `MenuItemGroupProps` instead.
  34463. */
  34464. var menuItemGroupProps = { title: String };
  34465. //#endregion
  34466. //#region node_modules/element-plus/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs
  34467. var COMPONENT_NAME$7 = "ElMenuItem";
  34468. //#endregion
  34469. //#region node_modules/element-plus/es/components/menu/src/menu-item2.mjs
  34470. var menu_item_default = /* @__PURE__ */ defineComponent({
  34471. name: COMPONENT_NAME$7,
  34472. __name: "menu-item",
  34473. props: menuItemProps,
  34474. emits: menuItemEmits,
  34475. setup(__props, { expose: __expose, emit: __emit }) {
  34476. const props = __props;
  34477. const emit = __emit;
  34478. isPropAbsent(props.index) && debugWarn(COMPONENT_NAME$7, "Missing required prop: \"index\"");
  34479. const instance = getCurrentInstance();
  34480. const rootMenu = inject(MENU_INJECTION_KEY);
  34481. const nsMenu = useNamespace("menu");
  34482. const nsMenuItem = useNamespace("menu-item");
  34483. if (!rootMenu) throwError(COMPONENT_NAME$7, "can not inject root menu");
  34484. const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
  34485. const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
  34486. if (!subMenu) throwError(COMPONENT_NAME$7, "can not inject sub menu");
  34487. const active = computed(() => props.index === rootMenu.activeIndex);
  34488. const item = reactive({
  34489. index: props.index,
  34490. indexPath,
  34491. active
  34492. });
  34493. const handleClick = () => {
  34494. if (!props.disabled) {
  34495. rootMenu.handleMenuItemClick({
  34496. index: props.index,
  34497. indexPath: indexPath.value,
  34498. route: props.route
  34499. });
  34500. emit("click", item);
  34501. }
  34502. };
  34503. onMounted(() => {
  34504. subMenu.addSubMenu(item);
  34505. rootMenu.addMenuItem(item);
  34506. });
  34507. onBeforeUnmount(() => {
  34508. subMenu.removeSubMenu(item);
  34509. rootMenu.removeMenuItem(item);
  34510. });
  34511. __expose({
  34512. parentMenu,
  34513. rootMenu,
  34514. active,
  34515. nsMenu,
  34516. nsMenuItem,
  34517. handleClick
  34518. });
  34519. return (_ctx, _cache) => {
  34520. return openBlock(), createElementBlock("li", {
  34521. class: normalizeClass([
  34522. unref(nsMenuItem).b(),
  34523. unref(nsMenuItem).is("active", active.value),
  34524. unref(nsMenuItem).is("disabled", __props.disabled)
  34525. ]),
  34526. role: "menuitem",
  34527. tabindex: "-1",
  34528. onClick: handleClick
  34529. }, [unref(parentMenu).type.name === "ElMenu" && unref(rootMenu).props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(unref(ElTooltip), {
  34530. key: 0,
  34531. effect: unref(rootMenu).props.popperEffect,
  34532. placement: "right",
  34533. "fallback-placements": ["left"],
  34534. "popper-class": unref(rootMenu).props.popperClass,
  34535. "popper-style": unref(rootMenu).props.popperStyle,
  34536. persistent: unref(rootMenu).props.persistent,
  34537. "focus-on-target": ""
  34538. }, {
  34539. content: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
  34540. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsMenu).be("tooltip", "trigger")) }, [renderSlot(_ctx.$slots, "default")], 2)]),
  34541. _: 3
  34542. }, 8, [
  34543. "effect",
  34544. "popper-class",
  34545. "popper-style",
  34546. "persistent"
  34547. ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [renderSlot(_ctx.$slots, "default"), renderSlot(_ctx.$slots, "title")], 64))], 2);
  34548. };
  34549. }
  34550. });
  34551. //#endregion
  34552. //#region node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs
  34553. var menu_item_group_default = /* @__PURE__ */ defineComponent({
  34554. name: "ElMenuItemGroup",
  34555. __name: "menu-item-group",
  34556. props: menuItemGroupProps,
  34557. setup(__props) {
  34558. const ns = useNamespace("menu-item-group");
  34559. return (_ctx, _cache) => {
  34560. return openBlock(), createElementBlock("li", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.title), 1)], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })], 2), createBaseVNode("ul", null, [renderSlot(_ctx.$slots, "default")])], 2);
  34561. };
  34562. }
  34563. });
  34564. //#endregion
  34565. //#region node_modules/element-plus/es/components/menu/index.mjs
  34566. var ElMenu = withInstall(menu_default, {
  34567. MenuItem: menu_item_default,
  34568. MenuItemGroup: menu_item_group_default,
  34569. SubMenu: sub_menu_default
  34570. });
  34571. var ElMenuItem = withNoopInstall(menu_item_default);
  34572. var ElMenuItemGroup = withNoopInstall(menu_item_group_default);
  34573. var ElSubMenu = withNoopInstall(sub_menu_default);
  34574. //#endregion
  34575. //#region node_modules/element-plus/es/components/page-header/src/page-header.mjs
  34576. /**
  34577. * @deprecated Removed after 3.0.0, Use `PageHeaderProps` instead.
  34578. */
  34579. var pageHeaderProps = buildProps({
  34580. icon: {
  34581. type: iconPropType,
  34582. default: () => back_default
  34583. },
  34584. title: String,
  34585. content: {
  34586. type: String,
  34587. default: ""
  34588. }
  34589. });
  34590. var pageHeaderEmits = { back: () => true };
  34591. //#endregion
  34592. //#region node_modules/element-plus/es/components/page-header/src/page-header.vue_vue_type_script_setup_true_lang.mjs
  34593. var _hoisted_1$30 = ["aria-label"];
  34594. //#endregion
  34595. //#region node_modules/element-plus/es/components/page-header/index.mjs
  34596. var ElPageHeader = withInstall(/* @__PURE__ */ defineComponent({
  34597. name: "ElPageHeader",
  34598. __name: "page-header",
  34599. props: pageHeaderProps,
  34600. emits: pageHeaderEmits,
  34601. setup(__props, { emit: __emit }) {
  34602. const emit = __emit;
  34603. const { t } = useLocale();
  34604. const ns = useNamespace("page-header");
  34605. function handleClick() {
  34606. emit("back");
  34607. }
  34608. return (_ctx, _cache) => {
  34609. return openBlock(), createElementBlock("div", { class: normalizeClass([
  34610. unref(ns).b(),
  34611. unref(ns).is("contentful", !!_ctx.$slots.default),
  34612. {
  34613. [unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb,
  34614. [unref(ns).m("has-extra")]: !!_ctx.$slots.extra
  34615. }
  34616. ]) }, [
  34617. _ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
  34618. key: 0,
  34619. class: normalizeClass(unref(ns).e("breadcrumb"))
  34620. }, [renderSlot(_ctx.$slots, "breadcrumb")], 2)) : createCommentVNode("v-if", true),
  34621. createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("left")) }, [
  34622. createBaseVNode("div", {
  34623. class: normalizeClass(unref(ns).e("back")),
  34624. role: "button",
  34625. tabindex: "0",
  34626. onClick: handleClick
  34627. }, [__props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
  34628. key: 0,
  34629. "aria-label": __props.title || unref(t)("el.pageHeader.title"),
  34630. class: normalizeClass(unref(ns).e("icon"))
  34631. }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  34632. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  34633. _: 1
  34634. })) : createCommentVNode("v-if", true)])], 10, _hoisted_1$30)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title || unref(t)("el.pageHeader.title")), 1)])], 2)], 2),
  34635. createVNode(unref(ElDivider), { direction: "vertical" }),
  34636. createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 2)
  34637. ], 2), _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  34638. key: 0,
  34639. class: normalizeClass(unref(ns).e("extra"))
  34640. }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)], 2),
  34641. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  34642. key: 1,
  34643. class: normalizeClass(unref(ns).e("main"))
  34644. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  34645. ], 2);
  34646. };
  34647. }
  34648. }));
  34649. //#endregion
  34650. //#region node_modules/element-plus/es/components/pagination/src/constants.mjs
  34651. var elPaginationKey = Symbol("elPaginationKey");
  34652. //#endregion
  34653. //#region node_modules/element-plus/es/components/pagination/src/components/prev.mjs
  34654. var paginationPrevProps = buildProps({
  34655. disabled: Boolean,
  34656. currentPage: {
  34657. type: Number,
  34658. default: 1
  34659. },
  34660. prevText: { type: String },
  34661. prevIcon: { type: iconPropType }
  34662. });
  34663. var paginationPrevEmits = { click: (evt) => evt instanceof MouseEvent };
  34664. //#endregion
  34665. //#region node_modules/element-plus/es/components/pagination/src/components/prev.vue_vue_type_script_setup_true_lang.mjs
  34666. var _hoisted_1$29 = [
  34667. "disabled",
  34668. "aria-label",
  34669. "aria-disabled"
  34670. ];
  34671. var _hoisted_2$18 = { key: 0 };
  34672. //#endregion
  34673. //#region node_modules/element-plus/es/components/pagination/src/components/prev2.mjs
  34674. var prev_default = /* @__PURE__ */ defineComponent({
  34675. name: "ElPaginationPrev",
  34676. __name: "prev",
  34677. props: paginationPrevProps,
  34678. emits: paginationPrevEmits,
  34679. setup(__props) {
  34680. const props = __props;
  34681. const { t } = useLocale();
  34682. const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
  34683. return (_ctx, _cache) => {
  34684. return openBlock(), createElementBlock("button", {
  34685. type: "button",
  34686. class: "btn-prev",
  34687. disabled: internalDisabled.value,
  34688. "aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
  34689. "aria-disabled": internalDisabled.value,
  34690. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  34691. }, [_ctx.prevText ? (openBlock(), createElementBlock("span", _hoisted_2$18, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  34692. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))]),
  34693. _: 1
  34694. }))], 8, _hoisted_1$29);
  34695. };
  34696. }
  34697. });
  34698. //#endregion
  34699. //#region node_modules/element-plus/es/components/pagination/src/components/next.mjs
  34700. var paginationNextProps = buildProps({
  34701. disabled: Boolean,
  34702. currentPage: {
  34703. type: Number,
  34704. default: 1
  34705. },
  34706. pageCount: {
  34707. type: Number,
  34708. default: 50
  34709. },
  34710. nextText: { type: String },
  34711. nextIcon: { type: iconPropType }
  34712. });
  34713. //#endregion
  34714. //#region node_modules/element-plus/es/components/pagination/src/components/next.vue_vue_type_script_setup_true_lang.mjs
  34715. var _hoisted_1$28 = [
  34716. "disabled",
  34717. "aria-label",
  34718. "aria-disabled"
  34719. ];
  34720. var _hoisted_2$17 = { key: 0 };
  34721. //#endregion
  34722. //#region node_modules/element-plus/es/components/pagination/src/components/next2.mjs
  34723. var next_default = /* @__PURE__ */ defineComponent({
  34724. name: "ElPaginationNext",
  34725. __name: "next",
  34726. props: paginationNextProps,
  34727. emits: ["click"],
  34728. setup(__props) {
  34729. const props = __props;
  34730. const { t } = useLocale();
  34731. const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
  34732. return (_ctx, _cache) => {
  34733. return openBlock(), createElementBlock("button", {
  34734. type: "button",
  34735. class: "btn-next",
  34736. disabled: internalDisabled.value,
  34737. "aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
  34738. "aria-disabled": internalDisabled.value,
  34739. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  34740. }, [_ctx.nextText ? (openBlock(), createElementBlock("span", _hoisted_2$17, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  34741. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))]),
  34742. _: 1
  34743. }))], 8, _hoisted_1$28);
  34744. };
  34745. }
  34746. });
  34747. //#endregion
  34748. //#region node_modules/element-plus/es/components/pagination/src/usePagination.mjs
  34749. var usePagination = () => inject(elPaginationKey, {});
  34750. //#endregion
  34751. //#region node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs
  34752. var sizes_default = /* @__PURE__ */ defineComponent({
  34753. name: "ElPaginationSizes",
  34754. __name: "sizes",
  34755. props: buildProps({
  34756. pageSize: {
  34757. type: Number,
  34758. required: true
  34759. },
  34760. pageSizes: {
  34761. type: definePropType(Array),
  34762. default: () => mutable([
  34763. 10,
  34764. 20,
  34765. 30,
  34766. 40,
  34767. 50,
  34768. 100
  34769. ])
  34770. },
  34771. popperClass: { type: String },
  34772. popperStyle: { type: definePropType([String, Object]) },
  34773. disabled: Boolean,
  34774. teleported: Boolean,
  34775. size: {
  34776. type: String,
  34777. values: componentSizes
  34778. },
  34779. appendSizeTo: String
  34780. }),
  34781. emits: ["page-size-change"],
  34782. setup(__props, { emit: __emit }) {
  34783. const props = __props;
  34784. const emit = __emit;
  34785. const { t } = useLocale();
  34786. const ns = useNamespace("pagination");
  34787. const pagination = usePagination();
  34788. const innerPageSize = ref(props.pageSize);
  34789. watch(() => props.pageSizes, (newVal, oldVal) => {
  34790. if (isEqual$1(newVal, oldVal)) return;
  34791. if (isArray$1(newVal)) emit("page-size-change", newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0]);
  34792. });
  34793. watch(() => props.pageSize, (newVal) => {
  34794. innerPageSize.value = newVal;
  34795. });
  34796. const innerPageSizes = computed(() => props.pageSizes);
  34797. function handleChange(val) {
  34798. if (val !== innerPageSize.value) {
  34799. innerPageSize.value = val;
  34800. pagination.handleSizeChange?.(Number(val));
  34801. }
  34802. }
  34803. return (_ctx, _cache) => {
  34804. return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("sizes")) }, [createVNode(unref(ElSelect), {
  34805. "model-value": innerPageSize.value,
  34806. disabled: _ctx.disabled,
  34807. "popper-class": _ctx.popperClass,
  34808. "popper-style": _ctx.popperStyle,
  34809. size: _ctx.size,
  34810. teleported: _ctx.teleported,
  34811. "validate-event": false,
  34812. "append-to": _ctx.appendSizeTo,
  34813. onChange: handleChange
  34814. }, {
  34815. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(innerPageSizes.value, (item) => {
  34816. return openBlock(), createBlock(unref(ElOption), {
  34817. key: item,
  34818. value: item,
  34819. label: item + unref(t)("el.pagination.pagesize")
  34820. }, null, 8, ["value", "label"]);
  34821. }), 128))]),
  34822. _: 1
  34823. }, 8, [
  34824. "model-value",
  34825. "disabled",
  34826. "popper-class",
  34827. "popper-style",
  34828. "size",
  34829. "teleported",
  34830. "append-to"
  34831. ])], 2);
  34832. };
  34833. }
  34834. });
  34835. //#endregion
  34836. //#region node_modules/element-plus/es/components/pagination/src/components/jumper.mjs
  34837. var paginationJumperProps = buildProps({ size: {
  34838. type: String,
  34839. values: componentSizes
  34840. } });
  34841. //#endregion
  34842. //#region node_modules/element-plus/es/components/pagination/src/components/jumper.vue_vue_type_script_setup_true_lang.mjs
  34843. var _hoisted_1$27 = ["disabled"];
  34844. //#endregion
  34845. //#region node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs
  34846. var jumper_default = /* @__PURE__ */ defineComponent({
  34847. name: "ElPaginationJumper",
  34848. __name: "jumper",
  34849. props: paginationJumperProps,
  34850. setup(__props) {
  34851. const { t } = useLocale();
  34852. const ns = useNamespace("pagination");
  34853. const { pageCount, disabled, currentPage, changeEvent } = usePagination();
  34854. const userInput = ref();
  34855. const innerValue = computed(() => userInput.value ?? currentPage?.value);
  34856. function handleInput(val) {
  34857. userInput.value = val ? +val : "";
  34858. }
  34859. function handleChange(val) {
  34860. val = Math.trunc(+val);
  34861. changeEvent?.(val);
  34862. userInput.value = void 0;
  34863. }
  34864. return (_ctx, _cache) => {
  34865. return openBlock(), createElementBlock("span", {
  34866. class: normalizeClass(unref(ns).e("jump")),
  34867. disabled: unref(disabled)
  34868. }, [
  34869. createBaseVNode("span", { class: normalizeClass([unref(ns).e("goto")]) }, toDisplayString(unref(t)("el.pagination.goto")), 3),
  34870. createVNode(unref(ElInput), {
  34871. size: _ctx.size,
  34872. class: normalizeClass([unref(ns).e("editor"), unref(ns).is("in-pagination")]),
  34873. min: 1,
  34874. max: unref(pageCount),
  34875. disabled: unref(disabled),
  34876. "model-value": innerValue.value,
  34877. "validate-event": false,
  34878. "aria-label": unref(t)("el.pagination.page"),
  34879. type: "number",
  34880. "onUpdate:modelValue": handleInput,
  34881. onChange: handleChange
  34882. }, null, 8, [
  34883. "size",
  34884. "class",
  34885. "max",
  34886. "disabled",
  34887. "model-value",
  34888. "aria-label"
  34889. ]),
  34890. createBaseVNode("span", { class: normalizeClass([unref(ns).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3)
  34891. ], 10, _hoisted_1$27);
  34892. };
  34893. }
  34894. });
  34895. //#endregion
  34896. //#region node_modules/element-plus/es/components/pagination/src/components/total.mjs
  34897. var paginationTotalProps = buildProps({ total: {
  34898. type: Number,
  34899. default: 1e3
  34900. } });
  34901. //#endregion
  34902. //#region node_modules/element-plus/es/components/pagination/src/components/total.vue_vue_type_script_setup_true_lang.mjs
  34903. var _hoisted_1$26 = ["disabled"];
  34904. //#endregion
  34905. //#region node_modules/element-plus/es/components/pagination/src/components/total2.mjs
  34906. var total_default = /* @__PURE__ */ defineComponent({
  34907. name: "ElPaginationTotal",
  34908. __name: "total",
  34909. props: paginationTotalProps,
  34910. setup(__props) {
  34911. const { t } = useLocale();
  34912. const ns = useNamespace("pagination");
  34913. const { disabled } = usePagination();
  34914. return (_ctx, _cache) => {
  34915. return openBlock(), createElementBlock("span", {
  34916. class: normalizeClass(unref(ns).e("total")),
  34917. disabled: unref(disabled)
  34918. }, toDisplayString(unref(t)("el.pagination.total", { total: _ctx.total })), 11, _hoisted_1$26);
  34919. };
  34920. }
  34921. });
  34922. //#endregion
  34923. //#region node_modules/element-plus/es/components/pagination/src/components/pager.mjs
  34924. var paginationPagerProps = buildProps({
  34925. currentPage: {
  34926. type: Number,
  34927. default: 1
  34928. },
  34929. pageCount: {
  34930. type: Number,
  34931. required: true
  34932. },
  34933. pagerCount: {
  34934. type: Number,
  34935. default: 7
  34936. },
  34937. disabled: Boolean
  34938. });
  34939. //#endregion
  34940. //#region node_modules/element-plus/es/components/pagination/src/components/pager.vue_vue_type_script_setup_true_lang.mjs
  34941. var _hoisted_1$25 = [
  34942. "aria-current",
  34943. "aria-label",
  34944. "tabindex"
  34945. ];
  34946. var _hoisted_2$16 = ["tabindex", "aria-label"];
  34947. var _hoisted_3$7 = [
  34948. "aria-current",
  34949. "aria-label",
  34950. "tabindex"
  34951. ];
  34952. var _hoisted_4$5 = ["tabindex", "aria-label"];
  34953. var _hoisted_5$3 = [
  34954. "aria-current",
  34955. "aria-label",
  34956. "tabindex"
  34957. ];
  34958. //#endregion
  34959. //#region node_modules/element-plus/es/components/pagination/src/components/pager2.mjs
  34960. var pager_default = /* @__PURE__ */ defineComponent({
  34961. name: "ElPaginationPager",
  34962. __name: "pager",
  34963. props: paginationPagerProps,
  34964. emits: [CHANGE_EVENT],
  34965. setup(__props, { emit: __emit }) {
  34966. const props = __props;
  34967. const emit = __emit;
  34968. const nsPager = useNamespace("pager");
  34969. const nsIcon = useNamespace("icon");
  34970. const { t } = useLocale();
  34971. const showPrevMore = ref(false);
  34972. const showNextMore = ref(false);
  34973. const quickPrevHover = ref(false);
  34974. const quickNextHover = ref(false);
  34975. const quickPrevFocus = ref(false);
  34976. const quickNextFocus = ref(false);
  34977. const pagers = computed(() => {
  34978. const pagerCount = props.pagerCount;
  34979. const halfPagerCount = (pagerCount - 1) / 2;
  34980. const currentPage = Number(props.currentPage);
  34981. const pageCount = Number(props.pageCount);
  34982. let showPrevMore = false;
  34983. let showNextMore = false;
  34984. if (pageCount > pagerCount) {
  34985. if (currentPage > pagerCount - halfPagerCount) showPrevMore = true;
  34986. if (currentPage < pageCount - halfPagerCount) showNextMore = true;
  34987. }
  34988. const array = [];
  34989. if (showPrevMore && !showNextMore) {
  34990. const startPage = pageCount - (pagerCount - 2);
  34991. for (let i = startPage; i < pageCount; i++) array.push(i);
  34992. } else if (!showPrevMore && showNextMore) for (let i = 2; i < pagerCount; i++) array.push(i);
  34993. else if (showPrevMore && showNextMore) {
  34994. const offset = Math.floor(pagerCount / 2) - 1;
  34995. for (let i = currentPage - offset; i <= currentPage + offset; i++) array.push(i);
  34996. } else for (let i = 2; i < pageCount; i++) array.push(i);
  34997. return array;
  34998. });
  34999. const prevMoreKls = computed(() => [
  35000. "more",
  35001. "btn-quickprev",
  35002. nsIcon.b(),
  35003. nsPager.is("disabled", props.disabled)
  35004. ]);
  35005. const nextMoreKls = computed(() => [
  35006. "more",
  35007. "btn-quicknext",
  35008. nsIcon.b(),
  35009. nsPager.is("disabled", props.disabled)
  35010. ]);
  35011. const tabindex = computed(() => props.disabled ? -1 : 0);
  35012. watch(() => [
  35013. props.pageCount,
  35014. props.pagerCount,
  35015. props.currentPage
  35016. ], ([pageCount, pagerCount, currentPage]) => {
  35017. const halfPagerCount = (pagerCount - 1) / 2;
  35018. let showPrev = false;
  35019. let showNext = false;
  35020. if (pageCount > pagerCount) {
  35021. showPrev = currentPage > pagerCount - halfPagerCount;
  35022. showNext = currentPage < pageCount - halfPagerCount;
  35023. }
  35024. quickPrevHover.value &&= showPrev;
  35025. quickNextHover.value &&= showNext;
  35026. showPrevMore.value = showPrev;
  35027. showNextMore.value = showNext;
  35028. }, { immediate: true });
  35029. function onMouseEnter(forward = false) {
  35030. if (props.disabled) return;
  35031. if (forward) quickPrevHover.value = true;
  35032. else quickNextHover.value = true;
  35033. }
  35034. function onFocus(forward = false) {
  35035. if (forward) quickPrevFocus.value = true;
  35036. else quickNextFocus.value = true;
  35037. }
  35038. function onEnter(e) {
  35039. const target = e.target;
  35040. if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
  35041. const newPage = Number(target.textContent);
  35042. if (newPage !== props.currentPage) emit(CHANGE_EVENT, newPage);
  35043. } else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) onPagerClick(e);
  35044. }
  35045. function onPagerClick(event) {
  35046. const target = event.target;
  35047. if (target.tagName.toLowerCase() === "ul" || props.disabled) return;
  35048. let newPage = Number(target.textContent);
  35049. const pageCount = props.pageCount;
  35050. const currentPage = props.currentPage;
  35051. const pagerCountOffset = props.pagerCount - 2;
  35052. if (target.className.includes("more")) {
  35053. if (target.className.includes("quickprev")) newPage = currentPage - pagerCountOffset;
  35054. else if (target.className.includes("quicknext")) newPage = currentPage + pagerCountOffset;
  35055. }
  35056. if (!Number.isNaN(+newPage)) {
  35057. if (newPage < 1) newPage = 1;
  35058. if (newPage > pageCount) newPage = pageCount;
  35059. }
  35060. if (newPage !== currentPage) emit(CHANGE_EVENT, newPage);
  35061. }
  35062. return (_ctx, _cache) => {
  35063. return openBlock(), createElementBlock("ul", {
  35064. class: normalizeClass(unref(nsPager).b()),
  35065. onClick: onPagerClick,
  35066. onKeyup: withKeys(onEnter, ["enter"])
  35067. }, [
  35068. _ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
  35069. key: 0,
  35070. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === 1), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  35071. "aria-current": _ctx.currentPage === 1,
  35072. "aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
  35073. tabindex: tabindex.value
  35074. }, " 1 ", 10, _hoisted_1$25)) : createCommentVNode("v-if", true),
  35075. showPrevMore.value ? (openBlock(), createElementBlock("li", {
  35076. key: 1,
  35077. class: normalizeClass(prevMoreKls.value),
  35078. tabindex: tabindex.value,
  35079. "aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
  35080. onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)),
  35081. onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false),
  35082. onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)),
  35083. onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false)
  35084. }, [(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_left_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_2$16)) : createCommentVNode("v-if", true),
  35085. (openBlock(true), createElementBlock(Fragment, null, renderList(pagers.value, (pager) => {
  35086. return openBlock(), createElementBlock("li", {
  35087. key: pager,
  35088. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === pager), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  35089. "aria-current": _ctx.currentPage === pager,
  35090. "aria-label": unref(t)("el.pagination.currentPage", { pager }),
  35091. tabindex: tabindex.value
  35092. }, toDisplayString(pager), 11, _hoisted_3$7);
  35093. }), 128)),
  35094. showNextMore.value ? (openBlock(), createElementBlock("li", {
  35095. key: 2,
  35096. class: normalizeClass(nextMoreKls.value),
  35097. tabindex: tabindex.value,
  35098. "aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
  35099. onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()),
  35100. onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false),
  35101. onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()),
  35102. onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
  35103. }, [(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_4$5)) : createCommentVNode("v-if", true),
  35104. _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
  35105. key: 3,
  35106. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  35107. "aria-current": _ctx.currentPage === _ctx.pageCount,
  35108. "aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
  35109. tabindex: tabindex.value
  35110. }, toDisplayString(_ctx.pageCount), 11, _hoisted_5$3)) : createCommentVNode("v-if", true)
  35111. ], 34);
  35112. };
  35113. }
  35114. });
  35115. //#endregion
  35116. //#region node_modules/element-plus/es/components/pagination/src/pagination.mjs
  35117. /**
  35118. * It it user's responsibility to guarantee that the value of props.total... is number
  35119. * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)
  35120. * Otherwise we can reasonable infer that the corresponding field is absent
  35121. */
  35122. var isAbsent = (v) => typeof v !== "number";
  35123. var paginationProps = buildProps({
  35124. pageSize: Number,
  35125. defaultPageSize: Number,
  35126. total: Number,
  35127. pageCount: Number,
  35128. pagerCount: {
  35129. type: Number,
  35130. validator: (value) => {
  35131. return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
  35132. },
  35133. default: 7
  35134. },
  35135. currentPage: Number,
  35136. defaultCurrentPage: Number,
  35137. layout: {
  35138. type: String,
  35139. default: [
  35140. "prev",
  35141. "pager",
  35142. "next",
  35143. "jumper",
  35144. "->",
  35145. "total"
  35146. ].join(", ")
  35147. },
  35148. pageSizes: {
  35149. type: definePropType(Array),
  35150. default: () => mutable([
  35151. 10,
  35152. 20,
  35153. 30,
  35154. 40,
  35155. 50,
  35156. 100
  35157. ])
  35158. },
  35159. popperClass: {
  35160. type: String,
  35161. default: ""
  35162. },
  35163. popperStyle: { type: definePropType([String, Object]) },
  35164. prevText: {
  35165. type: String,
  35166. default: ""
  35167. },
  35168. prevIcon: {
  35169. type: iconPropType,
  35170. default: () => arrow_left_default
  35171. },
  35172. nextText: {
  35173. type: String,
  35174. default: ""
  35175. },
  35176. nextIcon: {
  35177. type: iconPropType,
  35178. default: () => arrow_right_default
  35179. },
  35180. teleported: {
  35181. type: Boolean,
  35182. default: true
  35183. },
  35184. small: Boolean,
  35185. size: useSizeProp,
  35186. background: Boolean,
  35187. disabled: Boolean,
  35188. hideOnSinglePage: Boolean,
  35189. appendSizeTo: String
  35190. });
  35191. var paginationEmits = {
  35192. "update:current-page": (val) => isNumber(val),
  35193. "update:page-size": (val) => isNumber(val),
  35194. "size-change": (val) => isNumber(val),
  35195. change: (currentPage, pageSize) => isNumber(currentPage) && isNumber(pageSize),
  35196. "current-change": (val) => isNumber(val),
  35197. "prev-click": (val) => isNumber(val),
  35198. "next-click": (val) => isNumber(val)
  35199. };
  35200. var componentName = "ElPagination";
  35201. //#endregion
  35202. //#region node_modules/element-plus/es/components/pagination/index.mjs
  35203. var ElPagination = withInstall(defineComponent({
  35204. name: componentName,
  35205. props: paginationProps,
  35206. emits: paginationEmits,
  35207. setup(props, { emit, slots }) {
  35208. const { t } = useLocale();
  35209. const ns = useNamespace("pagination");
  35210. const vnodeProps = getCurrentInstance().vnode.props || {};
  35211. const _globalSize = useGlobalSize();
  35212. const _size = computed(() => props.small ? "small" : props.size ?? _globalSize.value);
  35213. useDeprecated({
  35214. from: "small",
  35215. replacement: "size",
  35216. version: "3.0.0",
  35217. scope: "el-pagination",
  35218. ref: "https://element-plus.org/zh-CN/component/pagination.html"
  35219. }, computed(() => !!props.small));
  35220. const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
  35221. const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
  35222. const assertValidUsage = computed(() => {
  35223. if (isAbsent(props.total) && isAbsent(props.pageCount)) return false;
  35224. if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false;
  35225. if (props.layout.includes("sizes")) {
  35226. if (!isAbsent(props.pageCount)) {
  35227. if (!hasPageSizeListener) return false;
  35228. } else if (!isAbsent(props.total)) {
  35229. if (!isAbsent(props.pageSize)) {
  35230. if (!hasPageSizeListener) return false;
  35231. }
  35232. }
  35233. }
  35234. return true;
  35235. });
  35236. const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
  35237. const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
  35238. const pageSizeBridge = computed({
  35239. get() {
  35240. return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
  35241. },
  35242. set(v) {
  35243. if (isAbsent(props.pageSize)) innerPageSize.value = v;
  35244. if (hasPageSizeListener) {
  35245. emit("update:page-size", v);
  35246. emit("size-change", v);
  35247. }
  35248. }
  35249. });
  35250. const pageCountBridge = computed(() => {
  35251. let pageCount = 0;
  35252. if (!isAbsent(props.pageCount)) pageCount = props.pageCount;
  35253. else if (!isAbsent(props.total)) pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
  35254. return pageCount;
  35255. });
  35256. const currentPageBridge = computed({
  35257. get() {
  35258. return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
  35259. },
  35260. set(v) {
  35261. let newCurrentPage = v;
  35262. if (v < 1) newCurrentPage = 1;
  35263. else if (v > pageCountBridge.value) newCurrentPage = pageCountBridge.value;
  35264. if (isAbsent(props.currentPage)) innerCurrentPage.value = newCurrentPage;
  35265. if (hasCurrentPageListener) {
  35266. emit("update:current-page", newCurrentPage);
  35267. emit("current-change", newCurrentPage);
  35268. }
  35269. }
  35270. });
  35271. watch(pageCountBridge, (val) => {
  35272. if (currentPageBridge.value > val) currentPageBridge.value = val;
  35273. });
  35274. watch([currentPageBridge, pageSizeBridge], (value) => {
  35275. emit(CHANGE_EVENT, ...value);
  35276. }, { flush: "post" });
  35277. function handleCurrentChange(val) {
  35278. currentPageBridge.value = val;
  35279. }
  35280. function handleSizeChange(val) {
  35281. pageSizeBridge.value = val;
  35282. const newPageCount = pageCountBridge.value;
  35283. if (currentPageBridge.value > newPageCount) currentPageBridge.value = newPageCount;
  35284. }
  35285. function prev() {
  35286. if (props.disabled) return;
  35287. currentPageBridge.value -= 1;
  35288. emit("prev-click", currentPageBridge.value);
  35289. }
  35290. function next() {
  35291. if (props.disabled) return;
  35292. currentPageBridge.value += 1;
  35293. emit("next-click", currentPageBridge.value);
  35294. }
  35295. function addClass(element, cls) {
  35296. if (element) {
  35297. if (!element.props) element.props = {};
  35298. element.props.class = [element.props.class, cls].join(" ");
  35299. }
  35300. }
  35301. provide(elPaginationKey, {
  35302. pageCount: pageCountBridge,
  35303. disabled: computed(() => props.disabled),
  35304. currentPage: currentPageBridge,
  35305. changeEvent: handleCurrentChange,
  35306. handleSizeChange
  35307. });
  35308. return () => {
  35309. if (!assertValidUsage.value) {
  35310. debugWarn(componentName, t("el.pagination.deprecationWarning"));
  35311. return null;
  35312. }
  35313. if (!props.layout) return null;
  35314. if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null;
  35315. const rootChildren = [];
  35316. const rightWrapperChildren = [];
  35317. const rightWrapperRoot = h$1("div", { class: ns.e("rightwrapper") }, rightWrapperChildren);
  35318. const TEMPLATE_MAP = {
  35319. prev: h$1(prev_default, {
  35320. disabled: props.disabled,
  35321. currentPage: currentPageBridge.value,
  35322. prevText: props.prevText,
  35323. prevIcon: props.prevIcon,
  35324. onClick: prev
  35325. }),
  35326. jumper: h$1(jumper_default, { size: _size.value }),
  35327. pager: h$1(pager_default, {
  35328. currentPage: currentPageBridge.value,
  35329. pageCount: pageCountBridge.value,
  35330. pagerCount: props.pagerCount,
  35331. onChange: handleCurrentChange,
  35332. disabled: props.disabled
  35333. }),
  35334. next: h$1(next_default, {
  35335. disabled: props.disabled,
  35336. currentPage: currentPageBridge.value,
  35337. pageCount: pageCountBridge.value,
  35338. nextText: props.nextText,
  35339. nextIcon: props.nextIcon,
  35340. onClick: next
  35341. }),
  35342. sizes: h$1(sizes_default, {
  35343. pageSize: pageSizeBridge.value,
  35344. pageSizes: props.pageSizes,
  35345. popperClass: props.popperClass,
  35346. popperStyle: props.popperStyle,
  35347. disabled: props.disabled,
  35348. teleported: props.teleported,
  35349. size: _size.value,
  35350. appendSizeTo: props.appendSizeTo
  35351. }),
  35352. slot: slots?.default?.() ?? null,
  35353. total: h$1(total_default, { total: isAbsent(props.total) ? 0 : props.total })
  35354. };
  35355. const components = props.layout.split(",").map((item) => item.trim());
  35356. let haveRightWrapper = false;
  35357. components.forEach((c) => {
  35358. if (c === "->") {
  35359. haveRightWrapper = true;
  35360. return;
  35361. }
  35362. if (!haveRightWrapper) rootChildren.push(TEMPLATE_MAP[c]);
  35363. else rightWrapperChildren.push(TEMPLATE_MAP[c]);
  35364. });
  35365. addClass(rootChildren[0], ns.is("first"));
  35366. addClass(rootChildren[rootChildren.length - 1], ns.is("last"));
  35367. if (haveRightWrapper && rightWrapperChildren.length > 0) {
  35368. addClass(rightWrapperChildren[0], ns.is("first"));
  35369. addClass(rightWrapperChildren[rightWrapperChildren.length - 1], ns.is("last"));
  35370. rootChildren.push(rightWrapperRoot);
  35371. }
  35372. return h$1("div", { class: [
  35373. ns.b(),
  35374. ns.is("background", props.background),
  35375. ns.m(_size.value)
  35376. ] }, rootChildren);
  35377. };
  35378. }
  35379. }));
  35380. //#endregion
  35381. //#region node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
  35382. /**
  35383. * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
  35384. */
  35385. var popconfirmProps = buildProps({
  35386. title: String,
  35387. confirmButtonText: String,
  35388. cancelButtonText: String,
  35389. confirmButtonType: {
  35390. type: String,
  35391. values: buttonTypes,
  35392. default: "primary"
  35393. },
  35394. cancelButtonType: {
  35395. type: String,
  35396. values: buttonTypes,
  35397. default: "text"
  35398. },
  35399. icon: {
  35400. type: iconPropType,
  35401. default: () => question_filled_default
  35402. },
  35403. iconColor: {
  35404. type: String,
  35405. default: "#f90"
  35406. },
  35407. hideIcon: Boolean,
  35408. hideAfter: {
  35409. type: Number,
  35410. default: 200
  35411. },
  35412. effect: {
  35413. ...useTooltipContentProps.effect,
  35414. default: "light"
  35415. },
  35416. teleported: useTooltipContentProps.teleported,
  35417. persistent: useTooltipContentProps.persistent,
  35418. width: {
  35419. type: [String, Number],
  35420. default: 150
  35421. },
  35422. virtualTriggering: useTooltipTriggerProps.virtualTriggering,
  35423. virtualRef: useTooltipTriggerProps.virtualRef
  35424. });
  35425. var popconfirmEmits = {
  35426. confirm: (e) => e instanceof MouseEvent,
  35427. cancel: (e) => e instanceof MouseEvent
  35428. };
  35429. //#endregion
  35430. //#region node_modules/element-plus/es/components/popconfirm/index.mjs
  35431. var ElPopconfirm = withInstall(/* @__PURE__ */ defineComponent({
  35432. name: "ElPopconfirm",
  35433. __name: "popconfirm",
  35434. props: popconfirmProps,
  35435. emits: popconfirmEmits,
  35436. setup(__props, { expose: __expose, emit: __emit }) {
  35437. const props = __props;
  35438. const emit = __emit;
  35439. const { t } = useLocale();
  35440. const ns = useNamespace("popconfirm");
  35441. const tooltipRef = ref();
  35442. const rootRef = ref();
  35443. const popperRef = computed(() => {
  35444. return unref(tooltipRef)?.popperRef;
  35445. });
  35446. const showPopper = () => {
  35447. rootRef.value?.focus?.();
  35448. };
  35449. const hidePopper = () => {
  35450. tooltipRef.value?.onClose?.();
  35451. };
  35452. const style = computed(() => {
  35453. return { width: addUnit(props.width) };
  35454. });
  35455. const confirm = (e) => {
  35456. emit("confirm", e);
  35457. hidePopper();
  35458. };
  35459. const cancel = (e) => {
  35460. emit("cancel", e);
  35461. hidePopper();
  35462. };
  35463. const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
  35464. const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
  35465. __expose({
  35466. popperRef,
  35467. hide: hidePopper
  35468. });
  35469. return (_ctx, _cache) => {
  35470. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  35471. ref_key: "tooltipRef",
  35472. ref: tooltipRef,
  35473. trigger: "click",
  35474. effect: __props.effect
  35475. }, _ctx.$attrs, {
  35476. "virtual-triggering": __props.virtualTriggering,
  35477. "virtual-ref": __props.virtualRef,
  35478. "popper-class": `${unref(ns).namespace.value}-popover`,
  35479. "popper-style": style.value,
  35480. teleported: __props.teleported,
  35481. "fallback-placements": [
  35482. "bottom",
  35483. "top",
  35484. "right",
  35485. "left"
  35486. ],
  35487. "hide-after": __props.hideAfter,
  35488. persistent: __props.persistent,
  35489. loop: "",
  35490. onShow: showPopper
  35491. }), {
  35492. content: withCtx(() => [createBaseVNode("div", {
  35493. ref_key: "rootRef",
  35494. ref: rootRef,
  35495. tabindex: "-1",
  35496. class: normalizeClass(unref(ns).b())
  35497. }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [!__props.hideIcon && __props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  35498. key: 0,
  35499. class: normalizeClass(unref(ns).e("icon")),
  35500. style: normalizeStyle({ color: __props.iconColor })
  35501. }, {
  35502. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  35503. _: 1
  35504. }, 8, ["class", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.title), 1)], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [renderSlot(_ctx.$slots, "actions", {
  35505. confirm,
  35506. cancel
  35507. }, () => [createVNode(unref(ElButton), {
  35508. size: "small",
  35509. type: __props.cancelButtonType === "text" ? "" : __props.cancelButtonType,
  35510. text: __props.cancelButtonType === "text",
  35511. onClick: cancel
  35512. }, {
  35513. default: withCtx(() => [createTextVNode(toDisplayString(finalCancelButtonText.value), 1)]),
  35514. _: 1
  35515. }, 8, ["type", "text"]), createVNode(unref(ElButton), {
  35516. size: "small",
  35517. type: __props.confirmButtonType === "text" ? "" : __props.confirmButtonType,
  35518. text: __props.confirmButtonType === "text",
  35519. onClick: confirm
  35520. }, {
  35521. default: withCtx(() => [createTextVNode(toDisplayString(finalConfirmButtonText.value), 1)]),
  35522. _: 1
  35523. }, 8, ["type", "text"])])], 2)], 2)]),
  35524. default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
  35525. _: 3
  35526. }, 16, [
  35527. "effect",
  35528. "virtual-triggering",
  35529. "virtual-ref",
  35530. "popper-class",
  35531. "popper-style",
  35532. "teleported",
  35533. "hide-after",
  35534. "persistent"
  35535. ]);
  35536. };
  35537. }
  35538. }));
  35539. //#endregion
  35540. //#region node_modules/element-plus/es/components/progress/src/progress.mjs
  35541. /**
  35542. * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
  35543. */
  35544. var progressProps = buildProps({
  35545. type: {
  35546. type: String,
  35547. default: "line",
  35548. values: [
  35549. "line",
  35550. "circle",
  35551. "dashboard"
  35552. ]
  35553. },
  35554. percentage: {
  35555. type: Number,
  35556. default: 0,
  35557. validator: (val) => val >= 0 && val <= 100
  35558. },
  35559. status: {
  35560. type: String,
  35561. default: "",
  35562. values: [
  35563. "",
  35564. "success",
  35565. "exception",
  35566. "warning"
  35567. ]
  35568. },
  35569. indeterminate: Boolean,
  35570. duration: {
  35571. type: Number,
  35572. default: 3
  35573. },
  35574. strokeWidth: {
  35575. type: Number,
  35576. default: 6
  35577. },
  35578. strokeLinecap: {
  35579. type: definePropType(String),
  35580. default: "round"
  35581. },
  35582. textInside: Boolean,
  35583. width: {
  35584. type: Number,
  35585. default: 126
  35586. },
  35587. showText: {
  35588. type: Boolean,
  35589. default: true
  35590. },
  35591. color: {
  35592. type: definePropType([
  35593. String,
  35594. Array,
  35595. Function
  35596. ]),
  35597. default: ""
  35598. },
  35599. striped: Boolean,
  35600. stripedFlow: Boolean,
  35601. format: {
  35602. type: definePropType(Function),
  35603. default: (percentage) => `${percentage}%`
  35604. }
  35605. });
  35606. //#endregion
  35607. //#region node_modules/element-plus/es/components/progress/src/progress.vue_vue_type_script_setup_true_lang.mjs
  35608. var _hoisted_1$24 = ["aria-valuenow"];
  35609. var _hoisted_2$15 = { viewBox: "0 0 100 100" };
  35610. var _hoisted_3$6 = [
  35611. "d",
  35612. "stroke",
  35613. "stroke-linecap",
  35614. "stroke-width"
  35615. ];
  35616. var _hoisted_4$4 = [
  35617. "d",
  35618. "stroke",
  35619. "opacity",
  35620. "stroke-linecap",
  35621. "stroke-width"
  35622. ];
  35623. var _hoisted_5$2 = { key: 0 };
  35624. //#endregion
  35625. //#region node_modules/element-plus/es/components/progress/index.mjs
  35626. var ElProgress = withInstall(/* @__PURE__ */ defineComponent({
  35627. name: "ElProgress",
  35628. __name: "progress",
  35629. props: progressProps,
  35630. setup(__props) {
  35631. const STATUS_COLOR_MAP = {
  35632. success: "#13ce66",
  35633. exception: "#ff4949",
  35634. warning: "#e6a23c",
  35635. default: "#20a0ff"
  35636. };
  35637. const props = __props;
  35638. const ns = useNamespace("progress");
  35639. const barStyle = computed(() => {
  35640. const barStyle = {
  35641. width: `${props.percentage}%`,
  35642. animationDuration: `${props.duration}s`
  35643. };
  35644. const color = getCurrentColor(props.percentage);
  35645. if (color.includes("gradient")) barStyle.background = color;
  35646. else barStyle.backgroundColor = color;
  35647. return barStyle;
  35648. });
  35649. const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
  35650. const radius = computed(() => {
  35651. if (["circle", "dashboard"].includes(props.type)) return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
  35652. return 0;
  35653. });
  35654. const trackPath = computed(() => {
  35655. const r = radius.value;
  35656. const isDashboard = props.type === "dashboard";
  35657. return `
  35658. M 50 50
  35659. m 0 ${isDashboard ? "" : "-"}${r}
  35660. a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
  35661. a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
  35662. `;
  35663. });
  35664. const perimeter = computed(() => 2 * Math.PI * radius.value);
  35665. const rate = computed(() => props.type === "dashboard" ? .75 : 1);
  35666. const strokeDashoffset = computed(() => {
  35667. return `${-1 * perimeter.value * (1 - rate.value) / 2}px`;
  35668. });
  35669. const trailPathStyle = computed(() => ({
  35670. strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
  35671. strokeDashoffset: strokeDashoffset.value
  35672. }));
  35673. const circlePathStyle = computed(() => ({
  35674. strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
  35675. strokeDashoffset: strokeDashoffset.value,
  35676. transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
  35677. }));
  35678. const stroke = computed(() => {
  35679. let ret;
  35680. if (props.color) ret = getCurrentColor(props.percentage);
  35681. else ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
  35682. return ret;
  35683. });
  35684. const statusIcon = computed(() => {
  35685. if (props.status === "warning") return warning_filled_default;
  35686. if (props.type === "line") return props.status === "success" ? circle_check_default : circle_close_default;
  35687. else return props.status === "success" ? check_default : close_default;
  35688. });
  35689. const progressTextSize = computed(() => {
  35690. return props.type === "line" ? 12 + props.strokeWidth * .4 : props.width * .111111 + 2;
  35691. });
  35692. const content = computed(() => props.format(props.percentage));
  35693. function getColors(color) {
  35694. const span = 100 / color.length;
  35695. return color.map((seriesColor, index) => {
  35696. if (isString(seriesColor)) return {
  35697. color: seriesColor,
  35698. percentage: (index + 1) * span
  35699. };
  35700. return seriesColor;
  35701. }).sort((a, b) => a.percentage - b.percentage);
  35702. }
  35703. const getCurrentColor = (percentage) => {
  35704. const { color } = props;
  35705. if (isFunction$1(color)) return color(percentage);
  35706. else if (isString(color)) return color;
  35707. else {
  35708. const colors = getColors(color);
  35709. for (const color of colors) if (color.percentage > percentage) return color.color;
  35710. return colors[colors.length - 1]?.color;
  35711. }
  35712. };
  35713. return (_ctx, _cache) => {
  35714. return openBlock(), createElementBlock("div", {
  35715. class: normalizeClass([
  35716. unref(ns).b(),
  35717. unref(ns).m(__props.type),
  35718. unref(ns).is(__props.status),
  35719. {
  35720. [unref(ns).m("without-text")]: !__props.showText,
  35721. [unref(ns).m("text-inside")]: __props.textInside
  35722. }
  35723. ]),
  35724. role: "progressbar",
  35725. "aria-valuenow": __props.percentage,
  35726. "aria-valuemin": "0",
  35727. "aria-valuemax": "100"
  35728. }, [__props.type === "line" ? (openBlock(), createElementBlock("div", {
  35729. key: 0,
  35730. class: normalizeClass(unref(ns).b("bar"))
  35731. }, [createBaseVNode("div", {
  35732. class: normalizeClass(unref(ns).be("bar", "outer")),
  35733. style: normalizeStyle({ height: `${__props.strokeWidth}px` })
  35734. }, [createBaseVNode("div", {
  35735. class: normalizeClass([
  35736. unref(ns).be("bar", "inner"),
  35737. { [unref(ns).bem("bar", "inner", "indeterminate")]: __props.indeterminate },
  35738. { [unref(ns).bem("bar", "inner", "striped")]: __props.striped },
  35739. { [unref(ns).bem("bar", "inner", "striped-flow")]: __props.stripedFlow }
  35740. ]),
  35741. style: normalizeStyle(barStyle.value)
  35742. }, [(__props.showText || _ctx.$slots.default) && __props.textInside ? (openBlock(), createElementBlock("div", {
  35743. key: 0,
  35744. class: normalizeClass(unref(ns).be("bar", "innerText"))
  35745. }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [createBaseVNode("span", null, toDisplayString(content.value), 1)])], 2)) : createCommentVNode("v-if", true)], 6)], 6)], 2)) : (openBlock(), createElementBlock("div", {
  35746. key: 1,
  35747. class: normalizeClass(unref(ns).b("circle")),
  35748. style: normalizeStyle({
  35749. height: `${__props.width}px`,
  35750. width: `${__props.width}px`
  35751. })
  35752. }, [(openBlock(), createElementBlock("svg", _hoisted_2$15, [createBaseVNode("path", {
  35753. class: normalizeClass(unref(ns).be("circle", "track")),
  35754. d: trackPath.value,
  35755. stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`,
  35756. "stroke-linecap": __props.strokeLinecap,
  35757. "stroke-width": relativeStrokeWidth.value,
  35758. fill: "none",
  35759. style: normalizeStyle(trailPathStyle.value)
  35760. }, null, 14, _hoisted_3$6), createBaseVNode("path", {
  35761. class: normalizeClass(unref(ns).be("circle", "path")),
  35762. d: trackPath.value,
  35763. stroke: stroke.value,
  35764. fill: "none",
  35765. opacity: __props.percentage ? 1 : 0,
  35766. "stroke-linecap": __props.strokeLinecap,
  35767. "stroke-width": relativeStrokeWidth.value,
  35768. style: normalizeStyle(circlePathStyle.value)
  35769. }, null, 14, _hoisted_4$4)]))], 6)), (__props.showText || _ctx.$slots.default) && !__props.textInside ? (openBlock(), createElementBlock("div", {
  35770. key: 2,
  35771. class: normalizeClass(unref(ns).e("text")),
  35772. style: normalizeStyle({ fontSize: `${progressTextSize.value}px` })
  35773. }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [!__props.status ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString(content.value), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  35774. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(statusIcon.value)))]),
  35775. _: 1
  35776. }))])], 6)) : createCommentVNode("v-if", true)], 10, _hoisted_1$24);
  35777. };
  35778. }
  35779. }));
  35780. //#endregion
  35781. //#region node_modules/element-plus/es/components/rate/src/rate.mjs
  35782. /**
  35783. * @deprecated Removed after 3.0.0, Use `RateProps` instead.
  35784. */
  35785. var rateProps = buildProps({
  35786. modelValue: {
  35787. type: Number,
  35788. default: 0
  35789. },
  35790. id: {
  35791. type: String,
  35792. default: void 0
  35793. },
  35794. lowThreshold: {
  35795. type: Number,
  35796. default: 2
  35797. },
  35798. highThreshold: {
  35799. type: Number,
  35800. default: 4
  35801. },
  35802. max: {
  35803. type: Number,
  35804. default: 5
  35805. },
  35806. colors: {
  35807. type: definePropType([Array, Object]),
  35808. default: () => mutable([
  35809. "",
  35810. "",
  35811. ""
  35812. ])
  35813. },
  35814. voidColor: {
  35815. type: String,
  35816. default: ""
  35817. },
  35818. disabledVoidColor: {
  35819. type: String,
  35820. default: ""
  35821. },
  35822. icons: {
  35823. type: definePropType([Array, Object]),
  35824. default: () => [
  35825. star_filled_default,
  35826. star_filled_default,
  35827. star_filled_default
  35828. ]
  35829. },
  35830. voidIcon: {
  35831. type: iconPropType,
  35832. default: () => star_default
  35833. },
  35834. disabledVoidIcon: {
  35835. type: iconPropType,
  35836. default: () => star_filled_default
  35837. },
  35838. disabled: {
  35839. type: Boolean,
  35840. default: void 0
  35841. },
  35842. allowHalf: Boolean,
  35843. showText: Boolean,
  35844. showScore: Boolean,
  35845. textColor: {
  35846. type: String,
  35847. default: ""
  35848. },
  35849. texts: {
  35850. type: definePropType(Array),
  35851. default: () => mutable([
  35852. "Extremely bad",
  35853. "Disappointed",
  35854. "Fair",
  35855. "Satisfied",
  35856. "Surprise"
  35857. ])
  35858. },
  35859. scoreTemplate: {
  35860. type: String,
  35861. default: "{value}"
  35862. },
  35863. size: useSizeProp,
  35864. clearable: Boolean,
  35865. ...useAriaProps(["ariaLabel"])
  35866. });
  35867. var rateEmits = {
  35868. [CHANGE_EVENT]: (value) => isNumber(value),
  35869. [UPDATE_MODEL_EVENT]: (value) => isNumber(value)
  35870. };
  35871. //#endregion
  35872. //#region node_modules/element-plus/es/components/rate/src/rate.vue_vue_type_script_setup_true_lang.mjs
  35873. var _hoisted_1$23 = [
  35874. "id",
  35875. "aria-label",
  35876. "aria-labelledby",
  35877. "aria-valuenow",
  35878. "aria-valuetext",
  35879. "aria-valuemax",
  35880. "tabindex",
  35881. "aria-disabled"
  35882. ];
  35883. var _hoisted_2$14 = ["onMousemove", "onClick"];
  35884. //#endregion
  35885. //#region node_modules/element-plus/es/components/rate/index.mjs
  35886. var ElRate = withInstall(/* @__PURE__ */ defineComponent({
  35887. name: "ElRate",
  35888. __name: "rate",
  35889. props: rateProps,
  35890. emits: rateEmits,
  35891. setup(__props, { expose: __expose, emit: __emit }) {
  35892. function getValueFromMap(value, map) {
  35893. const isExcludedObject = (val) => isObject$2(val);
  35894. const matchedValue = map[Object.keys(map).map((key) => +key).filter((key) => {
  35895. const val = map[key];
  35896. return (isExcludedObject(val) ? val.excluded : false) ? value < key : value <= key;
  35897. }).sort((a, b) => a - b)[0]];
  35898. return isExcludedObject(matchedValue) && matchedValue.value || matchedValue;
  35899. }
  35900. const props = __props;
  35901. const emit = __emit;
  35902. const formItemContext = inject(formItemContextKey, void 0);
  35903. const rateSize = useFormSize();
  35904. const ns = useNamespace("rate");
  35905. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext });
  35906. const currentValue = ref(clamp$2(props.modelValue, 0, props.max));
  35907. const hoverIndex = ref(-1);
  35908. const pointerAtLeftHalf = ref(true);
  35909. const iconRefs = ref([]);
  35910. const iconClientWidths = computed(() => iconRefs.value.map((icon) => icon.$el.clientWidth));
  35911. const rateClasses = computed(() => [ns.b(), ns.m(rateSize.value)]);
  35912. const rateDisabled = useFormDisabled();
  35913. const rateStyles = computed(() => {
  35914. return ns.cssVarBlock({
  35915. "void-color": props.voidColor,
  35916. "disabled-void-color": props.disabledVoidColor,
  35917. "fill-color": activeColor.value
  35918. });
  35919. });
  35920. const text = computed(() => {
  35921. let result = "";
  35922. if (props.showScore) result = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);
  35923. else if (props.showText) result = props.texts[Math.ceil(currentValue.value) - 1];
  35924. return result;
  35925. });
  35926. const valueDecimal = computed(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100);
  35927. const colorMap = computed(() => isArray$1(props.colors) ? {
  35928. [props.lowThreshold]: props.colors[0],
  35929. [props.highThreshold]: {
  35930. value: props.colors[1],
  35931. excluded: true
  35932. },
  35933. [props.max]: props.colors[2]
  35934. } : props.colors);
  35935. const activeColor = computed(() => {
  35936. const color = getValueFromMap(currentValue.value, colorMap.value);
  35937. return isObject$2(color) ? "" : color;
  35938. });
  35939. const decimalStyle = computed(() => {
  35940. let width = "";
  35941. if (rateDisabled.value) width = `${valueDecimal.value}%`;
  35942. else if (props.allowHalf) width = "50%";
  35943. return {
  35944. color: activeColor.value,
  35945. width
  35946. };
  35947. });
  35948. const componentMap = computed(() => {
  35949. let icons = isArray$1(props.icons) ? [...props.icons] : { ...props.icons };
  35950. icons = markRaw(icons);
  35951. return isArray$1(icons) ? {
  35952. [props.lowThreshold]: icons[0],
  35953. [props.highThreshold]: {
  35954. value: icons[1],
  35955. excluded: true
  35956. },
  35957. [props.max]: icons[2]
  35958. } : icons;
  35959. });
  35960. const decimalIconComponent = computed(() => getValueFromMap(props.modelValue, componentMap.value));
  35961. const voidComponent = computed(() => rateDisabled.value ? isString(props.disabledVoidIcon) ? props.disabledVoidIcon : markRaw(props.disabledVoidIcon) : isString(props.voidIcon) ? props.voidIcon : markRaw(props.voidIcon));
  35962. const activeComponent = computed(() => getValueFromMap(currentValue.value, componentMap.value));
  35963. function showDecimalIcon(item) {
  35964. const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;
  35965. const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - .5 <= currentValue.value && item > currentValue.value;
  35966. return showWhenDisabled || showWhenAllowHalf;
  35967. }
  35968. function emitValue(value) {
  35969. if (props.clearable && value === props.modelValue) value = 0;
  35970. emit(UPDATE_MODEL_EVENT, value);
  35971. if (props.modelValue !== value) emit(CHANGE_EVENT, value);
  35972. }
  35973. function selectValue(value) {
  35974. if (rateDisabled.value) return;
  35975. if (props.allowHalf && pointerAtLeftHalf.value) emitValue(currentValue.value);
  35976. else emitValue(value);
  35977. }
  35978. function handleKey(e) {
  35979. if (rateDisabled.value) return;
  35980. const code = getEventCode(e);
  35981. const step = props.allowHalf ? .5 : 1;
  35982. let _currentValue = currentValue.value;
  35983. switch (code) {
  35984. case EVENT_CODE.up:
  35985. case EVENT_CODE.right:
  35986. _currentValue += step;
  35987. break;
  35988. case EVENT_CODE.left:
  35989. case EVENT_CODE.down:
  35990. _currentValue -= step;
  35991. break;
  35992. }
  35993. _currentValue = clamp$2(_currentValue, 0, props.max);
  35994. if (_currentValue === currentValue.value) return;
  35995. e.stopPropagation();
  35996. e.preventDefault();
  35997. emit(UPDATE_MODEL_EVENT, _currentValue);
  35998. emit(CHANGE_EVENT, _currentValue);
  35999. return _currentValue;
  36000. }
  36001. function setCurrentValue(value, event) {
  36002. if (rateDisabled.value) return;
  36003. if (props.allowHalf && event) {
  36004. pointerAtLeftHalf.value = event.offsetX * 2 <= iconClientWidths.value[value - 1];
  36005. currentValue.value = pointerAtLeftHalf.value ? value - .5 : value;
  36006. } else currentValue.value = value;
  36007. hoverIndex.value = value;
  36008. }
  36009. function resetCurrentValue() {
  36010. if (rateDisabled.value) return;
  36011. if (props.allowHalf) pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  36012. currentValue.value = clamp$2(props.modelValue, 0, props.max);
  36013. hoverIndex.value = -1;
  36014. }
  36015. watch(() => props.modelValue, (val) => {
  36016. currentValue.value = clamp$2(val, 0, props.max);
  36017. pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  36018. });
  36019. if (!props.modelValue) emit(UPDATE_MODEL_EVENT, 0);
  36020. __expose({
  36021. setCurrentValue,
  36022. resetCurrentValue
  36023. });
  36024. return (_ctx, _cache) => {
  36025. return openBlock(), createElementBlock("div", {
  36026. id: unref(inputId),
  36027. class: normalizeClass([rateClasses.value, unref(ns).is("disabled", unref(rateDisabled))]),
  36028. role: "slider",
  36029. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "rating" : void 0,
  36030. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItemContext)?.labelId : void 0,
  36031. "aria-valuenow": currentValue.value,
  36032. "aria-valuetext": text.value || void 0,
  36033. "aria-valuemin": "0",
  36034. "aria-valuemax": __props.max,
  36035. style: normalizeStyle(rateStyles.value),
  36036. tabindex: unref(rateDisabled) ? void 0 : 0,
  36037. "aria-disabled": unref(rateDisabled),
  36038. onKeydown: handleKey
  36039. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.max, (item, key) => {
  36040. return openBlock(), createElementBlock("span", {
  36041. key,
  36042. class: normalizeClass(unref(ns).e("item")),
  36043. onMousemove: ($event) => setCurrentValue(item, $event),
  36044. onMouseleave: resetCurrentValue,
  36045. onClick: ($event) => selectValue(item)
  36046. }, [createVNode(unref(ElIcon), {
  36047. ref_for: true,
  36048. ref_key: "iconRefs",
  36049. ref: iconRefs,
  36050. class: normalizeClass([
  36051. unref(ns).e("icon"),
  36052. { hover: hoverIndex.value === item },
  36053. unref(ns).is("active", item <= currentValue.value),
  36054. unref(ns).is("focus-visible", item === Math.ceil(currentValue.value || 1))
  36055. ])
  36056. }, {
  36057. default: withCtx(() => [
  36058. withDirectives((openBlock(), createBlock(resolveDynamicComponent(activeComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item <= currentValue.value]]),
  36059. withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item > currentValue.value]]),
  36060. withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), { class: normalizeClass([unref(ns).em("decimal", "box")]) }, null, 8, ["class"])), [[vShow, showDecimalIcon(item)]]),
  36061. withDirectives(createVNode(unref(ElIcon), {
  36062. style: normalizeStyle(decimalStyle.value),
  36063. class: normalizeClass([unref(ns).e("icon"), unref(ns).e("decimal")])
  36064. }, {
  36065. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(decimalIconComponent.value)))]),
  36066. _: 1
  36067. }, 8, ["style", "class"]), [[vShow, showDecimalIcon(item)]])
  36068. ]),
  36069. _: 2
  36070. }, 1032, ["class"])], 42, _hoisted_2$14);
  36071. }), 128)), __props.showText || __props.showScore ? (openBlock(), createElementBlock("span", {
  36072. key: 0,
  36073. class: normalizeClass(unref(ns).e("text")),
  36074. style: normalizeStyle({ color: __props.textColor })
  36075. }, toDisplayString(text.value), 7)) : createCommentVNode("v-if", true)], 46, _hoisted_1$23);
  36076. };
  36077. }
  36078. }));
  36079. //#endregion
  36080. //#region node_modules/element-plus/es/components/result/src/result.mjs
  36081. var IconMap = {
  36082. primary: "icon-primary",
  36083. success: "icon-success",
  36084. warning: "icon-warning",
  36085. error: "icon-error",
  36086. info: "icon-info"
  36087. };
  36088. var IconComponentMap = {
  36089. [IconMap.primary]: info_filled_default,
  36090. [IconMap.success]: circle_check_filled_default,
  36091. [IconMap.warning]: warning_filled_default,
  36092. [IconMap.error]: circle_close_filled_default,
  36093. [IconMap.info]: info_filled_default
  36094. };
  36095. /**
  36096. * @deprecated Removed after 3.0.0, Use `ResultProps` instead.
  36097. */
  36098. var resultProps = buildProps({
  36099. title: {
  36100. type: String,
  36101. default: ""
  36102. },
  36103. subTitle: {
  36104. type: String,
  36105. default: ""
  36106. },
  36107. icon: {
  36108. type: String,
  36109. values: [
  36110. "primary",
  36111. "success",
  36112. "warning",
  36113. "info",
  36114. "error"
  36115. ],
  36116. default: "info"
  36117. }
  36118. });
  36119. //#endregion
  36120. //#region node_modules/element-plus/es/components/result/index.mjs
  36121. var ElResult = withInstall(/* @__PURE__ */ defineComponent({
  36122. name: "ElResult",
  36123. __name: "result",
  36124. props: resultProps,
  36125. setup(__props) {
  36126. const props = __props;
  36127. const ns = useNamespace("result");
  36128. const resultIcon = computed(() => {
  36129. const icon = props.icon;
  36130. const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
  36131. return {
  36132. class: iconClass,
  36133. component: IconComponentMap[iconClass] || IconComponentMap["icon-info"]
  36134. };
  36135. });
  36136. return (_ctx, _cache) => {
  36137. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  36138. createBaseVNode("div", { class: normalizeClass(unref(ns).e("icon")) }, [renderSlot(_ctx.$slots, "icon", {}, () => [resultIcon.value.component ? (openBlock(), createBlock(resolveDynamicComponent(resultIcon.value.component), {
  36139. key: 0,
  36140. class: normalizeClass(resultIcon.value.class)
  36141. }, null, 8, ["class"])) : createCommentVNode("v-if", true)])], 2),
  36142. __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
  36143. key: 0,
  36144. class: normalizeClass(unref(ns).e("title"))
  36145. }, [renderSlot(_ctx.$slots, "title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
  36146. __props.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
  36147. key: 1,
  36148. class: normalizeClass(unref(ns).e("subtitle"))
  36149. }, [renderSlot(_ctx.$slots, "sub-title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.subTitle), 1)])], 2)) : createCommentVNode("v-if", true),
  36150. _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  36151. key: 2,
  36152. class: normalizeClass(unref(ns).e("extra"))
  36153. }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)
  36154. ], 2);
  36155. };
  36156. }
  36157. }));
  36158. //#endregion
  36159. //#region node_modules/element-plus/es/components/virtual-list/src/defaults.mjs
  36160. var ITEM_RENDER_EVT = "itemRendered";
  36161. var SCROLL_EVT = "scroll";
  36162. var FORWARD = "forward";
  36163. var BACKWARD = "backward";
  36164. var AUTO_ALIGNMENT = "auto";
  36165. var START_ALIGNMENT = "start";
  36166. var CENTERED_ALIGNMENT = "center";
  36167. var HORIZONTAL = "horizontal";
  36168. var VERTICAL = "vertical";
  36169. var RTL_OFFSET_NAG = "negative";
  36170. var RTL_OFFSET_POS_ASC = "positive-ascending";
  36171. var RTL_OFFSET_POS_DESC = "positive-descending";
  36172. var ScrollbarDirKey = {
  36173. [HORIZONTAL]: "left",
  36174. [VERTICAL]: "top"
  36175. };
  36176. //#endregion
  36177. //#region node_modules/element-plus/es/components/virtual-list/src/props.mjs
  36178. var itemSize$1 = buildProp({
  36179. type: definePropType([Number, Function]),
  36180. required: true
  36181. });
  36182. var estimatedItemSize = buildProp({ type: Number });
  36183. var cache = buildProp({
  36184. type: Number,
  36185. default: 2
  36186. });
  36187. var direction = buildProp({
  36188. type: String,
  36189. values: ["ltr", "rtl"],
  36190. default: "ltr"
  36191. });
  36192. var initScrollOffset = buildProp({
  36193. type: Number,
  36194. default: 0
  36195. });
  36196. var total = buildProp({
  36197. type: Number,
  36198. required: true
  36199. });
  36200. var layout = buildProp({
  36201. type: String,
  36202. values: ["horizontal", "vertical"],
  36203. default: VERTICAL
  36204. });
  36205. var virtualizedProps = buildProps({
  36206. className: {
  36207. type: String,
  36208. default: ""
  36209. },
  36210. containerElement: {
  36211. type: definePropType([String, Object]),
  36212. default: "div"
  36213. },
  36214. data: {
  36215. type: definePropType(Array),
  36216. default: () => mutable([])
  36217. },
  36218. direction,
  36219. height: {
  36220. type: [String, Number],
  36221. required: true
  36222. },
  36223. innerElement: {
  36224. type: [String, Object],
  36225. default: "div"
  36226. },
  36227. innerProps: {
  36228. type: definePropType(Object),
  36229. default: () => ({})
  36230. },
  36231. style: { type: definePropType([
  36232. Object,
  36233. String,
  36234. Array
  36235. ]) },
  36236. useIsScrolling: Boolean,
  36237. width: {
  36238. type: [Number, String],
  36239. required: false
  36240. },
  36241. perfMode: {
  36242. type: Boolean,
  36243. default: true
  36244. },
  36245. scrollbarAlwaysOn: Boolean
  36246. });
  36247. var virtualizedListProps = buildProps({
  36248. cache,
  36249. estimatedItemSize,
  36250. layout,
  36251. initScrollOffset,
  36252. total,
  36253. itemSize: itemSize$1,
  36254. ...virtualizedProps
  36255. });
  36256. var scrollbarSize = {
  36257. type: Number,
  36258. default: 6
  36259. };
  36260. var startGap = {
  36261. type: Number,
  36262. default: 0
  36263. };
  36264. var endGap = {
  36265. type: Number,
  36266. default: 2
  36267. };
  36268. var virtualizedGridProps = buildProps({
  36269. columnCache: cache,
  36270. columnWidth: itemSize$1,
  36271. estimatedColumnWidth: estimatedItemSize,
  36272. estimatedRowHeight: estimatedItemSize,
  36273. initScrollLeft: initScrollOffset,
  36274. initScrollTop: initScrollOffset,
  36275. itemKey: {
  36276. type: definePropType(Function),
  36277. default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`
  36278. },
  36279. rowCache: cache,
  36280. rowHeight: itemSize$1,
  36281. totalColumn: total,
  36282. totalRow: total,
  36283. hScrollbarSize: scrollbarSize,
  36284. vScrollbarSize: scrollbarSize,
  36285. scrollbarStartGap: startGap,
  36286. scrollbarEndGap: endGap,
  36287. role: String,
  36288. ...virtualizedProps
  36289. });
  36290. var virtualizedScrollbarProps = buildProps({
  36291. alwaysOn: Boolean,
  36292. class: String,
  36293. layout,
  36294. total,
  36295. ratio: {
  36296. type: Number,
  36297. required: true
  36298. },
  36299. clientSize: {
  36300. type: Number,
  36301. required: true
  36302. },
  36303. scrollFrom: {
  36304. type: Number,
  36305. required: true
  36306. },
  36307. scrollbarSize,
  36308. startGap,
  36309. endGap,
  36310. visible: Boolean
  36311. });
  36312. //#endregion
  36313. //#region node_modules/element-plus/es/components/virtual-list/src/utils.mjs
  36314. var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
  36315. var isHorizontal = (dir) => dir === "ltr" || dir === "rtl" || dir === "horizontal";
  36316. var isRTL = (dir) => dir === "rtl";
  36317. var cachedRTLResult = null;
  36318. function getRTLOffsetType(recalculate = false) {
  36319. if (cachedRTLResult === null || recalculate) {
  36320. const outerDiv = document.createElement("div");
  36321. const outerStyle = outerDiv.style;
  36322. outerStyle.width = "50px";
  36323. outerStyle.height = "50px";
  36324. outerStyle.overflow = "scroll";
  36325. outerStyle.direction = "rtl";
  36326. const innerDiv = document.createElement("div");
  36327. const innerStyle = innerDiv.style;
  36328. innerStyle.width = "100px";
  36329. innerStyle.height = "100px";
  36330. outerDiv.appendChild(innerDiv);
  36331. document.body.appendChild(outerDiv);
  36332. if (outerDiv.scrollLeft > 0) cachedRTLResult = RTL_OFFSET_POS_DESC;
  36333. else {
  36334. outerDiv.scrollLeft = 1;
  36335. if (outerDiv.scrollLeft === 0) cachedRTLResult = RTL_OFFSET_NAG;
  36336. else cachedRTLResult = RTL_OFFSET_POS_ASC;
  36337. }
  36338. document.body.removeChild(outerDiv);
  36339. return cachedRTLResult;
  36340. }
  36341. return cachedRTLResult;
  36342. }
  36343. function renderThumbStyle$1({ move, size, bar }, layout) {
  36344. const style = {};
  36345. const translate = `translate${bar.axis}(${move}px)`;
  36346. style[bar.size] = size;
  36347. style.transform = translate;
  36348. if (layout === "horizontal") style.height = "100%";
  36349. else style.width = "100%";
  36350. return style;
  36351. }
  36352. //#endregion
  36353. //#region node_modules/memoize-one/dist/memoize-one.esm.js
  36354. var safeIsNaN = Number.isNaN || function ponyfill(value) {
  36355. return typeof value === "number" && value !== value;
  36356. };
  36357. function isEqual(first, second) {
  36358. if (first === second) return true;
  36359. if (safeIsNaN(first) && safeIsNaN(second)) return true;
  36360. return false;
  36361. }
  36362. function areInputsEqual(newInputs, lastInputs) {
  36363. if (newInputs.length !== lastInputs.length) return false;
  36364. for (var i = 0; i < newInputs.length; i++) if (!isEqual(newInputs[i], lastInputs[i])) return false;
  36365. return true;
  36366. }
  36367. function memoizeOne(resultFn, isEqual) {
  36368. if (isEqual === void 0) isEqual = areInputsEqual;
  36369. var cache = null;
  36370. function memoized() {
  36371. var newArgs = [];
  36372. for (var _i = 0; _i < arguments.length; _i++) newArgs[_i] = arguments[_i];
  36373. if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) return cache.lastResult;
  36374. var lastResult = resultFn.apply(this, newArgs);
  36375. cache = {
  36376. lastResult,
  36377. lastArgs: newArgs,
  36378. lastThis: this
  36379. };
  36380. return lastResult;
  36381. }
  36382. memoized.clear = function clear() {
  36383. cache = null;
  36384. };
  36385. return memoized;
  36386. }
  36387. //#endregion
  36388. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs
  36389. var useCache = () => {
  36390. const props = getCurrentInstance().proxy.$props;
  36391. return computed(() => {
  36392. const _getItemStyleCache = (_, __, ___) => ({});
  36393. return props.perfMode ? memoize(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
  36394. });
  36395. };
  36396. //#endregion
  36397. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs
  36398. var useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
  36399. let frameHandle;
  36400. let offset = 0;
  36401. const hasReachedEdge = (offset) => {
  36402. return offset < 0 && atStartEdge.value || offset > 0 && atEndEdge.value;
  36403. };
  36404. const onWheel = (e) => {
  36405. cAF(frameHandle);
  36406. let { deltaX, deltaY } = e;
  36407. if (e.shiftKey && deltaY !== 0) {
  36408. deltaX = deltaY;
  36409. deltaY = 0;
  36410. }
  36411. const newOffset = layout.value === "horizontal" ? deltaX : deltaY;
  36412. if (hasReachedEdge(newOffset)) return;
  36413. offset += newOffset;
  36414. if (!isFirefox() && newOffset !== 0) e.preventDefault();
  36415. frameHandle = rAF(() => {
  36416. onWheelDelta(offset);
  36417. offset = 0;
  36418. });
  36419. };
  36420. return {
  36421. hasReachedEdge,
  36422. onWheel
  36423. };
  36424. };
  36425. //#endregion
  36426. //#region node_modules/element-plus/es/components/virtual-list/src/components/scrollbar.mjs
  36427. var ScrollBar = defineComponent({
  36428. name: "ElVirtualScrollBar",
  36429. props: virtualizedScrollbarProps,
  36430. emits: [
  36431. "scroll",
  36432. "start-move",
  36433. "stop-move"
  36434. ],
  36435. setup(props, { emit }) {
  36436. const GAP = computed(() => props.startGap + props.endGap);
  36437. const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
  36438. const nsScrollbar = useNamespace("scrollbar");
  36439. const trackRef = ref();
  36440. const thumbRef = ref();
  36441. let frameHandle = null;
  36442. let onselectstartStore = null;
  36443. const state = reactive({
  36444. isDragging: false,
  36445. traveled: 0
  36446. });
  36447. const bar = computed(() => BAR_MAP[props.layout]);
  36448. const trackSize = computed(() => props.clientSize - unref(GAP));
  36449. const trackStyle = computed(() => ({
  36450. position: "absolute",
  36451. width: `${"horizontal" === props.layout ? trackSize.value : props.scrollbarSize}px`,
  36452. height: `${"horizontal" === props.layout ? props.scrollbarSize : trackSize.value}px`,
  36453. [ScrollbarDirKey[props.layout]]: "2px",
  36454. right: "2px",
  36455. bottom: "2px",
  36456. borderRadius: "4px"
  36457. }));
  36458. const thumbSize = computed(() => {
  36459. const ratio = props.ratio;
  36460. if (ratio >= 100) return Number.POSITIVE_INFINITY;
  36461. if (ratio >= 50) return ratio * trackSize.value / 100;
  36462. const SCROLLBAR_MAX_SIZE = trackSize.value / 3;
  36463. return Math.floor(Math.min(Math.max(ratio * trackSize.value / 100, 20), SCROLLBAR_MAX_SIZE));
  36464. });
  36465. const thumbStyle = computed(() => {
  36466. if (!Number.isFinite(thumbSize.value)) return { display: "none" };
  36467. const thumb = `${thumbSize.value}px`;
  36468. return renderThumbStyle$1({
  36469. bar: bar.value,
  36470. size: thumb,
  36471. move: state.traveled
  36472. }, props.layout);
  36473. });
  36474. const totalSteps = computed(() => Math.ceil(props.clientSize - thumbSize.value - unref(GAP)));
  36475. const attachEvents = () => {
  36476. window.addEventListener("mousemove", onMouseMove);
  36477. window.addEventListener("mouseup", onMouseUp);
  36478. const thumbEl = unref(thumbRef);
  36479. if (!thumbEl) return;
  36480. onselectstartStore = document.onselectstart;
  36481. document.onselectstart = () => false;
  36482. thumbEl.addEventListener("touchmove", onMouseMove, { passive: true });
  36483. thumbEl.addEventListener("touchend", onMouseUp);
  36484. };
  36485. const detachEvents = () => {
  36486. window.removeEventListener("mousemove", onMouseMove);
  36487. window.removeEventListener("mouseup", onMouseUp);
  36488. document.onselectstart = onselectstartStore;
  36489. onselectstartStore = null;
  36490. const thumbEl = unref(thumbRef);
  36491. if (!thumbEl) return;
  36492. thumbEl.removeEventListener("touchmove", onMouseMove);
  36493. thumbEl.removeEventListener("touchend", onMouseUp);
  36494. };
  36495. const onThumbMouseDown = (e) => {
  36496. e.stopImmediatePropagation();
  36497. if (e.ctrlKey || [1, 2].includes(e.button)) return;
  36498. state.isDragging = true;
  36499. state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
  36500. emit("start-move");
  36501. attachEvents();
  36502. };
  36503. const onMouseUp = () => {
  36504. state.isDragging = false;
  36505. state[bar.value.axis] = 0;
  36506. emit("stop-move");
  36507. detachEvents();
  36508. };
  36509. const onMouseMove = (e) => {
  36510. const { isDragging } = state;
  36511. if (!isDragging) return;
  36512. if (!thumbRef.value || !trackRef.value) return;
  36513. const prevPage = state[bar.value.axis];
  36514. if (!prevPage) return;
  36515. cAF(frameHandle);
  36516. /**
  36517. * +--------------+ +--------------+
  36518. * | - <--------- thumb.offsetTop | |
  36519. * | |+| <--+ | |
  36520. * | - | | |
  36521. * | Content | | | |
  36522. * | | | | |
  36523. * | | | | |
  36524. * | | | | -
  36525. * | | +--> | |+|
  36526. * | | | -
  36527. * +--------------+ +--------------+
  36528. */
  36529. const distance = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumbRef.value[bar.value.offset] - prevPage);
  36530. frameHandle = rAF(() => {
  36531. state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
  36532. emit("scroll", distance, totalSteps.value);
  36533. });
  36534. };
  36535. const clickTrackHandler = (e) => {
  36536. const distance = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumbRef.value[bar.value.offset] / 2;
  36537. state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
  36538. emit("scroll", distance, totalSteps.value);
  36539. };
  36540. watch(() => props.scrollFrom, (v) => {
  36541. if (state.isDragging) return;
  36542. /**
  36543. * this is simply mapping the current scrollbar offset
  36544. *
  36545. * formula 1:
  36546. * v = scrollOffset / (estimatedTotalSize - clientSize)
  36547. * traveled = v * (clientSize - thumbSize - GAP) --> v * totalSteps
  36548. *
  36549. * formula 2:
  36550. * traveled = (v * clientSize) / (clientSize / totalSteps) --> (v * clientSize) * (totalSteps / clientSize) --> v * totalSteps
  36551. */
  36552. state.traveled = Math.ceil(v * totalSteps.value);
  36553. });
  36554. onBeforeUnmount(() => {
  36555. detachEvents();
  36556. });
  36557. return () => {
  36558. return h$1("div", {
  36559. role: "presentation",
  36560. ref: trackRef,
  36561. class: [
  36562. nsVirtualScrollbar.b(),
  36563. props.class,
  36564. (props.alwaysOn || state.isDragging) && "always-on"
  36565. ],
  36566. style: trackStyle.value,
  36567. onMousedown: withModifiers(clickTrackHandler, ["stop", "prevent"]),
  36568. onTouchstartPrevent: onThumbMouseDown
  36569. }, h$1("div", {
  36570. ref: thumbRef,
  36571. class: nsScrollbar.e("thumb"),
  36572. style: thumbStyle.value,
  36573. onMousedown: onThumbMouseDown
  36574. }, []));
  36575. };
  36576. }
  36577. });
  36578. //#endregion
  36579. //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-list.mjs
  36580. var createList = ({ name, getOffset, getItemSize, getItemOffset, getEstimatedTotalSize, getStartIndexForOffset, getStopIndexForStartIndex, initCache, clearCache, validateProps }) => {
  36581. return defineComponent({
  36582. name: name ?? "ElVirtualList",
  36583. props: virtualizedListProps,
  36584. emits: [ITEM_RENDER_EVT, SCROLL_EVT],
  36585. setup(props, { emit, expose }) {
  36586. validateProps(props);
  36587. const instance = getCurrentInstance();
  36588. const ns = useNamespace("vl");
  36589. const dynamicSizeCache = ref(initCache(props, instance));
  36590. const getItemStyleCache = useCache();
  36591. const windowRef = ref();
  36592. const innerRef = ref();
  36593. const scrollbarRef = ref();
  36594. const states = ref({
  36595. isScrolling: false,
  36596. scrollDir: "forward",
  36597. scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,
  36598. updateRequested: false,
  36599. isScrollbarDragging: false,
  36600. scrollbarAlwaysOn: props.scrollbarAlwaysOn
  36601. });
  36602. const itemsToRender = computed(() => {
  36603. const { total, cache } = props;
  36604. const { isScrolling, scrollDir, scrollOffset } = unref(states);
  36605. if (total === 0) return [
  36606. 0,
  36607. 0,
  36608. 0,
  36609. 0
  36610. ];
  36611. const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache));
  36612. const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, unref(dynamicSizeCache));
  36613. const cacheBackward = !isScrolling || scrollDir === "backward" ? Math.max(1, cache) : 1;
  36614. const cacheForward = !isScrolling || scrollDir === "forward" ? Math.max(1, cache) : 1;
  36615. return [
  36616. Math.max(0, startIndex - cacheBackward),
  36617. Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),
  36618. startIndex,
  36619. stopIndex
  36620. ];
  36621. });
  36622. const estimatedTotalSize = computed(() => getEstimatedTotalSize(props, unref(dynamicSizeCache)));
  36623. const _isHorizontal = computed(() => isHorizontal(props.layout));
  36624. const windowStyle = computed(() => [
  36625. {
  36626. position: "relative",
  36627. [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
  36628. WebkitOverflowScrolling: "touch",
  36629. willChange: "transform"
  36630. },
  36631. {
  36632. direction: props.direction,
  36633. height: isNumber(props.height) ? `${props.height}px` : props.height,
  36634. width: isNumber(props.width) ? `${props.width}px` : props.width
  36635. },
  36636. props.style
  36637. ]);
  36638. const innerStyle = computed(() => {
  36639. const size = unref(estimatedTotalSize);
  36640. const horizontal = unref(_isHorizontal);
  36641. return {
  36642. height: horizontal ? "100%" : `${size}px`,
  36643. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  36644. width: horizontal ? `${size}px` : "100%",
  36645. margin: 0,
  36646. boxSizing: "border-box"
  36647. };
  36648. });
  36649. const clientSize = computed(() => _isHorizontal.value ? props.width : props.height);
  36650. const { onWheel } = useWheel({
  36651. atStartEdge: computed(() => states.value.scrollOffset <= 0),
  36652. atEndEdge: computed(() => states.value.scrollOffset >= estimatedTotalSize.value),
  36653. layout: computed(() => props.layout)
  36654. }, (offset) => {
  36655. scrollbarRef.value.onMouseUp?.();
  36656. scrollTo(Math.min(states.value.scrollOffset + offset, estimatedTotalSize.value - clientSize.value));
  36657. });
  36658. useEventListener(windowRef, "wheel", onWheel, { passive: false });
  36659. const emitEvents = () => {
  36660. const { total } = props;
  36661. if (total > 0) {
  36662. const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender);
  36663. emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
  36664. }
  36665. const { scrollDir, scrollOffset, updateRequested } = unref(states);
  36666. emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
  36667. };
  36668. const scrollVertically = (e) => {
  36669. const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
  36670. const _states = unref(states);
  36671. if (_states.scrollOffset === scrollTop) return;
  36672. const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
  36673. states.value = {
  36674. ..._states,
  36675. isScrolling: true,
  36676. scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
  36677. scrollOffset,
  36678. updateRequested: false
  36679. };
  36680. nextTick(resetIsScrolling);
  36681. };
  36682. const scrollHorizontally = (e) => {
  36683. const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
  36684. const _states = unref(states);
  36685. if (_states.scrollOffset === scrollLeft) return;
  36686. const { direction } = props;
  36687. let scrollOffset = scrollLeft;
  36688. if (direction === "rtl") switch (getRTLOffsetType()) {
  36689. case RTL_OFFSET_NAG:
  36690. scrollOffset = -scrollLeft;
  36691. break;
  36692. case RTL_OFFSET_POS_DESC:
  36693. scrollOffset = scrollWidth - clientWidth - scrollLeft;
  36694. break;
  36695. }
  36696. scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
  36697. states.value = {
  36698. ..._states,
  36699. isScrolling: true,
  36700. scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
  36701. scrollOffset,
  36702. updateRequested: false
  36703. };
  36704. nextTick(resetIsScrolling);
  36705. };
  36706. const onScroll = (e) => {
  36707. unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
  36708. emitEvents();
  36709. };
  36710. const onScrollbarScroll = (distanceToGo, totalSteps) => {
  36711. const offset = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;
  36712. scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset));
  36713. };
  36714. const scrollTo = (offset) => {
  36715. offset = Math.max(offset, 0);
  36716. if (offset === unref(states).scrollOffset) return;
  36717. states.value = {
  36718. ...unref(states),
  36719. scrollOffset: offset,
  36720. scrollDir: getScrollDir(unref(states).scrollOffset, offset),
  36721. updateRequested: true
  36722. };
  36723. nextTick(resetIsScrolling);
  36724. };
  36725. const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
  36726. const { scrollOffset } = unref(states);
  36727. idx = Math.max(0, Math.min(idx, props.total - 1));
  36728. scrollTo(getOffset(props, idx, alignment, scrollOffset, unref(dynamicSizeCache)));
  36729. };
  36730. const getItemStyle = (idx) => {
  36731. const { direction, itemSize, layout } = props;
  36732. const itemStyleCache = getItemStyleCache.value(clearCache && itemSize, clearCache && layout, clearCache && direction);
  36733. let style;
  36734. if (hasOwn(itemStyleCache, String(idx))) style = itemStyleCache[idx];
  36735. else {
  36736. const offset = getItemOffset(props, idx, unref(dynamicSizeCache));
  36737. const size = getItemSize(props, idx, unref(dynamicSizeCache));
  36738. const horizontal = unref(_isHorizontal);
  36739. const isRtl = direction === "rtl";
  36740. const offsetHorizontal = horizontal ? offset : 0;
  36741. itemStyleCache[idx] = style = {
  36742. position: "absolute",
  36743. left: isRtl ? void 0 : `${offsetHorizontal}px`,
  36744. right: isRtl ? `${offsetHorizontal}px` : void 0,
  36745. top: !horizontal ? `${offset}px` : 0,
  36746. height: !horizontal ? `${size}px` : "100%",
  36747. width: horizontal ? `${size}px` : "100%"
  36748. };
  36749. }
  36750. return style;
  36751. };
  36752. const resetIsScrolling = () => {
  36753. states.value.isScrolling = false;
  36754. nextTick(() => {
  36755. getItemStyleCache.value(-1, null, null);
  36756. });
  36757. };
  36758. const resetScrollTop = () => {
  36759. const window = windowRef.value;
  36760. if (window) window.scrollTop = 0;
  36761. };
  36762. onMounted(() => {
  36763. if (!isClient) return;
  36764. const { initScrollOffset } = props;
  36765. const windowElement = unref(windowRef);
  36766. if (isNumber(initScrollOffset) && windowElement) if (unref(_isHorizontal)) windowElement.scrollLeft = initScrollOffset;
  36767. else windowElement.scrollTop = initScrollOffset;
  36768. emitEvents();
  36769. });
  36770. onUpdated(() => {
  36771. const { direction, layout } = props;
  36772. const { scrollOffset, updateRequested } = unref(states);
  36773. const windowElement = unref(windowRef);
  36774. if (updateRequested && windowElement) if (layout === "horizontal") if (direction === "rtl") switch (getRTLOffsetType()) {
  36775. case RTL_OFFSET_NAG:
  36776. windowElement.scrollLeft = -scrollOffset;
  36777. break;
  36778. case RTL_OFFSET_POS_ASC:
  36779. windowElement.scrollLeft = scrollOffset;
  36780. break;
  36781. default: {
  36782. const { clientWidth, scrollWidth } = windowElement;
  36783. windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
  36784. break;
  36785. }
  36786. }
  36787. else windowElement.scrollLeft = scrollOffset;
  36788. else windowElement.scrollTop = scrollOffset;
  36789. });
  36790. onActivated(() => {
  36791. unref(windowRef).scrollTop = unref(states).scrollOffset;
  36792. });
  36793. const api = {
  36794. ns,
  36795. clientSize,
  36796. estimatedTotalSize,
  36797. windowStyle,
  36798. windowRef,
  36799. innerRef,
  36800. innerStyle,
  36801. itemsToRender,
  36802. scrollbarRef,
  36803. states,
  36804. getItemStyle,
  36805. onScroll,
  36806. onScrollbarScroll,
  36807. onWheel,
  36808. scrollTo,
  36809. scrollToItem,
  36810. resetScrollTop
  36811. };
  36812. expose({
  36813. windowRef,
  36814. innerRef,
  36815. getItemStyleCache,
  36816. scrollTo,
  36817. scrollToItem,
  36818. resetScrollTop,
  36819. states
  36820. });
  36821. return api;
  36822. },
  36823. render(ctx) {
  36824. const { $slots, className, clientSize, containerElement, data, getItemStyle, innerElement, itemsToRender, innerStyle, layout, total, onScroll, onScrollbarScroll, states, useIsScrolling, windowStyle, ns } = ctx;
  36825. const [start, end] = itemsToRender;
  36826. const Container = resolveDynamicComponent(containerElement);
  36827. const Inner = resolveDynamicComponent(innerElement);
  36828. const children = [];
  36829. if (total > 0) for (let i = start; i <= end; i++) children.push(h$1(Fragment, { key: i }, $slots.default?.({
  36830. data,
  36831. index: i,
  36832. isScrolling: useIsScrolling ? states.isScrolling : void 0,
  36833. style: getItemStyle(i)
  36834. })));
  36835. const InnerNode = [h$1(Inner, mergeProps(ctx.innerProps, {
  36836. style: innerStyle,
  36837. ref: "innerRef"
  36838. }), !isString(Inner) ? { default: () => children } : children)];
  36839. const scrollbar = h$1(ScrollBar, {
  36840. ref: "scrollbarRef",
  36841. clientSize,
  36842. layout,
  36843. onScroll: onScrollbarScroll,
  36844. ratio: clientSize * 100 / this.estimatedTotalSize,
  36845. scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
  36846. total,
  36847. alwaysOn: states.scrollbarAlwaysOn
  36848. });
  36849. const listContainer = h$1(Container, {
  36850. class: [ns.e("window"), className],
  36851. style: windowStyle,
  36852. onScroll,
  36853. ref: "windowRef",
  36854. key: 0
  36855. }, !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]);
  36856. return h$1("div", {
  36857. key: 0,
  36858. class: [ns.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""]
  36859. }, [listContainer, scrollbar]);
  36860. }
  36861. });
  36862. };
  36863. //#endregion
  36864. //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-list.mjs
  36865. var FixedSizeList = createList({
  36866. name: "ElFixedSizeList",
  36867. getItemOffset: ({ itemSize }, index) => index * itemSize,
  36868. getItemSize: ({ itemSize }) => itemSize,
  36869. getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,
  36870. getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {
  36871. const size = isHorizontal(layout) ? width : height;
  36872. if (isString(size)) throwError("[ElVirtualList]", `
  36873. You should set
  36874. width/height
  36875. to number when your layout is
  36876. horizontal/vertical
  36877. `);
  36878. const lastItemOffset = Math.max(0, total * itemSize - size);
  36879. const maxOffset = Math.min(lastItemOffset, index * itemSize);
  36880. const minOffset = Math.max(0, (index + 1) * itemSize - size);
  36881. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  36882. else alignment = CENTERED_ALIGNMENT;
  36883. switch (alignment) {
  36884. case START_ALIGNMENT: return maxOffset;
  36885. case "end": return minOffset;
  36886. case CENTERED_ALIGNMENT: {
  36887. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  36888. if (middleOffset < Math.ceil(size / 2)) return 0;
  36889. else if (middleOffset > lastItemOffset + Math.floor(size / 2)) return lastItemOffset;
  36890. else return middleOffset;
  36891. }
  36892. case AUTO_ALIGNMENT:
  36893. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  36894. else if (scrollOffset < minOffset) return minOffset;
  36895. else return maxOffset;
  36896. }
  36897. },
  36898. getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),
  36899. getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {
  36900. const offset = startIndex * itemSize;
  36901. const size = isHorizontal(layout) ? width : height;
  36902. const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);
  36903. return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));
  36904. },
  36905. initCache() {},
  36906. clearCache: true,
  36907. validateProps() {}
  36908. });
  36909. //#endregion
  36910. //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs
  36911. var SCOPE$6 = "ElDynamicSizeList";
  36912. var getItemFromCache$1 = (props, index, listCache) => {
  36913. const { itemSize } = props;
  36914. const { items, lastVisitedIndex } = listCache;
  36915. if (index > lastVisitedIndex) {
  36916. let offset = 0;
  36917. if (lastVisitedIndex >= 0) {
  36918. const item = items[lastVisitedIndex];
  36919. offset = item.offset + item.size;
  36920. }
  36921. for (let i = lastVisitedIndex + 1; i <= index; i++) {
  36922. const size = itemSize(i);
  36923. items[i] = {
  36924. offset,
  36925. size
  36926. };
  36927. offset += size;
  36928. }
  36929. listCache.lastVisitedIndex = index;
  36930. }
  36931. return items[index];
  36932. };
  36933. var findItem$1 = (props, listCache, offset) => {
  36934. const { items, lastVisitedIndex } = listCache;
  36935. if ((lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0) >= offset) return bs$1(props, listCache, 0, lastVisitedIndex, offset);
  36936. return es$1(props, listCache, Math.max(0, lastVisitedIndex), offset);
  36937. };
  36938. var bs$1 = (props, listCache, low, high, offset) => {
  36939. while (low <= high) {
  36940. const mid = low + Math.floor((high - low) / 2);
  36941. const currentOffset = getItemFromCache$1(props, mid, listCache).offset;
  36942. if (currentOffset === offset) return mid;
  36943. else if (currentOffset < offset) low = mid + 1;
  36944. else if (currentOffset > offset) high = mid - 1;
  36945. }
  36946. return Math.max(0, low - 1);
  36947. };
  36948. var es$1 = (props, listCache, index, offset) => {
  36949. const { total } = props;
  36950. let exponent = 1;
  36951. while (index < total && getItemFromCache$1(props, index, listCache).offset < offset) {
  36952. index += exponent;
  36953. exponent *= 2;
  36954. }
  36955. return bs$1(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);
  36956. };
  36957. var getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {
  36958. let totalSizeOfMeasuredItems = 0;
  36959. if (lastVisitedIndex >= total) lastVisitedIndex = total - 1;
  36960. if (lastVisitedIndex >= 0) {
  36961. const item = items[lastVisitedIndex];
  36962. totalSizeOfMeasuredItems = item.offset + item.size;
  36963. }
  36964. const totalSizeOfUnmeasuredItems = (total - lastVisitedIndex - 1) * estimatedItemSize;
  36965. return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
  36966. };
  36967. var DynamicSizeList = createList({
  36968. name: "ElDynamicSizeList",
  36969. getItemOffset: (props, index, listCache) => getItemFromCache$1(props, index, listCache).offset,
  36970. getItemSize: (_, index, { items }) => items[index].size,
  36971. getEstimatedTotalSize,
  36972. getOffset: (props, index, alignment, scrollOffset, listCache) => {
  36973. const { height, layout, width } = props;
  36974. const size = isHorizontal(layout) ? width : height;
  36975. const item = getItemFromCache$1(props, index, listCache);
  36976. const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
  36977. const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));
  36978. const minOffset = Math.max(0, item.offset - size + item.size);
  36979. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  36980. else alignment = CENTERED_ALIGNMENT;
  36981. switch (alignment) {
  36982. case START_ALIGNMENT: return maxOffset;
  36983. case "end": return minOffset;
  36984. case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
  36985. case AUTO_ALIGNMENT:
  36986. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  36987. else if (scrollOffset < minOffset) return minOffset;
  36988. else return maxOffset;
  36989. }
  36990. },
  36991. getStartIndexForOffset: (props, offset, listCache) => findItem$1(props, listCache, offset),
  36992. getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
  36993. const { height, total, layout, width } = props;
  36994. const size = isHorizontal(layout) ? width : height;
  36995. const item = getItemFromCache$1(props, startIndex, listCache);
  36996. const maxOffset = scrollOffset + size;
  36997. let offset = item.offset + item.size;
  36998. let stopIndex = startIndex;
  36999. while (stopIndex < total - 1 && offset < maxOffset) {
  37000. stopIndex++;
  37001. offset += getItemFromCache$1(props, stopIndex, listCache).size;
  37002. }
  37003. return stopIndex;
  37004. },
  37005. initCache({ estimatedItemSize = 50 }, instance) {
  37006. const cache = {
  37007. items: {},
  37008. estimatedItemSize,
  37009. lastVisitedIndex: -1
  37010. };
  37011. cache.clearCacheAfterIndex = (index, forceUpdate = true) => {
  37012. cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);
  37013. instance.exposed?.getItemStyleCache(-1);
  37014. if (forceUpdate) instance.proxy?.$forceUpdate();
  37015. };
  37016. return cache;
  37017. },
  37018. clearCache: false,
  37019. validateProps: ({ itemSize }) => {
  37020. if (typeof itemSize !== "function") throwError(SCOPE$6, `
  37021. itemSize is required as function, but the given value was ${typeof itemSize}
  37022. `);
  37023. }
  37024. });
  37025. //#endregion
  37026. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-wheel.mjs
  37027. var useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => {
  37028. let frameHandle = null;
  37029. let xOffset = 0;
  37030. let yOffset = 0;
  37031. const hasReachedEdge = (x, y) => {
  37032. const xEdgeReached = x < 0 && atXStartEdge.value || x > 0 && atXEndEdge.value;
  37033. const yEdgeReached = y < 0 && atYStartEdge.value || y > 0 && atYEndEdge.value;
  37034. return xEdgeReached || yEdgeReached;
  37035. };
  37036. const onWheel = (e) => {
  37037. cAF(frameHandle);
  37038. let x = e.deltaX;
  37039. let y = e.deltaY;
  37040. if (Math.abs(x) > Math.abs(y)) y = 0;
  37041. else x = 0;
  37042. if (e.shiftKey && y !== 0) {
  37043. x = y;
  37044. y = 0;
  37045. }
  37046. if (hasReachedEdge(x, y)) {
  37047. if (e.deltaX !== 0 && x === 0) e.preventDefault();
  37048. return;
  37049. }
  37050. xOffset += x;
  37051. yOffset += y;
  37052. e.preventDefault();
  37053. frameHandle = rAF(() => {
  37054. onWheelDelta(xOffset, yOffset);
  37055. xOffset = 0;
  37056. yOffset = 0;
  37057. });
  37058. };
  37059. return {
  37060. hasReachedEdge,
  37061. onWheel
  37062. };
  37063. };
  37064. //#endregion
  37065. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-touch.mjs
  37066. var useGridTouch = (windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight) => {
  37067. const touchStartX = ref(0);
  37068. const touchStartY = ref(0);
  37069. let frameHandle;
  37070. let deltaX = 0;
  37071. let deltaY = 0;
  37072. const handleTouchStart = (event) => {
  37073. cAF(frameHandle);
  37074. touchStartX.value = event.touches[0].clientX;
  37075. touchStartY.value = event.touches[0].clientY;
  37076. deltaX = 0;
  37077. deltaY = 0;
  37078. };
  37079. const handleTouchMove = (event) => {
  37080. event.preventDefault();
  37081. cAF(frameHandle);
  37082. deltaX += touchStartX.value - event.touches[0].clientX;
  37083. deltaY += touchStartY.value - event.touches[0].clientY;
  37084. touchStartX.value = event.touches[0].clientX;
  37085. touchStartY.value = event.touches[0].clientY;
  37086. frameHandle = rAF(() => {
  37087. const maxScrollLeft = estimatedTotalWidth.value - unref(parsedWidth);
  37088. const maxScrollTop = estimatedTotalHeight.value - unref(parsedHeight);
  37089. scrollTo({
  37090. scrollLeft: Math.min(states.value.scrollLeft + deltaX, maxScrollLeft),
  37091. scrollTop: Math.min(states.value.scrollTop + deltaY, maxScrollTop)
  37092. });
  37093. deltaX = 0;
  37094. deltaY = 0;
  37095. });
  37096. };
  37097. useEventListener(windowRef, "touchstart", handleTouchStart, { passive: true });
  37098. useEventListener(windowRef, "touchmove", handleTouchMove, { passive: false });
  37099. return {
  37100. touchStartX,
  37101. touchStartY,
  37102. handleTouchStart,
  37103. handleTouchMove
  37104. };
  37105. };
  37106. //#endregion
  37107. //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs
  37108. var createGrid = ({ name, clearCache, getColumnPosition, getColumnStartIndexForOffset, getColumnStopIndexForStartIndex, getEstimatedTotalHeight, getEstimatedTotalWidth, getColumnOffset, getRowOffset, getRowPosition, getRowStartIndexForOffset, getRowStopIndexForStartIndex, initCache, injectToInstance, validateProps }) => {
  37109. return defineComponent({
  37110. name: name ?? "ElVirtualList",
  37111. props: virtualizedGridProps,
  37112. emits: [ITEM_RENDER_EVT, SCROLL_EVT],
  37113. setup(props, { emit, expose, slots }) {
  37114. const ns = useNamespace("vl");
  37115. validateProps(props);
  37116. const instance = getCurrentInstance();
  37117. const cache = ref(initCache(props, instance));
  37118. injectToInstance?.(instance, cache);
  37119. const windowRef = ref();
  37120. const hScrollbar = ref();
  37121. const vScrollbar = ref();
  37122. const innerRef = ref();
  37123. const states = ref({
  37124. isScrolling: false,
  37125. scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,
  37126. scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,
  37127. updateRequested: false,
  37128. xAxisScrollDir: FORWARD,
  37129. yAxisScrollDir: FORWARD
  37130. });
  37131. const getItemStyleCache = useCache();
  37132. const parsedHeight = computed(() => Number.parseInt(`${props.height}`, 10));
  37133. const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10));
  37134. const columnsToRender = computed(() => {
  37135. const { totalColumn, totalRow, columnCache } = props;
  37136. const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states);
  37137. if (totalColumn === 0 || totalRow === 0) return [
  37138. 0,
  37139. 0,
  37140. 0,
  37141. 0
  37142. ];
  37143. const startIndex = getColumnStartIndexForOffset(props, scrollLeft, unref(cache));
  37144. const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, unref(cache));
  37145. const cacheBackward = !isScrolling || xAxisScrollDir === "backward" ? Math.max(1, columnCache) : 1;
  37146. const cacheForward = !isScrolling || xAxisScrollDir === "forward" ? Math.max(1, columnCache) : 1;
  37147. return [
  37148. Math.max(0, startIndex - cacheBackward),
  37149. Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)),
  37150. startIndex,
  37151. stopIndex
  37152. ];
  37153. });
  37154. const rowsToRender = computed(() => {
  37155. const { totalColumn, totalRow, rowCache } = props;
  37156. const { isScrolling, yAxisScrollDir, scrollTop } = unref(states);
  37157. if (totalColumn === 0 || totalRow === 0) return [
  37158. 0,
  37159. 0,
  37160. 0,
  37161. 0
  37162. ];
  37163. const startIndex = getRowStartIndexForOffset(props, scrollTop, unref(cache));
  37164. const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, unref(cache));
  37165. const cacheBackward = !isScrolling || yAxisScrollDir === "backward" ? Math.max(1, rowCache) : 1;
  37166. const cacheForward = !isScrolling || yAxisScrollDir === "forward" ? Math.max(1, rowCache) : 1;
  37167. return [
  37168. Math.max(0, startIndex - cacheBackward),
  37169. Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)),
  37170. startIndex,
  37171. stopIndex
  37172. ];
  37173. });
  37174. const estimatedTotalHeight = computed(() => getEstimatedTotalHeight(props, unref(cache)));
  37175. const estimatedTotalWidth = computed(() => getEstimatedTotalWidth(props, unref(cache)));
  37176. const windowStyle = computed(() => [
  37177. {
  37178. position: "relative",
  37179. overflow: "hidden",
  37180. WebkitOverflowScrolling: "touch",
  37181. willChange: "transform"
  37182. },
  37183. {
  37184. direction: props.direction,
  37185. height: isNumber(props.height) ? `${props.height}px` : props.height,
  37186. width: isNumber(props.width) ? `${props.width}px` : props.width
  37187. },
  37188. props.style ?? {}
  37189. ]);
  37190. const innerStyle = computed(() => {
  37191. const width = `${unref(estimatedTotalWidth)}px`;
  37192. return {
  37193. height: `${unref(estimatedTotalHeight)}px`,
  37194. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  37195. width,
  37196. margin: 0,
  37197. boxSizing: "border-box"
  37198. };
  37199. });
  37200. const emitEvents = () => {
  37201. const { totalColumn, totalRow } = props;
  37202. if (totalColumn > 0 && totalRow > 0) {
  37203. const [columnCacheStart, columnCacheEnd, columnVisibleStart, columnVisibleEnd] = unref(columnsToRender);
  37204. const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = unref(rowsToRender);
  37205. emit(ITEM_RENDER_EVT, {
  37206. columnCacheStart,
  37207. columnCacheEnd,
  37208. rowCacheStart,
  37209. rowCacheEnd,
  37210. columnVisibleStart,
  37211. columnVisibleEnd,
  37212. rowVisibleStart,
  37213. rowVisibleEnd
  37214. });
  37215. }
  37216. const { scrollLeft, scrollTop, updateRequested, xAxisScrollDir, yAxisScrollDir } = unref(states);
  37217. emit(SCROLL_EVT, {
  37218. xAxisScrollDir,
  37219. scrollLeft,
  37220. yAxisScrollDir,
  37221. scrollTop,
  37222. updateRequested
  37223. });
  37224. };
  37225. const onScroll = (e) => {
  37226. const { clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth } = e.currentTarget;
  37227. const _states = unref(states);
  37228. if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) return;
  37229. let _scrollLeft = scrollLeft;
  37230. if (isRTL(props.direction)) switch (getRTLOffsetType()) {
  37231. case RTL_OFFSET_NAG:
  37232. _scrollLeft = -scrollLeft;
  37233. break;
  37234. case RTL_OFFSET_POS_DESC:
  37235. _scrollLeft = scrollWidth - clientWidth - scrollLeft;
  37236. break;
  37237. }
  37238. states.value = {
  37239. ..._states,
  37240. isScrolling: true,
  37241. scrollLeft: _scrollLeft,
  37242. scrollTop: Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight)),
  37243. updateRequested: true,
  37244. xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),
  37245. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop)
  37246. };
  37247. nextTick(() => resetIsScrolling());
  37248. onUpdated();
  37249. emitEvents();
  37250. };
  37251. const onVerticalScroll = (distance, totalSteps) => {
  37252. const height = unref(parsedHeight);
  37253. const offset = (estimatedTotalHeight.value - height) / totalSteps * distance;
  37254. scrollTo({ scrollTop: Math.min(estimatedTotalHeight.value - height, offset) });
  37255. };
  37256. const onHorizontalScroll = (distance, totalSteps) => {
  37257. const width = unref(parsedWidth);
  37258. const offset = (estimatedTotalWidth.value - width) / totalSteps * distance;
  37259. scrollTo({ scrollLeft: Math.min(estimatedTotalWidth.value - width, offset) });
  37260. };
  37261. const { onWheel } = useGridWheel({
  37262. atXStartEdge: computed(() => states.value.scrollLeft <= 0),
  37263. atXEndEdge: computed(() => states.value.scrollLeft >= estimatedTotalWidth.value - unref(parsedWidth)),
  37264. atYStartEdge: computed(() => states.value.scrollTop <= 0),
  37265. atYEndEdge: computed(() => states.value.scrollTop >= estimatedTotalHeight.value - unref(parsedHeight))
  37266. }, (x, y) => {
  37267. hScrollbar.value?.onMouseUp?.();
  37268. vScrollbar.value?.onMouseUp?.();
  37269. const width = unref(parsedWidth);
  37270. const height = unref(parsedHeight);
  37271. scrollTo({
  37272. scrollLeft: Math.min(states.value.scrollLeft + x, estimatedTotalWidth.value - width),
  37273. scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height)
  37274. });
  37275. });
  37276. useEventListener(windowRef, "wheel", onWheel, { passive: false });
  37277. const scrollTo = ({ scrollLeft = states.value.scrollLeft, scrollTop = states.value.scrollTop }) => {
  37278. scrollLeft = Math.max(scrollLeft, 0);
  37279. scrollTop = Math.max(scrollTop, 0);
  37280. const _states = unref(states);
  37281. if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) return;
  37282. states.value = {
  37283. ..._states,
  37284. xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),
  37285. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),
  37286. scrollLeft,
  37287. scrollTop,
  37288. updateRequested: true
  37289. };
  37290. nextTick(() => resetIsScrolling());
  37291. onUpdated();
  37292. emitEvents();
  37293. };
  37294. const { touchStartX, touchStartY, handleTouchStart, handleTouchMove } = useGridTouch(windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight);
  37295. const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => {
  37296. const _states = unref(states);
  37297. columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1));
  37298. rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1));
  37299. const scrollBarWidth = getScrollBarWidth(ns.namespace.value);
  37300. const _cache = unref(cache);
  37301. const estimatedHeight = getEstimatedTotalHeight(props, _cache);
  37302. const estimatedWidth = getEstimatedTotalWidth(props, _cache);
  37303. scrollTo({
  37304. scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth : 0),
  37305. scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth : 0)
  37306. });
  37307. };
  37308. const getItemStyle = (rowIndex, columnIndex) => {
  37309. const { columnWidth, direction, rowHeight } = props;
  37310. const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction);
  37311. const key = `${rowIndex},${columnIndex}`;
  37312. if (hasOwn(itemStyleCache, key)) return itemStyleCache[key];
  37313. else {
  37314. const [, left] = getColumnPosition(props, columnIndex, unref(cache));
  37315. const _cache = unref(cache);
  37316. const rtl = isRTL(direction);
  37317. const [height, top] = getRowPosition(props, rowIndex, _cache);
  37318. const [width] = getColumnPosition(props, columnIndex, _cache);
  37319. itemStyleCache[key] = {
  37320. position: "absolute",
  37321. left: rtl ? void 0 : `${left}px`,
  37322. right: rtl ? `${left}px` : void 0,
  37323. top: `${top}px`,
  37324. height: `${height}px`,
  37325. width: `${width}px`
  37326. };
  37327. return itemStyleCache[key];
  37328. }
  37329. };
  37330. const resetIsScrolling = () => {
  37331. states.value.isScrolling = false;
  37332. nextTick(() => {
  37333. getItemStyleCache.value(-1, null, null);
  37334. });
  37335. };
  37336. onMounted(() => {
  37337. if (!isClient) return;
  37338. const { initScrollLeft, initScrollTop } = props;
  37339. const windowElement = unref(windowRef);
  37340. if (windowElement) {
  37341. if (isNumber(initScrollLeft)) windowElement.scrollLeft = initScrollLeft;
  37342. if (isNumber(initScrollTop)) windowElement.scrollTop = initScrollTop;
  37343. }
  37344. emitEvents();
  37345. });
  37346. const onUpdated = () => {
  37347. const { direction } = props;
  37348. const { scrollLeft, scrollTop, updateRequested } = unref(states);
  37349. const windowElement = unref(windowRef);
  37350. if (updateRequested && windowElement) {
  37351. if (direction === "rtl") switch (getRTLOffsetType()) {
  37352. case RTL_OFFSET_NAG:
  37353. windowElement.scrollLeft = -scrollLeft;
  37354. break;
  37355. case RTL_OFFSET_POS_ASC:
  37356. windowElement.scrollLeft = scrollLeft;
  37357. break;
  37358. default: {
  37359. const { clientWidth, scrollWidth } = windowElement;
  37360. windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft;
  37361. break;
  37362. }
  37363. }
  37364. else windowElement.scrollLeft = Math.max(0, scrollLeft);
  37365. windowElement.scrollTop = Math.max(0, scrollTop);
  37366. }
  37367. };
  37368. const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } = instance.proxy;
  37369. expose({
  37370. windowRef,
  37371. innerRef,
  37372. getItemStyleCache,
  37373. touchStartX,
  37374. touchStartY,
  37375. handleTouchStart,
  37376. handleTouchMove,
  37377. scrollTo,
  37378. scrollToItem,
  37379. states,
  37380. resetAfterColumnIndex,
  37381. resetAfterRowIndex,
  37382. resetAfter
  37383. });
  37384. const renderScrollbars = () => {
  37385. const { scrollbarAlwaysOn, scrollbarStartGap, scrollbarEndGap, totalColumn, totalRow } = props;
  37386. const width = unref(parsedWidth);
  37387. const height = unref(parsedHeight);
  37388. const estimatedWidth = unref(estimatedTotalWidth);
  37389. const estimatedHeight = unref(estimatedTotalHeight);
  37390. const { scrollLeft, scrollTop } = unref(states);
  37391. return {
  37392. horizontalScrollbar: h$1(ScrollBar, {
  37393. ref: hScrollbar,
  37394. alwaysOn: scrollbarAlwaysOn,
  37395. startGap: scrollbarStartGap,
  37396. endGap: scrollbarEndGap,
  37397. class: ns.e("horizontal"),
  37398. clientSize: width,
  37399. layout: "horizontal",
  37400. onScroll: onHorizontalScroll,
  37401. ratio: width * 100 / estimatedWidth,
  37402. scrollFrom: scrollLeft / (estimatedWidth - width),
  37403. total: totalRow,
  37404. visible: true
  37405. }),
  37406. verticalScrollbar: h$1(ScrollBar, {
  37407. ref: vScrollbar,
  37408. alwaysOn: scrollbarAlwaysOn,
  37409. startGap: scrollbarStartGap,
  37410. endGap: scrollbarEndGap,
  37411. class: ns.e("vertical"),
  37412. clientSize: height,
  37413. layout: "vertical",
  37414. onScroll: onVerticalScroll,
  37415. ratio: height * 100 / estimatedHeight,
  37416. scrollFrom: scrollTop / (estimatedHeight - height),
  37417. total: totalColumn,
  37418. visible: true
  37419. })
  37420. };
  37421. };
  37422. const renderItems = () => {
  37423. const [columnStart, columnEnd] = unref(columnsToRender);
  37424. const [rowStart, rowEnd] = unref(rowsToRender);
  37425. const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props;
  37426. const children = [];
  37427. if (totalRow > 0 && totalColumn > 0) for (let row = rowStart; row <= rowEnd; row++) for (let column = columnStart; column <= columnEnd; column++) {
  37428. const key = itemKey({
  37429. columnIndex: column,
  37430. data,
  37431. rowIndex: row
  37432. });
  37433. children.push(h$1(Fragment, { key }, slots.default?.({
  37434. columnIndex: column,
  37435. data,
  37436. isScrolling: useIsScrolling ? unref(states).isScrolling : void 0,
  37437. style: getItemStyle(row, column),
  37438. rowIndex: row
  37439. })));
  37440. }
  37441. return children;
  37442. };
  37443. const renderInner = () => {
  37444. const Inner = resolveDynamicComponent(props.innerElement);
  37445. const children = renderItems();
  37446. return [h$1(Inner, mergeProps(props.innerProps, {
  37447. style: unref(innerStyle),
  37448. ref: innerRef
  37449. }), !isString(Inner) ? { default: () => children } : children)];
  37450. };
  37451. const renderWindow = () => {
  37452. const Container = resolveDynamicComponent(props.containerElement);
  37453. const { horizontalScrollbar, verticalScrollbar } = renderScrollbars();
  37454. const Inner = renderInner();
  37455. return h$1("div", {
  37456. key: 0,
  37457. class: ns.e("wrapper"),
  37458. role: props.role
  37459. }, [
  37460. h$1(Container, {
  37461. class: props.className,
  37462. style: unref(windowStyle),
  37463. onScroll,
  37464. ref: windowRef
  37465. }, !isString(Container) ? { default: () => Inner } : Inner),
  37466. horizontalScrollbar,
  37467. verticalScrollbar
  37468. ]);
  37469. };
  37470. return renderWindow;
  37471. }
  37472. });
  37473. };
  37474. //#endregion
  37475. //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs
  37476. var SCOPE$5 = "ElFixedSizeGrid";
  37477. var FixedSizeGrid = createGrid({
  37478. name: "ElFixedSizeGrid",
  37479. getColumnPosition: ({ columnWidth }, index) => [columnWidth, index * columnWidth],
  37480. getRowPosition: ({ rowHeight }, index) => [rowHeight, index * rowHeight],
  37481. getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow,
  37482. getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn,
  37483. getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _, scrollBarWidth) => {
  37484. width = Number(width);
  37485. const lastColumnOffset = Math.max(0, totalColumn * columnWidth - width);
  37486. const maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);
  37487. const minOffset = Math.max(0, columnIndex * columnWidth - width + scrollBarWidth + columnWidth);
  37488. if (alignment === "smart") if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) alignment = AUTO_ALIGNMENT;
  37489. else alignment = CENTERED_ALIGNMENT;
  37490. switch (alignment) {
  37491. case START_ALIGNMENT: return maxOffset;
  37492. case "end": return minOffset;
  37493. case CENTERED_ALIGNMENT: {
  37494. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  37495. if (middleOffset < Math.ceil(width / 2)) return 0;
  37496. else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) return lastColumnOffset;
  37497. else return middleOffset;
  37498. }
  37499. case AUTO_ALIGNMENT:
  37500. default: if (scrollLeft >= minOffset && scrollLeft <= maxOffset) return scrollLeft;
  37501. else if (minOffset > maxOffset) return minOffset;
  37502. else if (scrollLeft < minOffset) return minOffset;
  37503. else return maxOffset;
  37504. }
  37505. },
  37506. getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _, scrollBarWidth) => {
  37507. height = Number(height);
  37508. const lastRowOffset = Math.max(0, totalRow * rowHeight - height);
  37509. const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);
  37510. const minOffset = Math.max(0, rowIndex * rowHeight - height + scrollBarWidth + rowHeight);
  37511. if (align === "smart") if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) align = AUTO_ALIGNMENT;
  37512. else align = CENTERED_ALIGNMENT;
  37513. switch (align) {
  37514. case START_ALIGNMENT: return maxOffset;
  37515. case "end": return minOffset;
  37516. case CENTERED_ALIGNMENT: {
  37517. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  37518. if (middleOffset < Math.ceil(height / 2)) return 0;
  37519. else if (middleOffset > lastRowOffset + Math.floor(height / 2)) return lastRowOffset;
  37520. else return middleOffset;
  37521. }
  37522. case AUTO_ALIGNMENT:
  37523. default: if (scrollTop >= minOffset && scrollTop <= maxOffset) return scrollTop;
  37524. else if (minOffset > maxOffset) return minOffset;
  37525. else if (scrollTop < minOffset) return minOffset;
  37526. else return maxOffset;
  37527. }
  37528. },
  37529. getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),
  37530. getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {
  37531. const left = startIndex * columnWidth;
  37532. const visibleColumnsCount = Math.ceil((width + scrollLeft - left) / columnWidth);
  37533. return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));
  37534. },
  37535. getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),
  37536. getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {
  37537. const top = startIndex * rowHeight;
  37538. const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
  37539. return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));
  37540. },
  37541. initCache: () => void 0,
  37542. clearCache: true,
  37543. validateProps: ({ columnWidth, rowHeight }) => {
  37544. if (!isNumber(columnWidth)) throwError(SCOPE$5, `
  37545. "columnWidth" must be passed as number,
  37546. instead ${typeof columnWidth} was given.
  37547. `);
  37548. if (!isNumber(rowHeight)) throwError(SCOPE$5, `
  37549. "columnWidth" must be passed as number,
  37550. instead ${typeof rowHeight} was given.
  37551. `);
  37552. }
  37553. });
  37554. //#endregion
  37555. //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs
  37556. var { max, min, floor } = Math;
  37557. var SCOPE$4 = "ElDynamicSizeGrid";
  37558. var ACCESS_SIZER_KEY_MAP = {
  37559. column: "columnWidth",
  37560. row: "rowHeight"
  37561. };
  37562. var ACCESS_LAST_VISITED_KEY_MAP = {
  37563. column: "lastVisitedColumnIndex",
  37564. row: "lastVisitedRowIndex"
  37565. };
  37566. var getItemFromCache = (props, index, gridCache, type) => {
  37567. const [cachedItems, sizer, lastVisited] = [
  37568. gridCache[type],
  37569. props[ACCESS_SIZER_KEY_MAP[type]],
  37570. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]
  37571. ];
  37572. if (index > lastVisited) {
  37573. let offset = 0;
  37574. if (lastVisited >= 0) {
  37575. const item = cachedItems[lastVisited];
  37576. offset = item.offset + item.size;
  37577. }
  37578. for (let i = lastVisited + 1; i <= index; i++) {
  37579. const size = sizer(i);
  37580. cachedItems[i] = {
  37581. offset,
  37582. size
  37583. };
  37584. offset += size;
  37585. }
  37586. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index;
  37587. }
  37588. return cachedItems[index];
  37589. };
  37590. var bs = (props, gridCache, low, high, offset, type) => {
  37591. while (low <= high) {
  37592. const mid = low + floor((high - low) / 2);
  37593. const currentOffset = getItemFromCache(props, mid, gridCache, type).offset;
  37594. if (currentOffset === offset) return mid;
  37595. else if (currentOffset < offset) low = mid + 1;
  37596. else high = mid - 1;
  37597. }
  37598. return max(0, low - 1);
  37599. };
  37600. var es = (props, gridCache, idx, offset, type) => {
  37601. const total = type === "column" ? props.totalColumn : props.totalRow;
  37602. let exponent = 1;
  37603. while (idx < total && getItemFromCache(props, idx, gridCache, type).offset < offset) {
  37604. idx += exponent;
  37605. exponent *= 2;
  37606. }
  37607. return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);
  37608. };
  37609. var findItem = (props, gridCache, offset, type) => {
  37610. const [cache, lastVisitedIndex] = [gridCache[type], gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]];
  37611. if ((lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0) >= offset) return bs(props, gridCache, 0, lastVisitedIndex, offset, type);
  37612. return es(props, gridCache, max(0, lastVisitedIndex), offset, type);
  37613. };
  37614. var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
  37615. let sizeOfVisitedRows = 0;
  37616. if (lastVisitedRowIndex >= totalRow) lastVisitedRowIndex = totalRow - 1;
  37617. if (lastVisitedRowIndex >= 0) {
  37618. const item = row[lastVisitedRowIndex];
  37619. sizeOfVisitedRows = item.offset + item.size;
  37620. }
  37621. const sizeOfUnvisitedItems = (totalRow - lastVisitedRowIndex - 1) * estimatedRowHeight;
  37622. return sizeOfVisitedRows + sizeOfUnvisitedItems;
  37623. };
  37624. var getEstimatedTotalWidth = ({ totalColumn }, { column, estimatedColumnWidth, lastVisitedColumnIndex }) => {
  37625. let sizeOfVisitedColumns = 0;
  37626. if (lastVisitedColumnIndex > totalColumn) lastVisitedColumnIndex = totalColumn - 1;
  37627. if (lastVisitedColumnIndex >= 0) {
  37628. const item = column[lastVisitedColumnIndex];
  37629. sizeOfVisitedColumns = item.offset + item.size;
  37630. }
  37631. const sizeOfUnvisitedItems = (totalColumn - lastVisitedColumnIndex - 1) * estimatedColumnWidth;
  37632. return sizeOfVisitedColumns + sizeOfUnvisitedItems;
  37633. };
  37634. var ACCESS_ESTIMATED_SIZE_KEY_MAP = {
  37635. column: getEstimatedTotalWidth,
  37636. row: getEstimatedTotalHeight
  37637. };
  37638. var getOffset$1 = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {
  37639. const [size, estimatedSizeAssociates] = [type === "row" ? props.height : props.width, ACCESS_ESTIMATED_SIZE_KEY_MAP[type]];
  37640. const item = getItemFromCache(props, index, cache, type);
  37641. const maxOffset = max(0, min(estimatedSizeAssociates(props, cache) - size, item.offset));
  37642. const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
  37643. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  37644. else alignment = CENTERED_ALIGNMENT;
  37645. switch (alignment) {
  37646. case START_ALIGNMENT: return maxOffset;
  37647. case "end": return minOffset;
  37648. case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
  37649. case AUTO_ALIGNMENT:
  37650. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  37651. else if (minOffset > maxOffset) return minOffset;
  37652. else if (scrollOffset < minOffset) return minOffset;
  37653. else return maxOffset;
  37654. }
  37655. };
  37656. var DynamicSizeGrid = createGrid({
  37657. name: "ElDynamicSizeGrid",
  37658. getColumnPosition: (props, idx, cache) => {
  37659. const item = getItemFromCache(props, idx, cache, "column");
  37660. return [item.size, item.offset];
  37661. },
  37662. getRowPosition: (props, idx, cache) => {
  37663. const item = getItemFromCache(props, idx, cache, "row");
  37664. return [item.size, item.offset];
  37665. },
  37666. getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset$1(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
  37667. getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset$1(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
  37668. getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem(props, cache, scrollLeft, "column"),
  37669. getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {
  37670. const item = getItemFromCache(props, startIndex, cache, "column");
  37671. const maxOffset = scrollLeft + props.width;
  37672. let offset = item.offset + item.size;
  37673. let stopIndex = startIndex;
  37674. while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {
  37675. stopIndex++;
  37676. offset += getItemFromCache(props, startIndex, cache, "column").size;
  37677. }
  37678. return stopIndex;
  37679. },
  37680. getEstimatedTotalHeight,
  37681. getEstimatedTotalWidth,
  37682. getRowStartIndexForOffset: (props, scrollTop, cache) => findItem(props, cache, scrollTop, "row"),
  37683. getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {
  37684. const { totalRow, height } = props;
  37685. const item = getItemFromCache(props, startIndex, cache, "row");
  37686. const maxOffset = scrollTop + height;
  37687. let offset = item.size + item.offset;
  37688. let stopIndex = startIndex;
  37689. while (stopIndex < totalRow - 1 && offset < maxOffset) {
  37690. stopIndex++;
  37691. offset += getItemFromCache(props, stopIndex, cache, "row").size;
  37692. }
  37693. return stopIndex;
  37694. },
  37695. injectToInstance: (instance, cache) => {
  37696. const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => {
  37697. forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate;
  37698. if (isNumber(columnIndex)) cache.value.lastVisitedColumnIndex = Math.min(cache.value.lastVisitedColumnIndex, columnIndex - 1);
  37699. if (isNumber(rowIndex)) cache.value.lastVisitedRowIndex = Math.min(cache.value.lastVisitedRowIndex, rowIndex - 1);
  37700. instance.exposed?.getItemStyleCache.value(-1, null, null);
  37701. if (forceUpdate) instance.proxy?.$forceUpdate();
  37702. };
  37703. const resetAfterColumnIndex = (columnIndex, forceUpdate) => {
  37704. resetAfter({ columnIndex }, forceUpdate);
  37705. };
  37706. const resetAfterRowIndex = (rowIndex, forceUpdate) => {
  37707. resetAfter({ rowIndex }, forceUpdate);
  37708. };
  37709. Object.assign(instance.proxy, {
  37710. resetAfterColumnIndex,
  37711. resetAfterRowIndex,
  37712. resetAfter
  37713. });
  37714. },
  37715. initCache: ({ estimatedColumnWidth = 50, estimatedRowHeight = 50 }) => {
  37716. return {
  37717. column: {},
  37718. estimatedColumnWidth,
  37719. estimatedRowHeight,
  37720. lastVisitedColumnIndex: -1,
  37721. lastVisitedRowIndex: -1,
  37722. row: {}
  37723. };
  37724. },
  37725. clearCache: false,
  37726. validateProps: ({ columnWidth, rowHeight }) => {
  37727. if (!isFunction$1(columnWidth)) throwError(SCOPE$4, `
  37728. "columnWidth" must be passed as function,
  37729. instead ${typeof columnWidth} was given.
  37730. `);
  37731. if (!isFunction$1(rowHeight)) throwError(SCOPE$4, `
  37732. "rowHeight" must be passed as function,
  37733. instead ${typeof rowHeight} was given.
  37734. `);
  37735. }
  37736. });
  37737. //#endregion
  37738. //#region node_modules/element-plus/es/components/select-v2/src/token.mjs
  37739. var selectV2InjectionKey = Symbol("ElSelectV2Injection");
  37740. //#endregion
  37741. //#region node_modules/element-plus/es/components/select-v2/src/defaults.mjs
  37742. var selectV2Props = buildProps({
  37743. allowCreate: Boolean,
  37744. autocomplete: {
  37745. type: definePropType(String),
  37746. default: "none"
  37747. },
  37748. automaticDropdown: Boolean,
  37749. clearable: Boolean,
  37750. clearIcon: {
  37751. type: iconPropType,
  37752. default: circle_close_default
  37753. },
  37754. effect: {
  37755. type: definePropType(String),
  37756. default: "light"
  37757. },
  37758. collapseTags: Boolean,
  37759. collapseTagsTooltip: Boolean,
  37760. tagTooltip: {
  37761. type: definePropType(Object),
  37762. default: () => ({})
  37763. },
  37764. maxCollapseTags: {
  37765. type: Number,
  37766. default: 1
  37767. },
  37768. defaultFirstOption: Boolean,
  37769. disabled: {
  37770. type: Boolean,
  37771. default: void 0
  37772. },
  37773. estimatedOptionHeight: {
  37774. type: Number,
  37775. default: void 0
  37776. },
  37777. filterable: Boolean,
  37778. filterMethod: { type: definePropType(Function) },
  37779. height: {
  37780. type: Number,
  37781. default: 274
  37782. },
  37783. itemHeight: {
  37784. type: Number,
  37785. default: 34
  37786. },
  37787. id: String,
  37788. loading: Boolean,
  37789. loadingText: String,
  37790. modelValue: {
  37791. type: definePropType([
  37792. Array,
  37793. String,
  37794. Number,
  37795. Boolean,
  37796. Object
  37797. ]),
  37798. default: void 0
  37799. },
  37800. multiple: Boolean,
  37801. multipleLimit: {
  37802. type: Number,
  37803. default: 0
  37804. },
  37805. name: String,
  37806. noDataText: String,
  37807. noMatchText: String,
  37808. remoteMethod: { type: definePropType(Function) },
  37809. reserveKeyword: {
  37810. type: Boolean,
  37811. default: true
  37812. },
  37813. options: {
  37814. type: definePropType(Array),
  37815. required: true
  37816. },
  37817. placeholder: { type: String },
  37818. teleported: useTooltipContentProps.teleported,
  37819. persistent: {
  37820. type: Boolean,
  37821. default: true
  37822. },
  37823. popperClass: useTooltipContentProps.popperClass,
  37824. popperStyle: useTooltipContentProps.popperStyle,
  37825. popperOptions: {
  37826. type: definePropType(Object),
  37827. default: () => ({})
  37828. },
  37829. remote: Boolean,
  37830. debounce: {
  37831. type: Number,
  37832. default: 300
  37833. },
  37834. size: useSizeProp,
  37835. props: {
  37836. type: definePropType(Object),
  37837. default: () => defaultProps$2
  37838. },
  37839. valueKey: {
  37840. type: String,
  37841. default: "value"
  37842. },
  37843. scrollbarAlwaysOn: Boolean,
  37844. validateEvent: {
  37845. type: Boolean,
  37846. default: true
  37847. },
  37848. offset: {
  37849. type: Number,
  37850. default: 12
  37851. },
  37852. remoteShowSuffix: Boolean,
  37853. showArrow: {
  37854. type: Boolean,
  37855. default: true
  37856. },
  37857. placement: {
  37858. type: definePropType(String),
  37859. values: Ee,
  37860. default: "bottom-start"
  37861. },
  37862. fallbackPlacements: {
  37863. type: definePropType(Array),
  37864. default: [
  37865. "bottom-start",
  37866. "top-start",
  37867. "right",
  37868. "left"
  37869. ]
  37870. },
  37871. tagType: {
  37872. ...tagProps.type,
  37873. default: "info"
  37874. },
  37875. tagEffect: {
  37876. ...tagProps.effect,
  37877. default: "light"
  37878. },
  37879. tabindex: {
  37880. type: [String, Number],
  37881. default: 0
  37882. },
  37883. appendTo: useTooltipContentProps.appendTo,
  37884. fitInputWidth: {
  37885. type: [Boolean, Number],
  37886. default: true,
  37887. validator(val) {
  37888. return isBoolean(val) || isNumber(val);
  37889. }
  37890. },
  37891. suffixIcon: {
  37892. type: iconPropType,
  37893. default: arrow_down_default
  37894. },
  37895. ...useEmptyValuesProps,
  37896. ...useAriaProps(["ariaLabel"])
  37897. });
  37898. var optionV2Props = buildProps({
  37899. data: Array,
  37900. disabled: Boolean,
  37901. hovering: Boolean,
  37902. item: {
  37903. type: definePropType(Object),
  37904. required: true
  37905. },
  37906. index: Number,
  37907. style: Object,
  37908. selected: Boolean,
  37909. created: Boolean
  37910. });
  37911. var selectV2Emits = {
  37912. [UPDATE_MODEL_EVENT]: (val) => true,
  37913. [CHANGE_EVENT]: (val) => true,
  37914. "remove-tag": (val) => true,
  37915. "visible-change": (visible) => true,
  37916. focus: (evt) => evt instanceof FocusEvent,
  37917. blur: (evt) => evt instanceof FocusEvent,
  37918. clear: () => true
  37919. };
  37920. var optionV2Emits = {
  37921. hover: (index) => isNumber(index),
  37922. select: (val, index) => true
  37923. };
  37924. //#endregion
  37925. //#region node_modules/element-plus/es/components/select-v2/src/group-item.vue_vue_type_script_lang.mjs
  37926. var group_item_vue_vue_type_script_lang_default = defineComponent({
  37927. props: {
  37928. item: {
  37929. type: Object,
  37930. required: true
  37931. },
  37932. style: { type: Object },
  37933. height: Number
  37934. },
  37935. setup() {
  37936. return { ns: useNamespace("select") };
  37937. }
  37938. });
  37939. //#endregion
  37940. //#region node_modules/element-plus/es/components/select-v2/src/group-item.mjs
  37941. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  37942. return openBlock(), createElementBlock("div", {
  37943. class: normalizeClass(_ctx.ns.be("group", "title")),
  37944. style: normalizeStyle({
  37945. ..._ctx.style,
  37946. lineHeight: `${_ctx.height}px`
  37947. })
  37948. }, toDisplayString(_ctx.item.label), 7);
  37949. }
  37950. var group_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(group_item_vue_vue_type_script_lang_default, [["render", _sfc_render$7]]);
  37951. //#endregion
  37952. //#region node_modules/element-plus/es/components/select-v2/src/useOption.mjs
  37953. function useOption(props, { emit }) {
  37954. return {
  37955. hoverItem: () => {
  37956. if (!props.disabled) emit("hover", props.index);
  37957. },
  37958. selectOptionClick: () => {
  37959. if (!props.disabled) emit("select", props.item, props.index);
  37960. }
  37961. };
  37962. }
  37963. //#endregion
  37964. //#region node_modules/element-plus/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs
  37965. var option_item_vue_vue_type_script_lang_default = defineComponent({
  37966. props: optionV2Props,
  37967. emits: optionV2Emits,
  37968. setup(props, { emit }) {
  37969. const select = inject(selectV2InjectionKey);
  37970. const ns = useNamespace("select");
  37971. const { hoverItem, selectOptionClick } = useOption(props, { emit });
  37972. const { getLabel } = useProps(select.props);
  37973. return {
  37974. ns,
  37975. contentId: select.contentId,
  37976. hoverItem,
  37977. selectOptionClick,
  37978. getLabel
  37979. };
  37980. }
  37981. });
  37982. //#endregion
  37983. //#region node_modules/element-plus/es/components/select-v2/src/option-item.mjs
  37984. var _hoisted_1$22 = [
  37985. "id",
  37986. "aria-selected",
  37987. "aria-disabled"
  37988. ];
  37989. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  37990. return openBlock(), createElementBlock("li", {
  37991. id: `${_ctx.contentId}-${_ctx.index}`,
  37992. role: "option",
  37993. "aria-selected": _ctx.selected,
  37994. "aria-disabled": _ctx.disabled || void 0,
  37995. style: normalizeStyle(_ctx.style),
  37996. class: normalizeClass([
  37997. _ctx.ns.be("dropdown", "item"),
  37998. _ctx.ns.is("selected", _ctx.selected),
  37999. _ctx.ns.is("disabled", _ctx.disabled),
  38000. _ctx.ns.is("created", _ctx.created),
  38001. _ctx.ns.is("hovering", _ctx.hovering)
  38002. ]),
  38003. onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
  38004. onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  38005. }, [renderSlot(_ctx.$slots, "default", {
  38006. item: _ctx.item,
  38007. index: _ctx.index,
  38008. disabled: _ctx.disabled
  38009. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.getLabel(_ctx.item)), 1)])], 46, _hoisted_1$22);
  38010. }
  38011. var option_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_item_vue_vue_type_script_lang_default, [["render", _sfc_render$6]]);
  38012. //#endregion
  38013. //#region node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs
  38014. var select_dropdown_default = /* @__PURE__ */ defineComponent({
  38015. name: "ElSelectDropdown",
  38016. props: {
  38017. loading: Boolean,
  38018. data: {
  38019. type: Array,
  38020. required: true
  38021. },
  38022. hoveringIndex: Number,
  38023. width: Number,
  38024. id: String,
  38025. ariaLabel: String
  38026. },
  38027. setup(props, { slots, expose }) {
  38028. const select = inject(selectV2InjectionKey);
  38029. const ns = useNamespace("select");
  38030. const { getLabel, getValue, getDisabled } = useProps(select.props);
  38031. const cachedHeights = ref([]);
  38032. const listRef = ref();
  38033. const size = computed(() => props.data.length);
  38034. watch(() => size.value, () => {
  38035. select.tooltipRef.value?.updatePopper?.();
  38036. });
  38037. const isSized = computed(() => isUndefined(select.props.estimatedOptionHeight));
  38038. const listProps = computed(() => {
  38039. if (isSized.value) return { itemSize: select.props.itemHeight };
  38040. return {
  38041. estimatedSize: select.props.estimatedOptionHeight,
  38042. itemSize: (idx) => cachedHeights.value[idx]
  38043. };
  38044. });
  38045. const contains = (arr = [], target) => {
  38046. const { props: { valueKey } } = select;
  38047. if (!isObject$2(target)) return arr.includes(target);
  38048. return arr && arr.some((item) => {
  38049. return toRaw(get(item, valueKey)) === get(target, valueKey);
  38050. });
  38051. };
  38052. const isEqual = (selected, target) => {
  38053. if (!isObject$2(target)) return selected === target;
  38054. else {
  38055. const { valueKey } = select.props;
  38056. return get(selected, valueKey) === get(target, valueKey);
  38057. }
  38058. };
  38059. const isItemSelected = (modelValue, target) => {
  38060. if (select.props.multiple) return contains(modelValue, getValue(target));
  38061. return isEqual(modelValue, getValue(target));
  38062. };
  38063. const isItemDisabled = (modelValue, selected) => {
  38064. const { disabled, multiple, multipleLimit } = select.props;
  38065. return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
  38066. };
  38067. const isItemHovering = (target) => props.hoveringIndex === target;
  38068. const scrollToItem = (index) => {
  38069. const list = listRef.value;
  38070. if (list) list.scrollToItem(index);
  38071. };
  38072. const resetScrollTop = () => {
  38073. const list = listRef.value;
  38074. if (list) list.resetScrollTop();
  38075. };
  38076. expose({
  38077. listRef,
  38078. isSized,
  38079. isItemDisabled,
  38080. isItemHovering,
  38081. isItemSelected,
  38082. scrollToItem,
  38083. resetScrollTop
  38084. });
  38085. const Item = (itemProps) => {
  38086. const { index, data, style } = itemProps;
  38087. const sized = unref(isSized);
  38088. const { itemSize, estimatedSize } = unref(listProps);
  38089. const { modelValue } = select.props;
  38090. const { onSelect, onHover } = select;
  38091. const item = data[index];
  38092. if (item.type === "Group") return createVNode(group_item_default, {
  38093. "item": item,
  38094. "style": style,
  38095. "height": sized ? itemSize : estimatedSize
  38096. }, null);
  38097. const isSelected = isItemSelected(modelValue, item);
  38098. const isDisabled = isItemDisabled(modelValue, isSelected);
  38099. const isHovering = isItemHovering(index);
  38100. return createVNode(option_item_default, mergeProps(itemProps, {
  38101. "selected": isSelected,
  38102. "disabled": getDisabled(item) || isDisabled,
  38103. "created": !!item.created,
  38104. "hovering": isHovering,
  38105. "item": item,
  38106. "onSelect": onSelect,
  38107. "onHover": onHover
  38108. }), { default: (props) => slots.default?.(props) || createVNode("span", null, [getLabel(item)]) });
  38109. };
  38110. const { onKeyboardNavigate, onKeyboardSelect } = select;
  38111. const onForward = () => {
  38112. onKeyboardNavigate("forward");
  38113. };
  38114. const onBackward = () => {
  38115. onKeyboardNavigate("backward");
  38116. };
  38117. const onEscOrTab = () => {};
  38118. const onKeydown = (e) => {
  38119. const code = getEventCode(e);
  38120. const { tab, esc, down, up, enter, numpadEnter } = EVENT_CODE;
  38121. if ([
  38122. esc,
  38123. down,
  38124. up,
  38125. enter,
  38126. numpadEnter
  38127. ].includes(code)) {
  38128. e.preventDefault();
  38129. e.stopPropagation();
  38130. }
  38131. switch (code) {
  38132. case tab:
  38133. case esc:
  38134. onEscOrTab();
  38135. break;
  38136. case down:
  38137. onForward();
  38138. break;
  38139. case up:
  38140. onBackward();
  38141. break;
  38142. case enter:
  38143. case numpadEnter:
  38144. onKeyboardSelect();
  38145. break;
  38146. }
  38147. };
  38148. return () => {
  38149. const { data, width } = props;
  38150. const { height, multiple, scrollbarAlwaysOn } = select.props;
  38151. const isScrollbarAlwaysOn = computed(() => {
  38152. return isIOS ? true : scrollbarAlwaysOn;
  38153. });
  38154. const List = unref(isSized) ? FixedSizeList : DynamicSizeList;
  38155. return createVNode("div", {
  38156. "class": [ns.b("dropdown"), ns.is("multiple", multiple)],
  38157. "style": { width: `${width}px` }
  38158. }, [
  38159. slots.header?.(),
  38160. slots.loading?.() || slots.empty?.() || createVNode(List, mergeProps({ "ref": listRef }, unref(listProps), {
  38161. "className": ns.be("dropdown", "list"),
  38162. "scrollbarAlwaysOn": isScrollbarAlwaysOn.value,
  38163. "data": data,
  38164. "height": height,
  38165. "width": width,
  38166. "total": data.length,
  38167. "innerElement": "ul",
  38168. "innerProps": {
  38169. id: props.id,
  38170. role: "listbox",
  38171. "aria-label": props.ariaLabel,
  38172. "aria-orientation": "vertical"
  38173. },
  38174. "onKeydown": onKeydown
  38175. }), { default: (props) => createVNode(Item, props, null) }),
  38176. slots.footer?.()
  38177. ]);
  38178. };
  38179. }
  38180. });
  38181. //#endregion
  38182. //#region node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs
  38183. function useAllowCreate(props, states) {
  38184. const { aliasProps, getLabel, getValue } = useProps(props);
  38185. const createOptionCount = ref(0);
  38186. const cachedSelectedOption = ref();
  38187. const enableAllowCreateMode = computed(() => {
  38188. return props.allowCreate && props.filterable;
  38189. });
  38190. watch(() => props.options, (options) => {
  38191. const optionLabelsSet = new Set(options.map((option) => getLabel(option)));
  38192. states.createdOptions = states.createdOptions.filter((createdOption) => !optionLabelsSet.has(getLabel(createdOption)));
  38193. });
  38194. function hasExistingOption(query) {
  38195. const hasOption = (option) => getLabel(option) === query;
  38196. return props.options && props.options.some(hasOption) || states.createdOptions.some(hasOption);
  38197. }
  38198. function selectNewOption(option) {
  38199. if (!enableAllowCreateMode.value) return;
  38200. if (props.multiple && option.created) createOptionCount.value++;
  38201. else cachedSelectedOption.value = option;
  38202. }
  38203. function createNewOption(query) {
  38204. if (enableAllowCreateMode.value) if (query && query.length > 0) {
  38205. if (hasExistingOption(query)) {
  38206. states.createdOptions = states.createdOptions.filter((createdOption) => getLabel(createdOption) !== states.previousQuery);
  38207. return;
  38208. }
  38209. const newOption = {
  38210. [aliasProps.value.value]: query,
  38211. [aliasProps.value.label]: query,
  38212. created: true,
  38213. [aliasProps.value.disabled]: false
  38214. };
  38215. if (states.createdOptions.length >= createOptionCount.value) states.createdOptions[createOptionCount.value] = newOption;
  38216. else states.createdOptions.push(newOption);
  38217. } else if (props.multiple) states.createdOptions.length = createOptionCount.value;
  38218. else {
  38219. const selectedOption = cachedSelectedOption.value;
  38220. states.createdOptions.length = 0;
  38221. if (selectedOption && selectedOption.created) states.createdOptions.push(selectedOption);
  38222. }
  38223. }
  38224. function removeNewOption(option) {
  38225. if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === getLabel(option)) return;
  38226. const idx = states.createdOptions.findIndex((it) => getValue(it) === getValue(option));
  38227. if (~idx) {
  38228. states.createdOptions.splice(idx, 1);
  38229. createOptionCount.value--;
  38230. }
  38231. }
  38232. function clearAllNewOption() {
  38233. if (enableAllowCreateMode.value) {
  38234. states.createdOptions.length = 0;
  38235. createOptionCount.value = 0;
  38236. }
  38237. }
  38238. return {
  38239. createNewOption,
  38240. removeNewOption,
  38241. selectNewOption,
  38242. clearAllNewOption
  38243. };
  38244. }
  38245. //#endregion
  38246. //#region node_modules/element-plus/es/components/select-v2/src/useSelect.mjs
  38247. var useSelect$1 = (props, emit) => {
  38248. const { t } = useLocale();
  38249. const slots = useSlots();
  38250. const nsSelect = useNamespace("select");
  38251. const nsInput = useNamespace("input");
  38252. const { form: elForm, formItem: elFormItem } = useFormItem();
  38253. const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
  38254. const { aliasProps, getLabel, getValue, getDisabled, getOptions } = useProps(props);
  38255. const { valueOnClear, isEmptyValue } = useEmptyValues(props);
  38256. const states = reactive({
  38257. inputValue: "",
  38258. cachedOptions: [],
  38259. createdOptions: [],
  38260. hoveringIndex: -1,
  38261. inputHovering: false,
  38262. selectionWidth: 0,
  38263. collapseItemWidth: 0,
  38264. previousQuery: null,
  38265. previousValue: void 0,
  38266. selectedLabel: "",
  38267. menuVisibleOnFocus: false,
  38268. isBeforeHide: false
  38269. });
  38270. const popperSize = ref(-1);
  38271. const debouncing = ref(false);
  38272. const selectRef = ref();
  38273. const selectionRef = ref();
  38274. const tooltipRef = ref();
  38275. const tagTooltipRef = ref();
  38276. const inputRef = ref();
  38277. const prefixRef = ref();
  38278. const suffixRef = ref();
  38279. const menuRef = ref();
  38280. const tagMenuRef = ref();
  38281. const collapseItemRef = ref();
  38282. const { isComposing, handleCompositionStart, handleCompositionEnd, handleCompositionUpdate } = useComposition({ afterComposition: (e) => onInput(e) });
  38283. const selectDisabled = useFormDisabled();
  38284. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  38285. disabled: selectDisabled,
  38286. afterFocus() {
  38287. if (props.automaticDropdown && !expanded.value) {
  38288. expanded.value = true;
  38289. states.menuVisibleOnFocus = true;
  38290. }
  38291. },
  38292. beforeBlur(event) {
  38293. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  38294. },
  38295. afterBlur() {
  38296. expanded.value = false;
  38297. states.menuVisibleOnFocus = false;
  38298. if (props.validateEvent) elFormItem?.validate?.("blur").catch((err) => debugWarn(err));
  38299. }
  38300. });
  38301. const allOptions = computed(() => filterOptions(""));
  38302. const hasOptions = computed(() => {
  38303. if (props.loading) return false;
  38304. return props.options.length > 0 || states.createdOptions.length > 0;
  38305. });
  38306. const filteredOptions = ref([]);
  38307. const expanded = ref(false);
  38308. const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
  38309. const popupHeight = computed(() => {
  38310. const totalHeight = filteredOptions.value.length * props.itemHeight;
  38311. return totalHeight > props.height ? props.height : totalHeight;
  38312. });
  38313. const hasModelValue = computed(() => {
  38314. return props.multiple ? isArray$1(props.modelValue) && props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
  38315. });
  38316. const showClearBtn = computed(() => {
  38317. return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
  38318. });
  38319. const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
  38320. const iconReverse = computed(() => iconComponent.value && nsSelect.is("reverse", expanded.value));
  38321. const validateState = computed(() => elFormItem?.validateState || "");
  38322. const validateIcon = computed(() => {
  38323. if (!validateState.value) return;
  38324. return ValidateComponentsMap[validateState.value];
  38325. });
  38326. const debounce = computed(() => props.remote ? props.debounce : 0);
  38327. const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && !hasOptions.value);
  38328. const emptyText = computed(() => {
  38329. if (props.loading) return props.loadingText || t("el.select.loading");
  38330. else {
  38331. if (props.filterable && states.inputValue && hasOptions.value && filteredOptions.value.length === 0) return props.noMatchText || t("el.select.noMatch");
  38332. if (!hasOptions.value) return props.noDataText || t("el.select.noData");
  38333. }
  38334. return null;
  38335. });
  38336. const isFilterMethodValid = computed(() => props.filterable && isFunction$1(props.filterMethod));
  38337. const isRemoteMethodValid = computed(() => props.filterable && props.remote && isFunction$1(props.remoteMethod));
  38338. const filterOptions = (query) => {
  38339. const regexp = new RegExp(escapeStringRegexp(query), "i");
  38340. const isValidOption = (o) => {
  38341. if (isFilterMethodValid.value || isRemoteMethodValid.value) return true;
  38342. return query ? regexp.test(getLabel(o) || "") : true;
  38343. };
  38344. if (props.loading) return [];
  38345. return [...states.createdOptions, ...props.options].reduce((all, item) => {
  38346. const options = getOptions(item);
  38347. if (isArray$1(options)) {
  38348. const filtered = options.filter(isValidOption);
  38349. if (filtered.length > 0) all.push({
  38350. label: getLabel(item),
  38351. type: "Group"
  38352. }, ...filtered);
  38353. } else if (props.remote || isValidOption(item)) all.push(item);
  38354. return all;
  38355. }, []);
  38356. };
  38357. const updateOptions = () => {
  38358. filteredOptions.value = filterOptions(states.inputValue);
  38359. };
  38360. const allOptionsValueMap = computed(() => {
  38361. const valueMap = /* @__PURE__ */ new Map();
  38362. allOptions.value.forEach((option, index) => {
  38363. valueMap.set(getValueKey(getValue(option)), {
  38364. option,
  38365. index
  38366. });
  38367. });
  38368. return valueMap;
  38369. });
  38370. const filteredOptionsValueMap = computed(() => {
  38371. const valueMap = /* @__PURE__ */ new Map();
  38372. filteredOptions.value.forEach((option, index) => {
  38373. valueMap.set(getValueKey(getValue(option)), {
  38374. option,
  38375. index
  38376. });
  38377. });
  38378. return valueMap;
  38379. });
  38380. const optionsAllDisabled = computed(() => filteredOptions.value.every((option) => getDisabled(option)));
  38381. const selectSize = useFormSize();
  38382. const collapseTagSize = computed(() => "small" === selectSize.value ? "small" : "default");
  38383. const calculatePopperSize = () => {
  38384. if (isNumber(props.fitInputWidth)) {
  38385. popperSize.value = props.fitInputWidth;
  38386. return;
  38387. }
  38388. const width = selectRef.value?.offsetWidth || 200;
  38389. if (!props.fitInputWidth && hasOptions.value) nextTick(() => {
  38390. popperSize.value = Math.max(width, calculateLabelMaxWidth());
  38391. });
  38392. else popperSize.value = width;
  38393. };
  38394. const calculateLabelMaxWidth = () => {
  38395. const ctx = document.createElement("canvas").getContext("2d");
  38396. const selector = nsSelect.be("dropdown", "item");
  38397. const dropdownItemEl = (menuRef.value?.listRef?.innerRef || document).querySelector(`.${selector}`);
  38398. if (dropdownItemEl === null || ctx === null) return 0;
  38399. const style = getComputedStyle(dropdownItemEl);
  38400. const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
  38401. ctx.font = `bold ${style.font.replace(new RegExp(`\\b${style.fontWeight}\\b`), "")}`;
  38402. return filteredOptions.value.reduce((max, option) => {
  38403. const metrics = ctx.measureText(getLabel(option));
  38404. return Math.max(metrics.width, max);
  38405. }, 0) + padding;
  38406. };
  38407. const getGapWidth = () => {
  38408. if (!selectionRef.value) return 0;
  38409. const style = window.getComputedStyle(selectionRef.value);
  38410. return Number.parseFloat(style.gap || "6px");
  38411. };
  38412. const tagStyle = computed(() => {
  38413. const gapWidth = getGapWidth();
  38414. const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
  38415. return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
  38416. });
  38417. const collapseTagStyle = computed(() => {
  38418. return { maxWidth: `${states.selectionWidth}px` };
  38419. });
  38420. const shouldShowPlaceholder = computed(() => {
  38421. if (isArray$1(props.modelValue)) return props.modelValue.length === 0 && !states.inputValue;
  38422. return props.filterable ? !states.inputValue : true;
  38423. });
  38424. const currentPlaceholder = computed(() => {
  38425. const _placeholder = props.placeholder ?? t("el.select.placeholder");
  38426. return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
  38427. });
  38428. const popperRef = computed(() => tooltipRef.value?.popperRef?.contentRef);
  38429. const indexRef = computed(() => {
  38430. if (props.multiple) {
  38431. const len = props.modelValue.length;
  38432. if (len > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) {
  38433. const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]);
  38434. return index;
  38435. }
  38436. } else if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
  38437. const { index } = filteredOptionsValueMap.value.get(props.modelValue);
  38438. return index;
  38439. }
  38440. return -1;
  38441. });
  38442. const dropdownMenuVisible = computed({
  38443. get() {
  38444. return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery));
  38445. },
  38446. set(val) {
  38447. expanded.value = val;
  38448. }
  38449. });
  38450. const showTagList = computed(() => {
  38451. if (!props.multiple) return [];
  38452. return props.collapseTags ? states.cachedOptions.slice(0, props.maxCollapseTags) : states.cachedOptions;
  38453. });
  38454. const collapseTagList = computed(() => {
  38455. if (!props.multiple) return [];
  38456. return props.collapseTags ? states.cachedOptions.slice(props.maxCollapseTags) : [];
  38457. });
  38458. const { createNewOption, removeNewOption, selectNewOption, clearAllNewOption } = useAllowCreate(props, states);
  38459. const toggleMenu = (event) => {
  38460. if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
  38461. if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
  38462. else expanded.value = !expanded.value;
  38463. };
  38464. const onInputChange = () => {
  38465. if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
  38466. createNewOption(states.inputValue);
  38467. nextTick(() => {
  38468. handleQueryChange(states.inputValue);
  38469. });
  38470. };
  38471. const debouncedOnInputChange = useDebounceFn(() => {
  38472. onInputChange();
  38473. debouncing.value = false;
  38474. }, debounce);
  38475. const handleQueryChange = (val) => {
  38476. if (states.previousQuery === val || isComposing.value) return;
  38477. states.previousQuery = val;
  38478. if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
  38479. else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
  38480. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptions.value.length) nextTick(checkDefaultFirstOption);
  38481. else nextTick(updateHoveringIndex);
  38482. };
  38483. /**
  38484. * find and highlight first option as default selected
  38485. * @remark
  38486. * - if the first option in dropdown list is user-created,
  38487. * it would be at the end of the optionsArray
  38488. * so find it and set hover.
  38489. * (NOTE: there must be only one user-created option in dropdown list with query)
  38490. * - if there's no user-created option in list, just find the first one as usual
  38491. * (NOTE: exclude options that are disabled or in disabled-group)
  38492. */
  38493. const checkDefaultFirstOption = () => {
  38494. const optionsInDropdown = filteredOptions.value.filter((n) => !n.disabled && n.type !== "Group");
  38495. const userCreatedOption = optionsInDropdown.find((n) => n.created);
  38496. const firstOriginOption = optionsInDropdown[0];
  38497. states.hoveringIndex = getValueIndex(filteredOptions.value, userCreatedOption || firstOriginOption);
  38498. };
  38499. const emitChange = (val) => {
  38500. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  38501. };
  38502. const update = (val) => {
  38503. emit(UPDATE_MODEL_EVENT, val);
  38504. emitChange(val);
  38505. states.previousValue = props.multiple ? String(val) : val;
  38506. nextTick(() => {
  38507. if (props.multiple && isArray$1(props.modelValue)) {
  38508. const cachedOptions = states.cachedOptions.slice();
  38509. const selectedOptions = props.modelValue.map((value) => getOption(value, cachedOptions));
  38510. if (!isEqual$1(states.cachedOptions, selectedOptions)) states.cachedOptions = selectedOptions;
  38511. } else initStates(true);
  38512. });
  38513. };
  38514. const getValueIndex = (arr = [], value) => {
  38515. if (!isObject$2(value)) return arr.indexOf(value);
  38516. const valueKey = props.valueKey;
  38517. let index = -1;
  38518. arr.some((item, i) => {
  38519. if (get(item, valueKey) === get(value, valueKey)) {
  38520. index = i;
  38521. return true;
  38522. }
  38523. return false;
  38524. });
  38525. return index;
  38526. };
  38527. const getValueKey = (item) => {
  38528. return isObject$2(item) ? get(item, props.valueKey) : item;
  38529. };
  38530. const handleResize = () => {
  38531. calculatePopperSize();
  38532. };
  38533. const resetSelectionWidth = () => {
  38534. states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
  38535. };
  38536. const resetCollapseItemWidth = () => {
  38537. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  38538. };
  38539. const updateTooltip = () => {
  38540. tooltipRef.value?.updatePopper?.();
  38541. };
  38542. const updateTagTooltip = () => {
  38543. tagTooltipRef.value?.updatePopper?.();
  38544. };
  38545. const onSelect = (option) => {
  38546. const optionValue = getValue(option);
  38547. if (props.multiple) {
  38548. let selectedOptions = props.modelValue.slice();
  38549. const index = getValueIndex(selectedOptions, optionValue);
  38550. if (index > -1) {
  38551. selectedOptions = [...selectedOptions.slice(0, index), ...selectedOptions.slice(index + 1)];
  38552. states.cachedOptions.splice(index, 1);
  38553. removeNewOption(option);
  38554. } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
  38555. selectedOptions = [...selectedOptions, optionValue];
  38556. states.cachedOptions.push(option);
  38557. selectNewOption(option);
  38558. }
  38559. update(selectedOptions);
  38560. if (option.created) handleQueryChange("");
  38561. if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
  38562. } else {
  38563. states.selectedLabel = getLabel(option);
  38564. !isEqual$1(props.modelValue, optionValue) && update(optionValue);
  38565. expanded.value = false;
  38566. selectNewOption(option);
  38567. if (!option.created) clearAllNewOption();
  38568. }
  38569. focus();
  38570. };
  38571. const deleteTag = (event, option) => {
  38572. let selectedOptions = props.modelValue.slice();
  38573. const index = getValueIndex(selectedOptions, getValue(option));
  38574. if (index > -1 && !selectDisabled.value) {
  38575. selectedOptions = [...props.modelValue.slice(0, index), ...props.modelValue.slice(index + 1)];
  38576. states.cachedOptions.splice(index, 1);
  38577. update(selectedOptions);
  38578. emit("remove-tag", getValue(option));
  38579. removeNewOption(option);
  38580. }
  38581. event.stopPropagation();
  38582. focus();
  38583. };
  38584. const focus = () => {
  38585. inputRef.value?.focus();
  38586. };
  38587. const blur = () => {
  38588. if (expanded.value) {
  38589. expanded.value = false;
  38590. nextTick(() => inputRef.value?.blur());
  38591. return;
  38592. }
  38593. inputRef.value?.blur();
  38594. };
  38595. const handleEsc = () => {
  38596. if (states.inputValue.length > 0) states.inputValue = "";
  38597. else expanded.value = false;
  38598. };
  38599. const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => !states.cachedOptions.some((option) => getValue(option) === it && getDisabled(option)));
  38600. const handleDel = (e) => {
  38601. const code = getEventCode(e);
  38602. if (!props.multiple) return;
  38603. if (code === EVENT_CODE.delete) return;
  38604. if (states.inputValue.length === 0) {
  38605. e.preventDefault();
  38606. const selected = props.modelValue.slice();
  38607. const lastNotDisabledIndex = getLastNotDisabledIndex(selected);
  38608. if (lastNotDisabledIndex < 0) return;
  38609. const removeTagValue = selected[lastNotDisabledIndex];
  38610. selected.splice(lastNotDisabledIndex, 1);
  38611. const option = states.cachedOptions[lastNotDisabledIndex];
  38612. states.cachedOptions.splice(lastNotDisabledIndex, 1);
  38613. removeNewOption(option);
  38614. update(selected);
  38615. emit("remove-tag", removeTagValue);
  38616. }
  38617. };
  38618. const handleClear = () => {
  38619. let emptyValue;
  38620. if (isArray$1(props.modelValue)) emptyValue = [];
  38621. else emptyValue = valueOnClear.value;
  38622. states.selectedLabel = "";
  38623. expanded.value = false;
  38624. update(emptyValue);
  38625. emit("clear");
  38626. clearAllNewOption();
  38627. focus();
  38628. };
  38629. const onKeyboardNavigate = (direction, hoveringIndex = void 0) => {
  38630. const options = filteredOptions.value;
  38631. if (!["forward", "backward"].includes(direction) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) return;
  38632. if (!expanded.value) return toggleMenu();
  38633. if (isUndefined(hoveringIndex)) hoveringIndex = states.hoveringIndex;
  38634. let newIndex = -1;
  38635. if (direction === "forward") {
  38636. newIndex = hoveringIndex + 1;
  38637. if (newIndex >= options.length) newIndex = 0;
  38638. } else if (direction === "backward") {
  38639. newIndex = hoveringIndex - 1;
  38640. if (newIndex < 0 || newIndex >= options.length) newIndex = options.length - 1;
  38641. }
  38642. const option = options[newIndex];
  38643. if (getDisabled(option) || option.type === "Group") return onKeyboardNavigate(direction, newIndex);
  38644. else {
  38645. states.hoveringIndex = newIndex;
  38646. scrollToItem(newIndex);
  38647. }
  38648. };
  38649. const onKeyboardSelect = () => {
  38650. if (!expanded.value) return toggleMenu();
  38651. else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) onSelect(filteredOptions.value[states.hoveringIndex]);
  38652. };
  38653. const onHoverOption = (idx) => {
  38654. states.hoveringIndex = idx ?? -1;
  38655. };
  38656. const updateHoveringIndex = () => {
  38657. if (!props.multiple) states.hoveringIndex = filteredOptions.value.findIndex((item) => {
  38658. return getValueKey(getValue(item)) === getValueKey(props.modelValue);
  38659. });
  38660. else {
  38661. const length = props.modelValue.length;
  38662. if (length > 0) {
  38663. const lastValue = props.modelValue[length - 1];
  38664. states.hoveringIndex = filteredOptions.value.findIndex((item) => getValueKey(lastValue) === getValueKey(getValue(item)));
  38665. } else states.hoveringIndex = -1;
  38666. }
  38667. };
  38668. const onInput = (event) => {
  38669. states.inputValue = event.target.value;
  38670. if (props.remote) {
  38671. debouncing.value = true;
  38672. debouncedOnInputChange();
  38673. } else return onInputChange();
  38674. };
  38675. const handleClickOutside = (event) => {
  38676. expanded.value = false;
  38677. if (isFocused.value) handleBlur(new FocusEvent("blur", event));
  38678. };
  38679. const handleMenuEnter = () => {
  38680. states.isBeforeHide = false;
  38681. return nextTick(() => {
  38682. if (~indexRef.value) scrollToItem(indexRef.value);
  38683. });
  38684. };
  38685. const scrollToItem = (index) => {
  38686. menuRef.value.scrollToItem(index);
  38687. };
  38688. const getOption = (value, cachedOptions) => {
  38689. const selectValue = getValueKey(value);
  38690. if (allOptionsValueMap.value.has(selectValue)) {
  38691. const { option } = allOptionsValueMap.value.get(selectValue);
  38692. return option;
  38693. }
  38694. if (cachedOptions && cachedOptions.length) {
  38695. const option = cachedOptions.find((option) => getValueKey(getValue(option)) === selectValue);
  38696. if (option) return option;
  38697. }
  38698. return {
  38699. [aliasProps.value.value]: value,
  38700. [aliasProps.value.label]: value
  38701. };
  38702. };
  38703. const getIndex = (option) => allOptionsValueMap.value.get(getValue(option))?.index ?? -1;
  38704. const initStates = (needUpdateSelectedLabel = false) => {
  38705. if (props.multiple) if (props.modelValue.length > 0) {
  38706. const cachedOptions = states.cachedOptions.slice();
  38707. states.cachedOptions.length = 0;
  38708. states.previousValue = props.modelValue.toString();
  38709. for (const value of props.modelValue) {
  38710. const option = getOption(value, cachedOptions);
  38711. states.cachedOptions.push(option);
  38712. }
  38713. } else {
  38714. states.cachedOptions = [];
  38715. states.previousValue = void 0;
  38716. }
  38717. else if (hasModelValue.value) {
  38718. states.previousValue = props.modelValue;
  38719. const options = filteredOptions.value;
  38720. const selectedItemIndex = options.findIndex((option) => getValueKey(getValue(option)) === getValueKey(props.modelValue));
  38721. if (~selectedItemIndex) states.selectedLabel = getLabel(options[selectedItemIndex]);
  38722. else if (!states.selectedLabel || needUpdateSelectedLabel) states.selectedLabel = getValueKey(props.modelValue);
  38723. } else {
  38724. states.selectedLabel = "";
  38725. states.previousValue = void 0;
  38726. }
  38727. clearAllNewOption();
  38728. calculatePopperSize();
  38729. };
  38730. watch(() => props.fitInputWidth, () => {
  38731. calculatePopperSize();
  38732. });
  38733. watch(expanded, (val) => {
  38734. if (val) {
  38735. if (!props.persistent) calculatePopperSize();
  38736. handleQueryChange("");
  38737. } else {
  38738. states.inputValue = "";
  38739. states.previousQuery = null;
  38740. states.isBeforeHide = true;
  38741. states.menuVisibleOnFocus = false;
  38742. createNewOption("");
  38743. }
  38744. });
  38745. watch(() => props.modelValue, (val, oldVal) => {
  38746. if (!val || isArray$1(val) && val.length === 0 || props.multiple && !isEqual$1(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) initStates(true);
  38747. if (!isEqual$1(val, oldVal) && props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
  38748. }, { deep: true });
  38749. watch(() => props.options, () => {
  38750. const input = inputRef.value;
  38751. if (!input || input && document.activeElement !== input) initStates();
  38752. }, {
  38753. deep: true,
  38754. flush: "post"
  38755. });
  38756. watch(() => filteredOptions.value, () => {
  38757. calculatePopperSize();
  38758. return menuRef.value && nextTick(menuRef.value.resetScrollTop);
  38759. });
  38760. watchEffect(() => {
  38761. if (states.isBeforeHide) return;
  38762. updateOptions();
  38763. });
  38764. watchEffect(() => {
  38765. const { valueKey, options } = props;
  38766. const duplicateValue = /* @__PURE__ */ new Map();
  38767. for (const item of options) {
  38768. const optionValue = getValue(item);
  38769. let v = optionValue;
  38770. if (isObject$2(v)) v = get(optionValue, valueKey);
  38771. if (duplicateValue.get(v)) {
  38772. debugWarn("ElSelectV2", `The option values you provided seem to be duplicated, which may cause some problems, please check.`);
  38773. break;
  38774. } else duplicateValue.set(v, true);
  38775. }
  38776. });
  38777. onMounted(() => {
  38778. initStates();
  38779. });
  38780. useResizeObserver(selectRef, handleResize);
  38781. useResizeObserver(selectionRef, resetSelectionWidth);
  38782. useResizeObserver(wrapperRef, updateTooltip);
  38783. useResizeObserver(tagMenuRef, updateTagTooltip);
  38784. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  38785. let stop;
  38786. watch(() => dropdownMenuVisible.value, (newVal) => {
  38787. if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
  38788. else {
  38789. stop?.();
  38790. stop = void 0;
  38791. }
  38792. emit("visible-change", newVal);
  38793. });
  38794. return {
  38795. inputId,
  38796. collapseTagSize,
  38797. currentPlaceholder,
  38798. expanded,
  38799. emptyText,
  38800. popupHeight,
  38801. debounce,
  38802. allOptions,
  38803. allOptionsValueMap,
  38804. filteredOptions,
  38805. iconComponent,
  38806. iconReverse,
  38807. tagStyle,
  38808. collapseTagStyle,
  38809. popperSize,
  38810. dropdownMenuVisible,
  38811. hasModelValue,
  38812. shouldShowPlaceholder,
  38813. selectDisabled,
  38814. selectSize,
  38815. needStatusIcon,
  38816. showClearBtn,
  38817. states,
  38818. isFocused,
  38819. nsSelect,
  38820. nsInput,
  38821. inputRef,
  38822. menuRef,
  38823. tagMenuRef,
  38824. tooltipRef,
  38825. tagTooltipRef,
  38826. selectRef,
  38827. wrapperRef,
  38828. selectionRef,
  38829. prefixRef,
  38830. suffixRef,
  38831. collapseItemRef,
  38832. popperRef,
  38833. validateState,
  38834. validateIcon,
  38835. showTagList,
  38836. collapseTagList,
  38837. debouncedOnInputChange,
  38838. deleteTag,
  38839. getLabel,
  38840. getValue,
  38841. getDisabled,
  38842. getValueKey,
  38843. getIndex,
  38844. handleClear,
  38845. handleClickOutside,
  38846. handleDel,
  38847. handleEsc,
  38848. focus,
  38849. blur,
  38850. handleMenuEnter,
  38851. handleResize,
  38852. resetSelectionWidth,
  38853. updateTooltip,
  38854. updateTagTooltip,
  38855. updateOptions,
  38856. toggleMenu,
  38857. scrollTo: scrollToItem,
  38858. onInput,
  38859. onKeyboardNavigate,
  38860. onKeyboardSelect,
  38861. onSelect,
  38862. onHover: onHoverOption,
  38863. handleCompositionStart,
  38864. handleCompositionEnd,
  38865. handleCompositionUpdate
  38866. };
  38867. };
  38868. //#endregion
  38869. //#region node_modules/element-plus/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs
  38870. var select_vue_vue_type_script_lang_default = defineComponent({
  38871. name: "ElSelectV2",
  38872. components: {
  38873. ElSelectMenu: select_dropdown_default,
  38874. ElTag,
  38875. ElTooltip,
  38876. ElIcon
  38877. },
  38878. directives: { ClickOutside },
  38879. props: selectV2Props,
  38880. emits: selectV2Emits,
  38881. setup(props, { emit }) {
  38882. const modelValue = computed(() => {
  38883. const { modelValue: rawModelValue, multiple } = props;
  38884. const fallback = multiple ? [] : void 0;
  38885. if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
  38886. return multiple ? fallback : rawModelValue;
  38887. });
  38888. const API = useSelect$1(reactive({
  38889. ...toRefs(props),
  38890. modelValue
  38891. }), emit);
  38892. const { calculatorRef, inputStyle } = useCalcInputWidth();
  38893. const contentId = useId();
  38894. provide(selectV2InjectionKey, {
  38895. props: reactive({
  38896. ...toRefs(props),
  38897. height: API.popupHeight,
  38898. modelValue
  38899. }),
  38900. expanded: API.expanded,
  38901. tooltipRef: API.tooltipRef,
  38902. contentId,
  38903. onSelect: API.onSelect,
  38904. onHover: API.onHover,
  38905. onKeyboardNavigate: API.onKeyboardNavigate,
  38906. onKeyboardSelect: API.onKeyboardSelect
  38907. });
  38908. const selectedLabel = computed(() => {
  38909. if (!props.multiple) return API.states.selectedLabel;
  38910. return API.states.cachedOptions.map((i) => API.getLabel(i));
  38911. });
  38912. return {
  38913. ...API,
  38914. modelValue,
  38915. selectedLabel,
  38916. calculatorRef,
  38917. inputStyle,
  38918. contentId,
  38919. BORDER_HORIZONTAL_WIDTH: 2
  38920. };
  38921. }
  38922. });
  38923. //#endregion
  38924. //#region node_modules/element-plus/es/components/select-v2/src/select.mjs
  38925. var _hoisted_1$21 = [
  38926. "id",
  38927. "value",
  38928. "autocomplete",
  38929. "tabindex",
  38930. "aria-expanded",
  38931. "aria-label",
  38932. "disabled",
  38933. "aria-controls",
  38934. "aria-activedescendant",
  38935. "readonly",
  38936. "name"
  38937. ];
  38938. var _hoisted_2$13 = ["textContent"];
  38939. var _hoisted_3$5 = { key: 1 };
  38940. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  38941. const _component_el_tag = resolveComponent("el-tag");
  38942. const _component_el_tooltip = resolveComponent("el-tooltip");
  38943. const _component_el_icon = resolveComponent("el-icon");
  38944. const _component_el_select_menu = resolveComponent("el-select-menu");
  38945. const _directive_click_outside = resolveDirective("click-outside");
  38946. return withDirectives((openBlock(), createElementBlock("div", {
  38947. ref: "selectRef",
  38948. class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
  38949. onMouseenter: _cache[15] || (_cache[15] = ($event) => _ctx.states.inputHovering = true),
  38950. onMouseleave: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = false)
  38951. }, [createVNode(_component_el_tooltip, {
  38952. ref: "tooltipRef",
  38953. visible: _ctx.dropdownMenuVisible,
  38954. teleported: _ctx.teleported,
  38955. "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
  38956. "popper-style": _ctx.popperStyle,
  38957. "gpu-acceleration": false,
  38958. "stop-popper-mouse-event": false,
  38959. "popper-options": _ctx.popperOptions,
  38960. "fallback-placements": _ctx.fallbackPlacements,
  38961. effect: _ctx.effect,
  38962. placement: _ctx.placement,
  38963. pure: "",
  38964. transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
  38965. trigger: "click",
  38966. persistent: _ctx.persistent,
  38967. "append-to": _ctx.appendTo,
  38968. "show-arrow": _ctx.showArrow,
  38969. offset: _ctx.offset,
  38970. onBeforeShow: _ctx.handleMenuEnter,
  38971. onHide: _cache[14] || (_cache[14] = ($event) => _ctx.states.isBeforeHide = false)
  38972. }, {
  38973. default: withCtx(() => [createBaseVNode("div", {
  38974. ref: "wrapperRef",
  38975. class: normalizeClass([
  38976. _ctx.nsSelect.e("wrapper"),
  38977. _ctx.nsSelect.is("focused", _ctx.isFocused),
  38978. _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
  38979. _ctx.nsSelect.is("filterable", _ctx.filterable),
  38980. _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
  38981. ]),
  38982. onClick: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
  38983. }, [
  38984. _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
  38985. key: 0,
  38986. ref: "prefixRef",
  38987. class: normalizeClass(_ctx.nsSelect.e("prefix"))
  38988. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  38989. createBaseVNode("div", {
  38990. ref: "selectionRef",
  38991. class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)])
  38992. }, [
  38993. _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
  38994. key: 0,
  38995. data: _ctx.states.cachedOptions,
  38996. deleteTag: _ctx.deleteTag,
  38997. selectDisabled: _ctx.selectDisabled
  38998. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
  38999. return openBlock(), createElementBlock("div", {
  39000. key: _ctx.getValueKey(_ctx.getValue(item)),
  39001. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  39002. }, [createVNode(_component_el_tag, {
  39003. closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
  39004. size: _ctx.collapseTagSize,
  39005. type: _ctx.tagType,
  39006. effect: _ctx.tagEffect,
  39007. "disable-transitions": "",
  39008. style: normalizeStyle(_ctx.tagStyle),
  39009. onClose: ($event) => _ctx.deleteTag($event, item)
  39010. }, {
  39011. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  39012. index: _ctx.getIndex(item),
  39013. label: _ctx.getLabel(item),
  39014. value: _ctx.getValue(item)
  39015. }, () => [createTextVNode(toDisplayString(_ctx.getLabel(item)), 1)])], 2)]),
  39016. _: 2
  39017. }, 1032, [
  39018. "closable",
  39019. "size",
  39020. "type",
  39021. "effect",
  39022. "style",
  39023. "onClose"
  39024. ])], 2);
  39025. }), 128)), _ctx.collapseTags && _ctx.states.cachedOptions.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
  39026. key: 0,
  39027. ref: "tagTooltipRef",
  39028. disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
  39029. "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
  39030. "bottom",
  39031. "top",
  39032. "right",
  39033. "left"
  39034. ],
  39035. effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
  39036. placement: _ctx.tagTooltip?.placement ?? "bottom",
  39037. "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
  39038. "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
  39039. teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
  39040. "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
  39041. "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
  39042. transition: _ctx.tagTooltip?.transition,
  39043. "show-after": _ctx.tagTooltip?.showAfter,
  39044. "hide-after": _ctx.tagTooltip?.hideAfter,
  39045. "auto-close": _ctx.tagTooltip?.autoClose,
  39046. offset: _ctx.tagTooltip?.offset
  39047. }, {
  39048. default: withCtx(() => [createBaseVNode("div", {
  39049. ref: "collapseItemRef",
  39050. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  39051. }, [createVNode(_component_el_tag, {
  39052. closable: false,
  39053. size: _ctx.collapseTagSize,
  39054. type: _ctx.tagType,
  39055. effect: _ctx.tagEffect,
  39056. style: normalizeStyle(_ctx.collapseTagStyle),
  39057. "disable-transitions": ""
  39058. }, {
  39059. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.cachedOptions.length - _ctx.maxCollapseTags), 3)]),
  39060. _: 1
  39061. }, 8, [
  39062. "size",
  39063. "type",
  39064. "effect",
  39065. "style"
  39066. ])], 2)]),
  39067. content: withCtx(() => [createBaseVNode("div", {
  39068. ref: "tagMenuRef",
  39069. class: normalizeClass(_ctx.nsSelect.e("selection"))
  39070. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (selected) => {
  39071. return openBlock(), createElementBlock("div", {
  39072. key: _ctx.getValueKey(_ctx.getValue(selected)),
  39073. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  39074. }, [createVNode(_component_el_tag, {
  39075. class: "in-tooltip",
  39076. closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
  39077. size: _ctx.collapseTagSize,
  39078. type: _ctx.tagType,
  39079. effect: _ctx.tagEffect,
  39080. "disable-transitions": "",
  39081. onClose: ($event) => _ctx.deleteTag($event, selected)
  39082. }, {
  39083. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  39084. index: _ctx.getIndex(selected),
  39085. label: _ctx.getLabel(selected),
  39086. value: _ctx.getValue(selected)
  39087. }, () => [createTextVNode(toDisplayString(_ctx.getLabel(selected)), 1)])], 2)]),
  39088. _: 2
  39089. }, 1032, [
  39090. "closable",
  39091. "size",
  39092. "type",
  39093. "effect",
  39094. "onClose"
  39095. ])], 2);
  39096. }), 128))], 2)]),
  39097. _: 3
  39098. }, 8, [
  39099. "disabled",
  39100. "fallback-placements",
  39101. "effect",
  39102. "placement",
  39103. "popper-class",
  39104. "popper-style",
  39105. "teleported",
  39106. "append-to",
  39107. "popper-options",
  39108. "transition",
  39109. "show-after",
  39110. "hide-after",
  39111. "auto-close",
  39112. "offset"
  39113. ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
  39114. createBaseVNode("div", { class: normalizeClass([
  39115. _ctx.nsSelect.e("selected-item"),
  39116. _ctx.nsSelect.e("input-wrapper"),
  39117. _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
  39118. ]) }, [createBaseVNode("input", {
  39119. id: _ctx.inputId,
  39120. ref: "inputRef",
  39121. value: _ctx.states.inputValue,
  39122. style: normalizeStyle(_ctx.inputStyle),
  39123. autocomplete: _ctx.autocomplete,
  39124. tabindex: _ctx.tabindex,
  39125. "aria-autocomplete": "none",
  39126. "aria-haspopup": "listbox",
  39127. autocapitalize: "off",
  39128. "aria-expanded": _ctx.expanded,
  39129. "aria-label": _ctx.ariaLabel,
  39130. class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
  39131. disabled: _ctx.selectDisabled,
  39132. role: "combobox",
  39133. "aria-controls": _ctx.contentId,
  39134. "aria-activedescendant": _ctx.states.hoveringIndex >= 0 ? `${_ctx.contentId}-${_ctx.states.hoveringIndex}` : "",
  39135. readonly: !_ctx.filterable,
  39136. spellcheck: "false",
  39137. type: "text",
  39138. name: _ctx.name,
  39139. onInput: _cache[0] || (_cache[0] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  39140. onChange: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
  39141. onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  39142. onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  39143. onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  39144. onKeydown: [
  39145. _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
  39146. _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
  39147. _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
  39148. _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
  39149. _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"]))
  39150. ],
  39151. onClick: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
  39152. }, null, 46, _hoisted_1$21), _ctx.filterable ? (openBlock(), createElementBlock("span", {
  39153. key: 0,
  39154. ref: "calculatorRef",
  39155. "aria-hidden": "true",
  39156. class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
  39157. textContent: toDisplayString(_ctx.states.inputValue)
  39158. }, null, 10, _hoisted_2$13)) : createCommentVNode("v-if", true)], 2),
  39159. _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
  39160. key: 1,
  39161. class: normalizeClass([
  39162. _ctx.nsSelect.e("selected-item"),
  39163. _ctx.nsSelect.e("placeholder"),
  39164. _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
  39165. ])
  39166. }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
  39167. key: 0,
  39168. index: _ctx.allOptionsValueMap.get(_ctx.modelValue)?.index ?? -1,
  39169. label: _ctx.currentPlaceholder,
  39170. value: _ctx.modelValue
  39171. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$5, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
  39172. ], 2),
  39173. createBaseVNode("div", {
  39174. ref: "suffixRef",
  39175. class: normalizeClass(_ctx.nsSelect.e("suffix"))
  39176. }, [
  39177. _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, {
  39178. key: 0,
  39179. class: normalizeClass([
  39180. _ctx.nsSelect.e("caret"),
  39181. _ctx.nsInput.e("icon"),
  39182. _ctx.iconReverse
  39183. ])
  39184. }, {
  39185. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  39186. _: 1
  39187. }, 8, ["class"])), [[vShow, !_ctx.showClearBtn]]) : createCommentVNode("v-if", true),
  39188. _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  39189. key: 1,
  39190. class: normalizeClass([
  39191. _ctx.nsSelect.e("caret"),
  39192. _ctx.nsInput.e("icon"),
  39193. _ctx.nsSelect.e("clear")
  39194. ]),
  39195. onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"])
  39196. }, {
  39197. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  39198. _: 1
  39199. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  39200. _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
  39201. key: 2,
  39202. class: normalizeClass([
  39203. _ctx.nsInput.e("icon"),
  39204. _ctx.nsInput.e("validateIcon"),
  39205. _ctx.nsInput.is("loading", _ctx.validateState === "validating")
  39206. ])
  39207. }, {
  39208. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
  39209. _: 1
  39210. }, 8, ["class"])) : createCommentVNode("v-if", true)
  39211. ], 2)
  39212. ], 2)]),
  39213. content: withCtx(() => [createVNode(_component_el_select_menu, {
  39214. id: _ctx.contentId,
  39215. ref: "menuRef",
  39216. data: _ctx.filteredOptions,
  39217. width: _ctx.popperSize - _ctx.BORDER_HORIZONTAL_WIDTH,
  39218. "hovering-index": _ctx.states.hoveringIndex,
  39219. "scrollbar-always-on": _ctx.scrollbarAlwaysOn,
  39220. "aria-label": _ctx.ariaLabel
  39221. }, createSlots({
  39222. default: withCtx((scope) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))]),
  39223. _: 2
  39224. }, [
  39225. _ctx.$slots.header ? {
  39226. name: "header",
  39227. fn: withCtx(() => [createBaseVNode("div", {
  39228. class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
  39229. onClick: _cache[12] || (_cache[12] = withModifiers(() => {}, ["stop"]))
  39230. }, [renderSlot(_ctx.$slots, "header")], 2)]),
  39231. key: "0"
  39232. } : void 0,
  39233. _ctx.$slots.loading && _ctx.loading ? {
  39234. name: "loading",
  39235. fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) }, [renderSlot(_ctx.$slots, "loading")], 2)]),
  39236. key: "1"
  39237. } : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
  39238. name: "empty",
  39239. fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)]),
  39240. key: "2"
  39241. } : void 0,
  39242. _ctx.$slots.footer ? {
  39243. name: "footer",
  39244. fn: withCtx(() => [createBaseVNode("div", {
  39245. class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
  39246. onClick: _cache[13] || (_cache[13] = withModifiers(() => {}, ["stop"]))
  39247. }, [renderSlot(_ctx.$slots, "footer")], 2)]),
  39248. key: "3"
  39249. } : void 0
  39250. ]), 1032, [
  39251. "id",
  39252. "data",
  39253. "width",
  39254. "hovering-index",
  39255. "scrollbar-always-on",
  39256. "aria-label"
  39257. ])]),
  39258. _: 3
  39259. }, 8, [
  39260. "visible",
  39261. "teleported",
  39262. "popper-class",
  39263. "popper-style",
  39264. "popper-options",
  39265. "fallback-placements",
  39266. "effect",
  39267. "placement",
  39268. "transition",
  39269. "persistent",
  39270. "append-to",
  39271. "show-arrow",
  39272. "offset",
  39273. "onBeforeShow"
  39274. ])], 34)), [[
  39275. _directive_click_outside,
  39276. _ctx.handleClickOutside,
  39277. _ctx.popperRef
  39278. ]]);
  39279. }
  39280. //#endregion
  39281. //#region node_modules/element-plus/es/components/select-v2/index.mjs
  39282. var ElSelectV2 = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default, [["render", _sfc_render$5]]));
  39283. //#endregion
  39284. //#region node_modules/element-plus/es/components/skeleton/src/skeleton.mjs
  39285. /**
  39286. * @deprecated Removed after 3.0.0, Use `SkeletonProps` instead.
  39287. */
  39288. var skeletonProps = buildProps({
  39289. animated: Boolean,
  39290. count: {
  39291. type: Number,
  39292. default: 1
  39293. },
  39294. rows: {
  39295. type: Number,
  39296. default: 3
  39297. },
  39298. loading: {
  39299. type: Boolean,
  39300. default: true
  39301. },
  39302. throttle: { type: definePropType([Number, Object]) }
  39303. });
  39304. //#endregion
  39305. //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs
  39306. /**
  39307. * @deprecated Removed after 3.0.0, Use `SkeletonItemProps` instead.
  39308. */
  39309. var skeletonItemProps = buildProps({ variant: {
  39310. type: String,
  39311. values: [
  39312. "circle",
  39313. "rect",
  39314. "h1",
  39315. "h3",
  39316. "text",
  39317. "caption",
  39318. "p",
  39319. "image",
  39320. "button"
  39321. ],
  39322. default: "text"
  39323. } });
  39324. //#endregion
  39325. //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs
  39326. var skeleton_item_default = /* @__PURE__ */ defineComponent({
  39327. name: "ElSkeletonItem",
  39328. __name: "skeleton-item",
  39329. props: skeletonItemProps,
  39330. setup(__props) {
  39331. const ns = useNamespace("skeleton");
  39332. return (_ctx, _cache) => {
  39333. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).e("item"), unref(ns).e(__props.variant)]) }, [__props.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true)], 2);
  39334. };
  39335. }
  39336. });
  39337. //#endregion
  39338. //#region node_modules/element-plus/es/components/skeleton/index.mjs
  39339. var ElSkeleton = withInstall(/* @__PURE__ */ defineComponent({
  39340. name: "ElSkeleton",
  39341. __name: "skeleton",
  39342. props: skeletonProps,
  39343. setup(__props, { expose: __expose }) {
  39344. const props = __props;
  39345. const ns = useNamespace("skeleton");
  39346. const uiLoading = useThrottleRender(toRef(props, "loading"), props.throttle);
  39347. __expose({ uiLoading });
  39348. return (_ctx, _cache) => {
  39349. return unref(uiLoading) ? (openBlock(), createElementBlock("div", mergeProps({
  39350. key: 0,
  39351. class: [unref(ns).b(), unref(ns).is("animated", __props.animated)]
  39352. }, _ctx.$attrs), [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.count, (i) => {
  39353. return openBlock(), createElementBlock(Fragment, { key: i }, [unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [createVNode(skeleton_item_default, {
  39354. class: normalizeClass(unref(ns).is("first")),
  39355. variant: "p"
  39356. }, null, 8, ["class"]), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (item) => {
  39357. return openBlock(), createBlock(skeleton_item_default, {
  39358. key: item,
  39359. class: normalizeClass([unref(ns).e("paragraph"), unref(ns).is("last", item === __props.rows && __props.rows > 1)]),
  39360. variant: "p"
  39361. }, null, 8, ["class"]);
  39362. }), 128))]) : createCommentVNode("v-if", true)], 64);
  39363. }), 128))], 16)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)));
  39364. };
  39365. }
  39366. }), { SkeletonItem: skeleton_item_default });
  39367. var ElSkeletonItem = withNoopInstall(skeleton_item_default);
  39368. //#endregion
  39369. //#region node_modules/element-plus/es/components/slider/src/constants.mjs
  39370. var sliderContextKey = Symbol("sliderContextKey");
  39371. //#endregion
  39372. //#region node_modules/element-plus/es/components/slider/src/slider.mjs
  39373. var sliderProps = buildProps({
  39374. modelValue: {
  39375. type: definePropType([Number, Array]),
  39376. default: 0
  39377. },
  39378. id: {
  39379. type: String,
  39380. default: void 0
  39381. },
  39382. min: {
  39383. type: Number,
  39384. default: 0
  39385. },
  39386. max: {
  39387. type: Number,
  39388. default: 100
  39389. },
  39390. step: {
  39391. type: Number,
  39392. default: 1
  39393. },
  39394. showInput: Boolean,
  39395. showInputControls: {
  39396. type: Boolean,
  39397. default: true
  39398. },
  39399. size: useSizeProp,
  39400. inputSize: useSizeProp,
  39401. showStops: Boolean,
  39402. showTooltip: {
  39403. type: Boolean,
  39404. default: true
  39405. },
  39406. formatTooltip: {
  39407. type: definePropType(Function),
  39408. default: void 0
  39409. },
  39410. disabled: {
  39411. type: Boolean,
  39412. default: void 0
  39413. },
  39414. range: Boolean,
  39415. vertical: Boolean,
  39416. height: String,
  39417. rangeStartLabel: {
  39418. type: String,
  39419. default: void 0
  39420. },
  39421. rangeEndLabel: {
  39422. type: String,
  39423. default: void 0
  39424. },
  39425. formatValueText: {
  39426. type: definePropType(Function),
  39427. default: void 0
  39428. },
  39429. tooltipClass: {
  39430. type: String,
  39431. default: void 0
  39432. },
  39433. placement: {
  39434. type: String,
  39435. values: Ee,
  39436. default: "top"
  39437. },
  39438. marks: { type: definePropType(Object) },
  39439. validateEvent: {
  39440. type: Boolean,
  39441. default: true
  39442. },
  39443. persistent: {
  39444. type: Boolean,
  39445. default: true
  39446. },
  39447. ...useAriaProps(["ariaLabel"])
  39448. });
  39449. var isValidValue$1 = (value) => isNumber(value) || isArray$1(value) && value.every(isNumber);
  39450. var sliderEmits = {
  39451. [UPDATE_MODEL_EVENT]: isValidValue$1,
  39452. [INPUT_EVENT]: isValidValue$1,
  39453. [CHANGE_EVENT]: isValidValue$1
  39454. };
  39455. //#endregion
  39456. //#region node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs
  39457. var useLifecycle = (props, initData, resetSize) => {
  39458. const sliderWrapper = ref();
  39459. onMounted(async () => {
  39460. if (props.range) {
  39461. if (isArray$1(props.modelValue)) {
  39462. initData.firstValue = Math.max(props.min, props.modelValue[0]);
  39463. initData.secondValue = Math.min(props.max, props.modelValue[1]);
  39464. } else {
  39465. initData.firstValue = props.min;
  39466. initData.secondValue = props.max;
  39467. }
  39468. initData.oldValue = [initData.firstValue, initData.secondValue];
  39469. } else {
  39470. if (!isNumber(props.modelValue) || Number.isNaN(props.modelValue)) initData.firstValue = props.min;
  39471. else initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue));
  39472. initData.oldValue = initData.firstValue;
  39473. }
  39474. useEventListener(window, "resize", resetSize);
  39475. await nextTick();
  39476. resetSize();
  39477. });
  39478. return { sliderWrapper };
  39479. };
  39480. //#endregion
  39481. //#region node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs
  39482. var useMarks = (props) => {
  39483. return computed(() => {
  39484. if (!props.marks) return [];
  39485. return Object.keys(props.marks).map(Number.parseFloat).sort((a, b) => a - b).filter((point) => point <= props.max && point >= props.min).map((point) => ({
  39486. point,
  39487. position: (point - props.min) * 100 / (props.max - props.min),
  39488. mark: props.marks[point]
  39489. }));
  39490. });
  39491. };
  39492. //#endregion
  39493. //#region node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs
  39494. var useSlide = (props, initData, emit) => {
  39495. const { formItem: elFormItem } = useFormItem();
  39496. const slider = shallowRef();
  39497. const firstButton = ref();
  39498. const secondButton = ref();
  39499. const buttonRefs = {
  39500. firstButton,
  39501. secondButton
  39502. };
  39503. const sliderDisabled = useFormDisabled();
  39504. const minValue = computed(() => {
  39505. return Math.min(initData.firstValue, initData.secondValue);
  39506. });
  39507. const maxValue = computed(() => {
  39508. return Math.max(initData.firstValue, initData.secondValue);
  39509. });
  39510. const barSize = computed(() => {
  39511. return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;
  39512. });
  39513. const barStart = computed(() => {
  39514. return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : "0%";
  39515. });
  39516. const runwayStyle = computed(() => {
  39517. return props.vertical ? { height: props.height } : {};
  39518. });
  39519. const barStyle = computed(() => {
  39520. return props.vertical ? {
  39521. height: barSize.value,
  39522. bottom: barStart.value
  39523. } : {
  39524. width: barSize.value,
  39525. left: barStart.value
  39526. };
  39527. });
  39528. const resetSize = () => {
  39529. if (slider.value) initData.sliderSize = slider.value.getBoundingClientRect()[props.vertical ? "height" : "width"];
  39530. };
  39531. const getButtonRefByPercent = (percent) => {
  39532. const targetValue = props.min + percent * (props.max - props.min) / 100;
  39533. if (!props.range) return firstButton;
  39534. let buttonRefName;
  39535. if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.value - targetValue)) buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton";
  39536. else buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton";
  39537. return buttonRefs[buttonRefName];
  39538. };
  39539. const setPosition = (percent) => {
  39540. const buttonRef = getButtonRefByPercent(percent);
  39541. buttonRef.value.setPosition(percent);
  39542. return buttonRef;
  39543. };
  39544. const setFirstValue = (firstValue) => {
  39545. initData.firstValue = firstValue ?? props.min;
  39546. _emit(props.range ? [minValue.value, maxValue.value] : firstValue ?? props.min);
  39547. };
  39548. const setSecondValue = (secondValue) => {
  39549. initData.secondValue = secondValue;
  39550. if (props.range) _emit([minValue.value, maxValue.value]);
  39551. };
  39552. const _emit = (val) => {
  39553. emit(UPDATE_MODEL_EVENT, val);
  39554. emit(INPUT_EVENT, val);
  39555. };
  39556. const emitChange = async () => {
  39557. await nextTick();
  39558. emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue);
  39559. };
  39560. const handleSliderPointerEvent = (event) => {
  39561. if (sliderDisabled.value || initData.dragging) return;
  39562. resetSize();
  39563. let newPercent = 0;
  39564. if (props.vertical) {
  39565. const clientY = event.touches?.item(0)?.clientY ?? event.clientY;
  39566. newPercent = (slider.value.getBoundingClientRect().bottom - clientY) / initData.sliderSize * 100;
  39567. } else newPercent = ((event.touches?.item(0)?.clientX ?? event.clientX) - slider.value.getBoundingClientRect().left) / initData.sliderSize * 100;
  39568. if (newPercent < 0 || newPercent > 100) return;
  39569. return setPosition(newPercent);
  39570. };
  39571. const onSliderWrapperPrevent = (event) => {
  39572. if (buttonRefs["firstButton"].value?.dragging || buttonRefs["secondButton"].value?.dragging) event.preventDefault();
  39573. };
  39574. const onSliderDown = async (event) => {
  39575. const buttonRef = handleSliderPointerEvent(event);
  39576. if (buttonRef) {
  39577. await nextTick();
  39578. buttonRef.value.onButtonDown(event);
  39579. }
  39580. };
  39581. const onSliderClick = (event) => {
  39582. if (handleSliderPointerEvent(event)) emitChange();
  39583. };
  39584. const onSliderMarkerDown = (position) => {
  39585. if (sliderDisabled.value || initData.dragging) return;
  39586. if (setPosition(position)) emitChange();
  39587. };
  39588. return {
  39589. elFormItem,
  39590. slider,
  39591. firstButton,
  39592. secondButton,
  39593. sliderDisabled,
  39594. minValue,
  39595. maxValue,
  39596. runwayStyle,
  39597. barStyle,
  39598. resetSize,
  39599. setPosition,
  39600. emitChange,
  39601. onSliderWrapperPrevent,
  39602. onSliderClick,
  39603. onSliderDown,
  39604. onSliderMarkerDown,
  39605. setFirstValue,
  39606. setSecondValue
  39607. };
  39608. };
  39609. //#endregion
  39610. //#region node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs
  39611. var useStops = (props, initData, minValue, maxValue) => {
  39612. const stops = computed(() => {
  39613. if (!props.showStops || props.min > props.max) return [];
  39614. if (props.step === 0) {
  39615. debugWarn("ElSlider", "step should not be 0.");
  39616. return [];
  39617. }
  39618. const stopCount = Math.ceil((props.max - props.min) / props.step);
  39619. const stepWidth = 100 * props.step / (props.max - props.min);
  39620. const result = Array.from({ length: stopCount - 1 }).map((_, index) => (index + 1) * stepWidth);
  39621. if (props.range) return result.filter((step) => {
  39622. return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min);
  39623. });
  39624. else return result.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min));
  39625. });
  39626. const getStopStyle = (position) => {
  39627. return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` };
  39628. };
  39629. return {
  39630. stops,
  39631. getStopStyle
  39632. };
  39633. };
  39634. //#endregion
  39635. //#region node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs
  39636. var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => {
  39637. const _emit = (val) => {
  39638. emit(UPDATE_MODEL_EVENT, val);
  39639. emit(INPUT_EVENT, val);
  39640. };
  39641. const valueChanged = () => {
  39642. if (props.range) return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]);
  39643. else return props.modelValue !== initData.oldValue;
  39644. };
  39645. const setValues = () => {
  39646. if (props.min > props.max) throwError("Slider", "min should not be greater than max.");
  39647. const val = props.modelValue;
  39648. if (props.range && isArray$1(val)) if (val[1] < props.min) _emit([props.min, props.min]);
  39649. else if (val[0] > props.max) _emit([props.max, props.max]);
  39650. else if (val[0] < props.min) _emit([props.min, val[1]]);
  39651. else if (val[1] > props.max) _emit([val[0], props.max]);
  39652. else {
  39653. initData.firstValue = val[0];
  39654. initData.secondValue = val[1];
  39655. if (valueChanged()) {
  39656. if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
  39657. initData.oldValue = val.slice();
  39658. }
  39659. }
  39660. else if (!props.range && isNumber(val) && !Number.isNaN(val)) if (val < props.min) _emit(props.min);
  39661. else if (val > props.max) _emit(props.max);
  39662. else {
  39663. initData.firstValue = val;
  39664. if (valueChanged()) {
  39665. if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
  39666. initData.oldValue = val;
  39667. }
  39668. }
  39669. };
  39670. setValues();
  39671. watch(() => initData.dragging, (val) => {
  39672. if (!val) setValues();
  39673. });
  39674. watch(() => props.modelValue, (val, oldVal) => {
  39675. if (initData.dragging || isArray$1(val) && isArray$1(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) return;
  39676. setValues();
  39677. }, { deep: true });
  39678. watch(() => [props.min, props.max], () => {
  39679. setValues();
  39680. });
  39681. };
  39682. //#endregion
  39683. //#region node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs
  39684. var useTooltip = (props, formatTooltip, showTooltip) => {
  39685. const tooltip = ref();
  39686. const tooltipVisible = ref(false);
  39687. const enableFormat = computed(() => {
  39688. return formatTooltip.value instanceof Function;
  39689. });
  39690. return {
  39691. tooltip,
  39692. tooltipVisible,
  39693. formatValue: computed(() => {
  39694. return enableFormat.value && formatTooltip.value(props.modelValue) || props.modelValue;
  39695. }),
  39696. displayTooltip: debounce(() => {
  39697. showTooltip.value && (tooltipVisible.value = true);
  39698. }, 50),
  39699. hideTooltip: debounce(() => {
  39700. showTooltip.value && (tooltipVisible.value = false);
  39701. }, 50)
  39702. };
  39703. };
  39704. var useSliderButton = (props, initData, emit) => {
  39705. const { disabled, min, max, step, showTooltip, persistent, precision, sliderSize, formatTooltip, emitChange, resetSize, updateDragging } = inject(sliderContextKey);
  39706. const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip);
  39707. const button = ref();
  39708. const currentPosition = computed(() => {
  39709. return `${(props.modelValue - min.value) / (max.value - min.value) * 100}%`;
  39710. });
  39711. const wrapperStyle = computed(() => {
  39712. return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value };
  39713. });
  39714. const handleMouseEnter = () => {
  39715. initData.hovering = true;
  39716. displayTooltip();
  39717. };
  39718. const handleMouseLeave = () => {
  39719. initData.hovering = false;
  39720. if (!initData.dragging) hideTooltip();
  39721. };
  39722. const onButtonDown = (event) => {
  39723. if (disabled.value) return;
  39724. event.preventDefault();
  39725. onDragStart(event);
  39726. window.addEventListener("mousemove", onDragging);
  39727. window.addEventListener("touchmove", onDragging);
  39728. window.addEventListener("mouseup", onDragEnd);
  39729. window.addEventListener("touchend", onDragEnd);
  39730. window.addEventListener("contextmenu", onDragEnd);
  39731. button.value.focus();
  39732. };
  39733. const incrementPosition = (amount) => {
  39734. if (disabled.value) return;
  39735. initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max.value - min.value) * 100;
  39736. setPosition(initData.newPosition);
  39737. emitChange();
  39738. };
  39739. const onLeftKeyDown = () => {
  39740. incrementPosition(-step.value);
  39741. };
  39742. const onRightKeyDown = () => {
  39743. incrementPosition(step.value);
  39744. };
  39745. const onPageDownKeyDown = () => {
  39746. incrementPosition(-step.value * 4);
  39747. };
  39748. const onPageUpKeyDown = () => {
  39749. incrementPosition(step.value * 4);
  39750. };
  39751. const onHomeKeyDown = () => {
  39752. if (disabled.value) return;
  39753. setPosition(0);
  39754. emitChange();
  39755. };
  39756. const onEndKeyDown = () => {
  39757. if (disabled.value) return;
  39758. setPosition(100);
  39759. emitChange();
  39760. };
  39761. const onKeyDown = (event) => {
  39762. const code = getEventCode(event);
  39763. let isPreventDefault = true;
  39764. switch (code) {
  39765. case EVENT_CODE.left:
  39766. case EVENT_CODE.down:
  39767. onLeftKeyDown();
  39768. break;
  39769. case EVENT_CODE.right:
  39770. case EVENT_CODE.up:
  39771. onRightKeyDown();
  39772. break;
  39773. case EVENT_CODE.home:
  39774. onHomeKeyDown();
  39775. break;
  39776. case EVENT_CODE.end:
  39777. onEndKeyDown();
  39778. break;
  39779. case EVENT_CODE.pageDown:
  39780. onPageDownKeyDown();
  39781. break;
  39782. case EVENT_CODE.pageUp:
  39783. onPageUpKeyDown();
  39784. break;
  39785. default:
  39786. isPreventDefault = false;
  39787. break;
  39788. }
  39789. isPreventDefault && event.preventDefault();
  39790. };
  39791. const getClientXY = (event) => {
  39792. let clientX;
  39793. let clientY;
  39794. if (event.type.startsWith("touch")) {
  39795. clientY = event.touches[0].clientY;
  39796. clientX = event.touches[0].clientX;
  39797. } else {
  39798. clientY = event.clientY;
  39799. clientX = event.clientX;
  39800. }
  39801. return {
  39802. clientX,
  39803. clientY
  39804. };
  39805. };
  39806. const onDragStart = (event) => {
  39807. initData.dragging = true;
  39808. initData.isClick = true;
  39809. const { clientX, clientY } = getClientXY(event);
  39810. if (props.vertical) initData.startY = clientY;
  39811. else initData.startX = clientX;
  39812. initData.startPosition = Number.parseFloat(currentPosition.value);
  39813. initData.newPosition = initData.startPosition;
  39814. };
  39815. const onDragging = (event) => {
  39816. if (initData.dragging) {
  39817. initData.isClick = false;
  39818. displayTooltip();
  39819. resetSize();
  39820. let diff;
  39821. const { clientX, clientY } = getClientXY(event);
  39822. if (props.vertical) {
  39823. initData.currentY = clientY;
  39824. diff = (initData.startY - initData.currentY) / sliderSize.value * 100;
  39825. } else {
  39826. initData.currentX = clientX;
  39827. diff = (initData.currentX - initData.startX) / sliderSize.value * 100;
  39828. }
  39829. initData.newPosition = initData.startPosition + diff;
  39830. setPosition(initData.newPosition);
  39831. }
  39832. };
  39833. const onDragEnd = () => {
  39834. if (initData.dragging) {
  39835. setTimeout(() => {
  39836. initData.dragging = false;
  39837. if (!initData.hovering) hideTooltip();
  39838. if (!initData.isClick) setPosition(initData.newPosition);
  39839. emitChange();
  39840. }, 0);
  39841. window.removeEventListener("mousemove", onDragging);
  39842. window.removeEventListener("touchmove", onDragging);
  39843. window.removeEventListener("mouseup", onDragEnd);
  39844. window.removeEventListener("touchend", onDragEnd);
  39845. window.removeEventListener("contextmenu", onDragEnd);
  39846. }
  39847. };
  39848. const setPosition = async (newPosition) => {
  39849. if (newPosition === null || Number.isNaN(+newPosition)) return;
  39850. newPosition = clamp$2(newPosition, 0, 100);
  39851. const fullSteps = Math.floor((max.value - min.value) / step.value);
  39852. const fullRangePercentage = fullSteps * step.value / (max.value - min.value) * 100;
  39853. const threshold = fullRangePercentage + (100 - fullRangePercentage) / 2;
  39854. let value;
  39855. if (newPosition < fullRangePercentage) {
  39856. const valueBetween = fullRangePercentage / fullSteps;
  39857. const steps = Math.round(newPosition / valueBetween);
  39858. value = min.value + steps * step.value;
  39859. } else if (newPosition < threshold) value = min.value + fullSteps * step.value;
  39860. else value = max.value;
  39861. value = Number.parseFloat(value.toFixed(precision.value));
  39862. if (value !== props.modelValue) emit(UPDATE_MODEL_EVENT, value);
  39863. if (!initData.dragging && props.modelValue !== initData.oldValue) initData.oldValue = props.modelValue;
  39864. await nextTick();
  39865. initData.dragging && displayTooltip();
  39866. tooltip.value.updatePopper();
  39867. };
  39868. watch(() => initData.dragging, (val) => {
  39869. updateDragging(val);
  39870. });
  39871. useEventListener(button, "touchstart", onButtonDown, { passive: false });
  39872. return {
  39873. disabled,
  39874. button,
  39875. tooltip,
  39876. tooltipVisible,
  39877. showTooltip,
  39878. persistent,
  39879. wrapperStyle,
  39880. formatValue,
  39881. handleMouseEnter,
  39882. handleMouseLeave,
  39883. onButtonDown,
  39884. onKeyDown,
  39885. setPosition
  39886. };
  39887. };
  39888. //#endregion
  39889. //#region node_modules/element-plus/es/components/slider/src/button.mjs
  39890. var sliderButtonProps = buildProps({
  39891. modelValue: {
  39892. type: Number,
  39893. default: 0
  39894. },
  39895. vertical: Boolean,
  39896. tooltipClass: String,
  39897. placement: {
  39898. type: String,
  39899. values: Ee,
  39900. default: "top"
  39901. }
  39902. });
  39903. var sliderButtonEmits = { [UPDATE_MODEL_EVENT]: (value) => isNumber(value) };
  39904. //#endregion
  39905. //#region node_modules/element-plus/es/components/slider/src/button.vue_vue_type_script_setup_true_lang.mjs
  39906. var _hoisted_1$20 = ["tabindex"];
  39907. //#endregion
  39908. //#region node_modules/element-plus/es/components/slider/src/button2.mjs
  39909. var button_default = /* @__PURE__ */ defineComponent({
  39910. name: "ElSliderButton",
  39911. __name: "button",
  39912. props: sliderButtonProps,
  39913. emits: sliderButtonEmits,
  39914. setup(__props, { expose: __expose, emit: __emit }) {
  39915. const props = __props;
  39916. const emit = __emit;
  39917. const ns = useNamespace("slider");
  39918. const initData = reactive({
  39919. hovering: false,
  39920. dragging: false,
  39921. isClick: false,
  39922. startX: 0,
  39923. currentX: 0,
  39924. startY: 0,
  39925. currentY: 0,
  39926. startPosition: 0,
  39927. newPosition: 0,
  39928. oldValue: props.modelValue
  39929. });
  39930. const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
  39931. const { disabled, button, tooltip, showTooltip, persistent, tooltipVisible, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition } = useSliderButton(props, initData, emit);
  39932. const { hovering, dragging } = toRefs(initData);
  39933. __expose({
  39934. onButtonDown,
  39935. onKeyDown,
  39936. setPosition,
  39937. hovering,
  39938. dragging
  39939. });
  39940. return (_ctx, _cache) => {
  39941. return openBlock(), createElementBlock("div", {
  39942. ref_key: "button",
  39943. ref: button,
  39944. class: normalizeClass([unref(ns).e("button-wrapper"), {
  39945. hover: unref(hovering),
  39946. dragging: unref(dragging)
  39947. }]),
  39948. style: normalizeStyle(unref(wrapperStyle)),
  39949. tabindex: unref(disabled) ? void 0 : 0,
  39950. onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  39951. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  39952. onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
  39953. onFocus: _cache[3] || (_cache[3] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  39954. onBlur: _cache[4] || (_cache[4] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  39955. onKeydown: _cache[5] || (_cache[5] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
  39956. }, [createVNode(unref(ElTooltip), {
  39957. ref_key: "tooltip",
  39958. ref: tooltip,
  39959. visible: unref(tooltipVisible),
  39960. placement: _ctx.placement,
  39961. "fallback-placements": [
  39962. "top",
  39963. "bottom",
  39964. "right",
  39965. "left"
  39966. ],
  39967. "stop-popper-mouse-event": false,
  39968. "popper-class": _ctx.tooltipClass,
  39969. disabled: !unref(showTooltip),
  39970. persistent: tooltipPersistent.value
  39971. }, {
  39972. content: withCtx(() => [createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1)]),
  39973. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass([unref(ns).e("button"), {
  39974. hover: unref(hovering),
  39975. dragging: unref(dragging)
  39976. }]) }, null, 2)]),
  39977. _: 1
  39978. }, 8, [
  39979. "visible",
  39980. "placement",
  39981. "popper-class",
  39982. "disabled",
  39983. "persistent"
  39984. ])], 46, _hoisted_1$20);
  39985. };
  39986. }
  39987. });
  39988. var marker_default = defineComponent({
  39989. name: "ElSliderMarker",
  39990. props: buildProps({ mark: {
  39991. type: definePropType([String, Object]),
  39992. default: void 0
  39993. } }),
  39994. setup(props) {
  39995. const ns = useNamespace("slider");
  39996. const label = computed(() => {
  39997. return isString(props.mark) ? props.mark : props.mark.label;
  39998. });
  39999. const style = computed(() => isString(props.mark) ? void 0 : props.mark.style);
  40000. return () => h$1("div", {
  40001. class: ns.e("marks-text"),
  40002. style: style.value
  40003. }, label.value);
  40004. }
  40005. });
  40006. //#endregion
  40007. //#region node_modules/element-plus/es/components/slider/src/slider.vue_vue_type_script_setup_true_lang.mjs
  40008. var _hoisted_1$19 = [
  40009. "id",
  40010. "role",
  40011. "aria-label",
  40012. "aria-labelledby"
  40013. ];
  40014. var _hoisted_2$12 = { key: 1 };
  40015. //#endregion
  40016. //#region node_modules/element-plus/es/components/slider/index.mjs
  40017. var ElSlider = withInstall(/* @__PURE__ */ defineComponent({
  40018. name: "ElSlider",
  40019. __name: "slider",
  40020. props: sliderProps,
  40021. emits: sliderEmits,
  40022. setup(__props, { expose: __expose, emit: __emit }) {
  40023. const props = __props;
  40024. const emit = __emit;
  40025. const ns = useNamespace("slider");
  40026. const { t } = useLocale();
  40027. const initData = reactive({
  40028. firstValue: 0,
  40029. secondValue: 0,
  40030. oldValue: 0,
  40031. dragging: false,
  40032. sliderSize: 1
  40033. });
  40034. const { elFormItem, slider, firstButton, secondButton, sliderDisabled, minValue, maxValue, runwayStyle, barStyle, resetSize, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, onSliderMarkerDown, setFirstValue, setSecondValue } = useSlide(props, initData, emit);
  40035. const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue);
  40036. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: elFormItem });
  40037. const sliderWrapperSize = useFormSize();
  40038. const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value);
  40039. const groupLabel = computed(() => {
  40040. return props.ariaLabel || t("el.slider.defaultLabel", {
  40041. min: props.min,
  40042. max: props.max
  40043. });
  40044. });
  40045. const firstButtonLabel = computed(() => {
  40046. if (props.range) return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
  40047. else return groupLabel.value;
  40048. });
  40049. const firstValueText = computed(() => {
  40050. return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
  40051. });
  40052. const secondButtonLabel = computed(() => {
  40053. return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
  40054. });
  40055. const secondValueText = computed(() => {
  40056. return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
  40057. });
  40058. const sliderKls = computed(() => [
  40059. ns.b(),
  40060. ns.m(sliderWrapperSize.value),
  40061. ns.is("vertical", props.vertical),
  40062. { [ns.m("with-input")]: props.showInput }
  40063. ]);
  40064. const markList = useMarks(props);
  40065. useWatch(props, initData, minValue, maxValue, emit, elFormItem);
  40066. const precision = computed(() => {
  40067. const precisions = [
  40068. props.min,
  40069. props.max,
  40070. props.step
  40071. ].map((item) => {
  40072. const decimal = `${item}`.split(".")[1];
  40073. return decimal ? decimal.length : 0;
  40074. });
  40075. return Math.max.apply(null, precisions);
  40076. });
  40077. const { sliderWrapper } = useLifecycle(props, initData, resetSize);
  40078. const { firstValue, secondValue, sliderSize } = toRefs(initData);
  40079. const updateDragging = (val) => {
  40080. initData.dragging = val;
  40081. };
  40082. useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, { passive: false });
  40083. useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, { passive: false });
  40084. provide(sliderContextKey, {
  40085. ...toRefs(props),
  40086. sliderSize,
  40087. disabled: sliderDisabled,
  40088. precision,
  40089. emitChange,
  40090. resetSize,
  40091. updateDragging
  40092. });
  40093. __expose({ onSliderClick });
  40094. return (_ctx, _cache) => {
  40095. return openBlock(), createElementBlock("div", {
  40096. id: _ctx.range ? unref(inputId) : void 0,
  40097. ref_key: "sliderWrapper",
  40098. ref: sliderWrapper,
  40099. class: normalizeClass(sliderKls.value),
  40100. role: _ctx.range ? "group" : void 0,
  40101. "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? groupLabel.value : void 0,
  40102. "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0
  40103. }, [createBaseVNode("div", {
  40104. ref_key: "slider",
  40105. ref: slider,
  40106. class: normalizeClass([
  40107. unref(ns).e("runway"),
  40108. { "show-input": _ctx.showInput && !_ctx.range },
  40109. unref(ns).is("disabled", unref(sliderDisabled))
  40110. ]),
  40111. style: normalizeStyle(unref(runwayStyle)),
  40112. onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)),
  40113. onTouchstartPassive: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args))
  40114. }, [
  40115. createBaseVNode("div", {
  40116. class: normalizeClass(unref(ns).e("bar")),
  40117. style: normalizeStyle(unref(barStyle))
  40118. }, null, 6),
  40119. createVNode(button_default, {
  40120. id: !_ctx.range ? unref(inputId) : void 0,
  40121. ref_key: "firstButton",
  40122. ref: firstButton,
  40123. "model-value": unref(firstValue),
  40124. vertical: _ctx.vertical,
  40125. "tooltip-class": _ctx.tooltipClass,
  40126. placement: _ctx.placement,
  40127. role: "slider",
  40128. "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? firstButtonLabel.value : void 0,
  40129. "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0,
  40130. "aria-valuemin": _ctx.min,
  40131. "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max,
  40132. "aria-valuenow": unref(firstValue),
  40133. "aria-valuetext": firstValueText.value,
  40134. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  40135. "aria-disabled": unref(sliderDisabled),
  40136. "onUpdate:modelValue": unref(setFirstValue)
  40137. }, null, 8, [
  40138. "id",
  40139. "model-value",
  40140. "vertical",
  40141. "tooltip-class",
  40142. "placement",
  40143. "aria-label",
  40144. "aria-labelledby",
  40145. "aria-valuemin",
  40146. "aria-valuemax",
  40147. "aria-valuenow",
  40148. "aria-valuetext",
  40149. "aria-orientation",
  40150. "aria-disabled",
  40151. "onUpdate:modelValue"
  40152. ]),
  40153. _ctx.range ? (openBlock(), createBlock(button_default, {
  40154. key: 0,
  40155. ref_key: "secondButton",
  40156. ref: secondButton,
  40157. "model-value": unref(secondValue),
  40158. vertical: _ctx.vertical,
  40159. "tooltip-class": _ctx.tooltipClass,
  40160. placement: _ctx.placement,
  40161. role: "slider",
  40162. "aria-label": secondButtonLabel.value,
  40163. "aria-valuemin": unref(firstValue),
  40164. "aria-valuemax": _ctx.max,
  40165. "aria-valuenow": unref(secondValue),
  40166. "aria-valuetext": secondValueText.value,
  40167. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  40168. "aria-disabled": unref(sliderDisabled),
  40169. "onUpdate:modelValue": unref(setSecondValue)
  40170. }, null, 8, [
  40171. "model-value",
  40172. "vertical",
  40173. "tooltip-class",
  40174. "placement",
  40175. "aria-label",
  40176. "aria-valuemin",
  40177. "aria-valuemax",
  40178. "aria-valuenow",
  40179. "aria-valuetext",
  40180. "aria-orientation",
  40181. "aria-disabled",
  40182. "onUpdate:modelValue"
  40183. ])) : createCommentVNode("v-if", true),
  40184. _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_2$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
  40185. return openBlock(), createElementBlock("div", {
  40186. key,
  40187. class: normalizeClass(unref(ns).e("stop")),
  40188. style: normalizeStyle(unref(getStopStyle)(item))
  40189. }, null, 6);
  40190. }), 128))])) : createCommentVNode("v-if", true),
  40191. unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createBaseVNode("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  40192. return openBlock(), createElementBlock("div", {
  40193. key,
  40194. style: normalizeStyle(unref(getStopStyle)(item.position)),
  40195. class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")])
  40196. }, null, 6);
  40197. }), 128))]), createBaseVNode("div", { class: normalizeClass(unref(ns).e("marks")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  40198. return openBlock(), createBlock(unref(marker_default), {
  40199. key,
  40200. mark: item.mark,
  40201. style: normalizeStyle(unref(getStopStyle)(item.position)),
  40202. onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"])
  40203. }, null, 8, [
  40204. "mark",
  40205. "style",
  40206. "onMousedown"
  40207. ]);
  40208. }), 128))], 2)], 64)) : createCommentVNode("v-if", true)
  40209. ], 38), _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), {
  40210. key: 0,
  40211. ref: "input",
  40212. "model-value": unref(firstValue),
  40213. class: normalizeClass(unref(ns).e("input")),
  40214. step: _ctx.step,
  40215. disabled: unref(sliderDisabled),
  40216. controls: _ctx.showInputControls,
  40217. min: _ctx.min,
  40218. max: _ctx.max,
  40219. precision: precision.value,
  40220. size: sliderInputSize.value,
  40221. "onUpdate:modelValue": unref(setFirstValue),
  40222. onChange: unref(emitChange)
  40223. }, null, 8, [
  40224. "model-value",
  40225. "class",
  40226. "step",
  40227. "disabled",
  40228. "controls",
  40229. "min",
  40230. "max",
  40231. "precision",
  40232. "size",
  40233. "onUpdate:modelValue",
  40234. "onChange"
  40235. ])) : createCommentVNode("v-if", true)], 10, _hoisted_1$19);
  40236. };
  40237. }
  40238. }));
  40239. //#endregion
  40240. //#region node_modules/element-plus/es/components/space/src/item.mjs
  40241. var spaceItemProps = buildProps({ prefixCls: { type: String } });
  40242. var SpaceItem = defineComponent({
  40243. name: "ElSpaceItem",
  40244. props: spaceItemProps,
  40245. setup(props, { slots }) {
  40246. const ns = useNamespace("space");
  40247. const classes = computed(() => `${props.prefixCls || ns.b()}__item`);
  40248. return () => h$1("div", { class: classes.value }, renderSlot(slots, "default"));
  40249. }
  40250. });
  40251. //#endregion
  40252. //#region node_modules/element-plus/es/components/space/src/use-space.mjs
  40253. var SIZE_MAP = {
  40254. small: 8,
  40255. default: 12,
  40256. large: 16
  40257. };
  40258. function useSpace(props) {
  40259. const ns = useNamespace("space");
  40260. const classes = computed(() => [
  40261. ns.b(),
  40262. ns.m(props.direction),
  40263. props.class
  40264. ]);
  40265. const horizontalSize = ref(0);
  40266. const verticalSize = ref(0);
  40267. const containerStyle = computed(() => {
  40268. return [
  40269. props.wrap || props.fill ? { flexWrap: "wrap" } : {},
  40270. { alignItems: props.alignment },
  40271. {
  40272. rowGap: `${verticalSize.value}px`,
  40273. columnGap: `${horizontalSize.value}px`
  40274. },
  40275. props.style
  40276. ];
  40277. });
  40278. const itemStyle = computed(() => {
  40279. return props.fill ? {
  40280. flexGrow: 1,
  40281. minWidth: `${props.fillRatio}%`
  40282. } : {};
  40283. });
  40284. watchEffect(() => {
  40285. const { size = "small", wrap, direction: dir, fill } = props;
  40286. if (isArray$1(size)) {
  40287. const [h = 0, v = 0] = size;
  40288. horizontalSize.value = h;
  40289. verticalSize.value = v;
  40290. } else {
  40291. let val;
  40292. if (isNumber(size)) val = size;
  40293. else val = SIZE_MAP[size || "small"] || SIZE_MAP.small;
  40294. if ((wrap || fill) && dir === "horizontal") horizontalSize.value = verticalSize.value = val;
  40295. else if (dir === "horizontal") {
  40296. horizontalSize.value = val;
  40297. verticalSize.value = 0;
  40298. } else {
  40299. verticalSize.value = val;
  40300. horizontalSize.value = 0;
  40301. }
  40302. }
  40303. });
  40304. return {
  40305. classes,
  40306. containerStyle,
  40307. itemStyle
  40308. };
  40309. }
  40310. //#endregion
  40311. //#region node_modules/element-plus/es/components/space/src/space.mjs
  40312. var spaceProps = buildProps({
  40313. direction: {
  40314. type: String,
  40315. values: ["horizontal", "vertical"],
  40316. default: "horizontal"
  40317. },
  40318. class: {
  40319. type: definePropType([
  40320. String,
  40321. Object,
  40322. Array
  40323. ]),
  40324. default: ""
  40325. },
  40326. style: {
  40327. type: definePropType([
  40328. String,
  40329. Array,
  40330. Object
  40331. ]),
  40332. default: ""
  40333. },
  40334. alignment: {
  40335. type: definePropType(String),
  40336. default: "center"
  40337. },
  40338. prefixCls: { type: String },
  40339. spacer: {
  40340. type: definePropType([
  40341. Object,
  40342. String,
  40343. Number,
  40344. Array
  40345. ]),
  40346. default: null,
  40347. validator: (val) => isVNode(val) || isNumber(val) || isString(val)
  40348. },
  40349. wrap: Boolean,
  40350. fill: Boolean,
  40351. fillRatio: {
  40352. type: Number,
  40353. default: 100
  40354. },
  40355. size: {
  40356. type: [
  40357. String,
  40358. Array,
  40359. Number
  40360. ],
  40361. values: componentSizes,
  40362. validator: (val) => {
  40363. return isNumber(val) || isArray$1(val) && val.length === 2 && val.every(isNumber);
  40364. }
  40365. }
  40366. });
  40367. //#endregion
  40368. //#region node_modules/element-plus/es/components/space/index.mjs
  40369. var ElSpace = withInstall(defineComponent({
  40370. name: "ElSpace",
  40371. props: spaceProps,
  40372. setup(props, { slots }) {
  40373. const { classes, containerStyle, itemStyle } = useSpace(props);
  40374. function extractChildren(children, parentKey = "", extractedChildren = []) {
  40375. const { prefixCls } = props;
  40376. children.forEach((child, loopKey) => {
  40377. if (isFragment(child)) {
  40378. if (isArray$1(child.children)) child.children.forEach((nested, key) => {
  40379. if (isFragment(nested) && isArray$1(nested.children)) extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
  40380. else if (isVNode(nested) && nested?.type === Comment) extractedChildren.push(nested);
  40381. else extractedChildren.push(createVNode(SpaceItem, {
  40382. style: itemStyle.value,
  40383. prefixCls,
  40384. key: `nested-${parentKey + key}`
  40385. }, { default: () => [nested] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
  40386. });
  40387. } else if (isValidElementNode(child)) extractedChildren.push(createVNode(SpaceItem, {
  40388. style: itemStyle.value,
  40389. prefixCls,
  40390. key: `LoopKey${parentKey + loopKey}`
  40391. }, { default: () => [child] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
  40392. });
  40393. return extractedChildren;
  40394. }
  40395. return () => {
  40396. const { spacer, direction } = props;
  40397. const children = renderSlot(slots, "default", { key: 0 }, () => []);
  40398. if ((children.children ?? []).length === 0) return null;
  40399. if (isArray$1(children.children)) {
  40400. let extractedChildren = extractChildren(children.children);
  40401. if (spacer) {
  40402. const len = extractedChildren.length - 1;
  40403. extractedChildren = extractedChildren.reduce((acc, child, idx) => {
  40404. const children = [...acc, child];
  40405. if (idx !== len) children.push(createVNode("span", {
  40406. style: [itemStyle.value, direction === "vertical" ? "width: 100%" : null],
  40407. key: idx
  40408. }, [isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT)], PatchFlags.STYLE));
  40409. return children;
  40410. }, []);
  40411. }
  40412. return createVNode("div", {
  40413. class: classes.value,
  40414. style: containerStyle.value
  40415. }, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS);
  40416. }
  40417. return children.children;
  40418. };
  40419. }
  40420. }));
  40421. //#endregion
  40422. //#region node_modules/element-plus/es/components/steps/src/steps.mjs
  40423. /**
  40424. * @deprecated Removed after 3.0.0, Use `StepsProps` instead.
  40425. */
  40426. var stepsProps = buildProps({
  40427. space: {
  40428. type: [Number, String],
  40429. default: ""
  40430. },
  40431. active: {
  40432. type: Number,
  40433. default: 0
  40434. },
  40435. direction: {
  40436. type: String,
  40437. default: "horizontal",
  40438. values: ["horizontal", "vertical"]
  40439. },
  40440. alignCenter: { type: Boolean },
  40441. simple: { type: Boolean },
  40442. finishStatus: {
  40443. type: String,
  40444. values: [
  40445. "wait",
  40446. "process",
  40447. "finish",
  40448. "error",
  40449. "success"
  40450. ],
  40451. default: "finish"
  40452. },
  40453. processStatus: {
  40454. type: String,
  40455. values: [
  40456. "wait",
  40457. "process",
  40458. "finish",
  40459. "error",
  40460. "success"
  40461. ],
  40462. default: "process"
  40463. }
  40464. });
  40465. var stepsEmits = { [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber) };
  40466. //#endregion
  40467. //#region node_modules/element-plus/es/components/steps/src/tokens.mjs
  40468. var STEPS_INJECTION_KEY = "ElSteps";
  40469. //#endregion
  40470. //#region node_modules/element-plus/es/components/steps/src/item.mjs
  40471. /**
  40472. * @deprecated Removed after 3.0.0, Use `StepProps` instead.
  40473. */
  40474. var stepProps = buildProps({
  40475. title: {
  40476. type: String,
  40477. default: ""
  40478. },
  40479. icon: { type: iconPropType },
  40480. description: {
  40481. type: String,
  40482. default: ""
  40483. },
  40484. status: {
  40485. type: String,
  40486. values: [
  40487. "",
  40488. "wait",
  40489. "process",
  40490. "finish",
  40491. "error",
  40492. "success"
  40493. ],
  40494. default: ""
  40495. }
  40496. });
  40497. //#endregion
  40498. //#region node_modules/element-plus/es/components/steps/src/steps2.mjs
  40499. var steps_default$1 = /* @__PURE__ */ defineComponent({
  40500. name: "ElSteps",
  40501. __name: "steps",
  40502. props: stepsProps,
  40503. emits: stepsEmits,
  40504. setup(__props, { emit: __emit }) {
  40505. const props = __props;
  40506. const emit = __emit;
  40507. const ns = useNamespace("steps");
  40508. const { children: steps, addChild: addStep, removeChild: removeStep, ChildrenSorter: StepsSorter } = useOrderedChildren(getCurrentInstance(), "ElStep");
  40509. watch(steps, () => {
  40510. steps.value.forEach((instance, index) => {
  40511. instance.setIndex(index);
  40512. });
  40513. });
  40514. provide(STEPS_INJECTION_KEY, {
  40515. props,
  40516. steps,
  40517. addStep,
  40518. removeStep
  40519. });
  40520. watch(() => props.active, (newVal, oldVal) => {
  40521. emit(CHANGE_EVENT, newVal, oldVal);
  40522. });
  40523. return (_ctx, _cache) => {
  40524. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(__props.simple ? "simple" : __props.direction)]) }, [renderSlot(_ctx.$slots, "default"), createVNode(unref(StepsSorter))], 2);
  40525. };
  40526. }
  40527. });
  40528. //#endregion
  40529. //#region node_modules/element-plus/es/components/steps/src/item2.mjs
  40530. var item_default = /* @__PURE__ */ defineComponent({
  40531. name: "ElStep",
  40532. __name: "item",
  40533. props: stepProps,
  40534. setup(__props) {
  40535. const props = __props;
  40536. const ns = useNamespace("step");
  40537. const index = ref(-1);
  40538. const lineStyle = ref({});
  40539. const internalStatus = ref("");
  40540. const parent = inject(STEPS_INJECTION_KEY);
  40541. const currentInstance = getCurrentInstance();
  40542. let stepDiff = 0;
  40543. let beforeActive = 0;
  40544. onMounted(() => {
  40545. watch([
  40546. () => parent.props.active,
  40547. () => parent.props.processStatus,
  40548. () => parent.props.finishStatus
  40549. ], ([active], [oldActive]) => {
  40550. beforeActive = oldActive || 0;
  40551. stepDiff = active - beforeActive;
  40552. updateStatus(active);
  40553. }, { immediate: true });
  40554. });
  40555. const currentStatus = computed(() => {
  40556. return props.status || internalStatus.value;
  40557. });
  40558. const prevInternalStatus = computed(() => {
  40559. const prevStep = parent.steps.value[index.value - 1];
  40560. return prevStep ? prevStep.internalStatus.value : "wait";
  40561. });
  40562. const isCenter = computed(() => {
  40563. return parent.props.alignCenter;
  40564. });
  40565. const isVertical = computed(() => {
  40566. return parent.props.direction === "vertical";
  40567. });
  40568. const isSimple = computed(() => {
  40569. return parent.props.simple;
  40570. });
  40571. const stepsCount = computed(() => {
  40572. return parent.steps.value.length;
  40573. });
  40574. const isLast = computed(() => {
  40575. return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance.uid;
  40576. });
  40577. const space = computed(() => {
  40578. return isSimple.value ? "" : parent.props.space;
  40579. });
  40580. const containerKls = computed(() => {
  40581. return [
  40582. ns.b(),
  40583. ns.is(isSimple.value ? "simple" : parent.props.direction),
  40584. ns.is("flex", isLast.value && !space.value && !isCenter.value),
  40585. ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
  40586. ];
  40587. });
  40588. const style = computed(() => {
  40589. const style = { flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` };
  40590. if (isVertical.value) return style;
  40591. if (isLast.value) style.maxWidth = `${100 / stepsCount.value}%`;
  40592. return style;
  40593. });
  40594. const setIndex = (val) => {
  40595. index.value = val;
  40596. };
  40597. const calcProgress = (status) => {
  40598. const isWait = status === "wait";
  40599. const style = { transitionDelay: `${Math.abs(stepDiff) === 1 ? 0 : stepDiff > 0 ? (index.value + 1 - beforeActive) * 150 : -(index.value + 1 - parent.props.active) * 150}ms` };
  40600. const step = status === parent.props.processStatus || isWait ? 0 : 100;
  40601. style.borderWidth = step && !isSimple.value ? "1px" : 0;
  40602. style[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
  40603. lineStyle.value = style;
  40604. };
  40605. const updateStatus = (activeIndex) => {
  40606. if (activeIndex > index.value) internalStatus.value = parent.props.finishStatus;
  40607. else if (activeIndex === index.value && prevInternalStatus.value !== "error") internalStatus.value = parent.props.processStatus;
  40608. else internalStatus.value = "wait";
  40609. const prevChild = parent.steps.value[index.value - 1];
  40610. if (prevChild) prevChild.calcProgress(internalStatus.value);
  40611. };
  40612. const stepItemState = {
  40613. uid: currentInstance.uid,
  40614. getVnode: () => currentInstance.vnode,
  40615. currentStatus,
  40616. internalStatus,
  40617. setIndex,
  40618. calcProgress
  40619. };
  40620. parent.addStep(stepItemState);
  40621. onBeforeUnmount(() => {
  40622. parent.removeStep(stepItemState);
  40623. });
  40624. return (_ctx, _cache) => {
  40625. return openBlock(), createElementBlock("div", {
  40626. style: normalizeStyle(style.value),
  40627. class: normalizeClass(containerKls.value)
  40628. }, [
  40629. createCommentVNode(" icon & line "),
  40630. createBaseVNode("div", { class: normalizeClass([unref(ns).e("head"), unref(ns).is(currentStatus.value)]) }, [!isSimple.value ? (openBlock(), createElementBlock("div", {
  40631. key: 0,
  40632. class: normalizeClass(unref(ns).e("line"))
  40633. }, [createBaseVNode("i", {
  40634. class: normalizeClass(unref(ns).e("line-inner")),
  40635. style: normalizeStyle(lineStyle.value)
  40636. }, null, 6)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(ns).e("icon"), unref(ns).is(__props.icon || _ctx.$slots.icon ? "icon" : "text")]) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  40637. key: 0,
  40638. class: normalizeClass(unref(ns).e("icon-inner"))
  40639. }, {
  40640. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  40641. _: 1
  40642. }, 8, ["class"])) : currentStatus.value === "success" ? (openBlock(), createBlock(unref(ElIcon), {
  40643. key: 1,
  40644. class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
  40645. }, {
  40646. default: withCtx(() => [createVNode(unref(check_default))]),
  40647. _: 1
  40648. }, 8, ["class"])) : currentStatus.value === "error" ? (openBlock(), createBlock(unref(ElIcon), {
  40649. key: 2,
  40650. class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
  40651. }, {
  40652. default: withCtx(() => [createVNode(unref(close_default))]),
  40653. _: 1
  40654. }, 8, ["class"])) : !isSimple.value ? (openBlock(), createElementBlock("div", {
  40655. key: 3,
  40656. class: normalizeClass(unref(ns).e("icon-inner"))
  40657. }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)])], 2)], 2),
  40658. createCommentVNode(" title & description "),
  40659. createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("title"), unref(ns).is(currentStatus.value)]) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), isSimple.value ? (openBlock(), createElementBlock("div", {
  40660. key: 0,
  40661. class: normalizeClass(unref(ns).e("arrow"))
  40662. }, null, 2)) : (openBlock(), createElementBlock("div", {
  40663. key: 1,
  40664. class: normalizeClass([unref(ns).e("description"), unref(ns).is(currentStatus.value)])
  40665. }, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2))], 2)
  40666. ], 6);
  40667. };
  40668. }
  40669. });
  40670. //#endregion
  40671. //#region node_modules/element-plus/es/components/steps/index.mjs
  40672. var ElSteps = withInstall(steps_default$1, { Step: item_default });
  40673. var ElStep = withNoopInstall(item_default);
  40674. //#endregion
  40675. //#region node_modules/element-plus/es/utils/vue/validator.mjs
  40676. var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
  40677. //#endregion
  40678. //#region node_modules/element-plus/es/components/switch/src/switch.mjs
  40679. /**
  40680. * @deprecated Removed after 3.0.0, Use `SwitchProps` instead.
  40681. */
  40682. var switchProps = buildProps({
  40683. modelValue: {
  40684. type: [
  40685. Boolean,
  40686. String,
  40687. Number
  40688. ],
  40689. default: false
  40690. },
  40691. disabled: {
  40692. type: Boolean,
  40693. default: void 0
  40694. },
  40695. loading: Boolean,
  40696. size: {
  40697. type: String,
  40698. validator: isValidComponentSize
  40699. },
  40700. width: {
  40701. type: [String, Number],
  40702. default: ""
  40703. },
  40704. inlinePrompt: Boolean,
  40705. inactiveActionIcon: { type: iconPropType },
  40706. activeActionIcon: { type: iconPropType },
  40707. activeIcon: { type: iconPropType },
  40708. inactiveIcon: { type: iconPropType },
  40709. activeText: {
  40710. type: String,
  40711. default: ""
  40712. },
  40713. inactiveText: {
  40714. type: String,
  40715. default: ""
  40716. },
  40717. activeValue: {
  40718. type: [
  40719. Boolean,
  40720. String,
  40721. Number
  40722. ],
  40723. default: true
  40724. },
  40725. inactiveValue: {
  40726. type: [
  40727. Boolean,
  40728. String,
  40729. Number
  40730. ],
  40731. default: false
  40732. },
  40733. name: {
  40734. type: String,
  40735. default: ""
  40736. },
  40737. validateEvent: {
  40738. type: Boolean,
  40739. default: true
  40740. },
  40741. beforeChange: { type: definePropType(Function) },
  40742. id: String,
  40743. tabindex: { type: [String, Number] },
  40744. ...useAriaProps(["ariaLabel"])
  40745. });
  40746. var switchEmits = {
  40747. [UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
  40748. [CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
  40749. [INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
  40750. };
  40751. //#endregion
  40752. //#region node_modules/element-plus/es/components/switch/src/switch.vue_vue_type_script_setup_true_lang.mjs
  40753. var _hoisted_1$18 = [
  40754. "id",
  40755. "aria-checked",
  40756. "aria-disabled",
  40757. "aria-label",
  40758. "name",
  40759. "true-value",
  40760. "false-value",
  40761. "disabled",
  40762. "tabindex"
  40763. ];
  40764. var _hoisted_2$11 = ["aria-hidden"];
  40765. var _hoisted_3$4 = { key: 1 };
  40766. var _hoisted_4$3 = { key: 1 };
  40767. var _hoisted_5$1 = ["aria-hidden"];
  40768. var COMPONENT_NAME$6 = "ElSwitch";
  40769. //#endregion
  40770. //#region node_modules/element-plus/es/components/switch/index.mjs
  40771. var ElSwitch = withInstall(/* @__PURE__ */ defineComponent({
  40772. name: COMPONENT_NAME$6,
  40773. __name: "switch",
  40774. props: switchProps,
  40775. emits: switchEmits,
  40776. setup(__props, { expose: __expose, emit: __emit }) {
  40777. const props = __props;
  40778. const emit = __emit;
  40779. const { formItem } = useFormItem();
  40780. const switchSize = useFormSize();
  40781. const ns = useNamespace("switch");
  40782. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  40783. const switchDisabled = useFormDisabled(computed(() => {
  40784. if (props.loading) return true;
  40785. }));
  40786. const isControlled = ref(props.modelValue !== false);
  40787. const input = shallowRef();
  40788. const switchKls = computed(() => [
  40789. ns.b(),
  40790. ns.m(switchSize.value),
  40791. ns.is("disabled", switchDisabled.value),
  40792. ns.is("checked", checked.value)
  40793. ]);
  40794. const labelLeftKls = computed(() => [
  40795. ns.e("label"),
  40796. ns.em("label", "left"),
  40797. ns.is("active", !checked.value)
  40798. ]);
  40799. const labelRightKls = computed(() => [
  40800. ns.e("label"),
  40801. ns.em("label", "right"),
  40802. ns.is("active", checked.value)
  40803. ]);
  40804. const coreStyle = computed(() => ({ width: addUnit(props.width) }));
  40805. watch(() => props.modelValue, () => {
  40806. isControlled.value = true;
  40807. });
  40808. const actualValue = computed(() => {
  40809. return isControlled.value ? props.modelValue : false;
  40810. });
  40811. const checked = computed(() => actualValue.value === props.activeValue);
  40812. if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
  40813. emit(UPDATE_MODEL_EVENT, props.inactiveValue);
  40814. emit(CHANGE_EVENT, props.inactiveValue);
  40815. emit(INPUT_EVENT, props.inactiveValue);
  40816. }
  40817. watch(checked, (val) => {
  40818. input.value.checked = val;
  40819. if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
  40820. });
  40821. const handleChange = () => {
  40822. const val = checked.value ? props.inactiveValue : props.activeValue;
  40823. emit(UPDATE_MODEL_EVENT, val);
  40824. emit(CHANGE_EVENT, val);
  40825. emit(INPUT_EVENT, val);
  40826. nextTick(() => {
  40827. input.value.checked = checked.value;
  40828. });
  40829. };
  40830. const switchValue = () => {
  40831. if (switchDisabled.value) return;
  40832. const { beforeChange } = props;
  40833. if (!beforeChange) {
  40834. handleChange();
  40835. return;
  40836. }
  40837. const shouldChange = beforeChange();
  40838. if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(COMPONENT_NAME$6, "beforeChange must return type `Promise<boolean>` or `boolean`");
  40839. if (isPromise(shouldChange)) shouldChange.then((result) => {
  40840. if (result) handleChange();
  40841. }).catch((e) => {
  40842. debugWarn(COMPONENT_NAME$6, `some error occurred: ${e}`);
  40843. });
  40844. else if (shouldChange) handleChange();
  40845. };
  40846. const focus = () => {
  40847. input.value?.focus?.();
  40848. };
  40849. onMounted(() => {
  40850. input.value.checked = checked.value;
  40851. });
  40852. __expose({
  40853. focus,
  40854. checked
  40855. });
  40856. return (_ctx, _cache) => {
  40857. return openBlock(), createElementBlock("div", {
  40858. class: normalizeClass(switchKls.value),
  40859. onClick: withModifiers(switchValue, ["prevent"])
  40860. }, [
  40861. createBaseVNode("input", {
  40862. id: unref(inputId),
  40863. ref_key: "input",
  40864. ref: input,
  40865. class: normalizeClass(unref(ns).e("input")),
  40866. type: "checkbox",
  40867. role: "switch",
  40868. "aria-checked": checked.value,
  40869. "aria-disabled": unref(switchDisabled),
  40870. "aria-label": __props.ariaLabel,
  40871. name: __props.name,
  40872. "true-value": __props.activeValue,
  40873. "false-value": __props.inactiveValue,
  40874. disabled: unref(switchDisabled),
  40875. tabindex: __props.tabindex,
  40876. onChange: handleChange,
  40877. onKeydown: withKeys(switchValue, ["enter"])
  40878. }, null, 42, _hoisted_1$18),
  40879. !__props.inlinePrompt && (__props.inactiveIcon || __props.inactiveText || _ctx.$slots.inactive) ? (openBlock(), createElementBlock("span", {
  40880. key: 0,
  40881. class: normalizeClass(labelLeftKls.value)
  40882. }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40883. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
  40884. _: 1
  40885. })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", {
  40886. key: 1,
  40887. "aria-hidden": checked.value
  40888. }, toDisplayString(__props.inactiveText), 9, _hoisted_2$11)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true),
  40889. createBaseVNode("span", {
  40890. class: normalizeClass(unref(ns).e("core")),
  40891. style: normalizeStyle(coreStyle.value)
  40892. }, [__props.inlinePrompt ? (openBlock(), createElementBlock("div", {
  40893. key: 0,
  40894. class: normalizeClass(unref(ns).e("inner"))
  40895. }, [!checked.value ? (openBlock(), createElementBlock("div", {
  40896. key: 0,
  40897. class: normalizeClass(unref(ns).e("inner-wrapper"))
  40898. }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40899. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
  40900. _: 1
  40901. })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(__props.inactiveText), 1)) : createCommentVNode("v-if", true)])], 2)) : (openBlock(), createElementBlock("div", {
  40902. key: 1,
  40903. class: normalizeClass(unref(ns).e("inner-wrapper"))
  40904. }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40905. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
  40906. _: 1
  40907. })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(__props.activeText), 1)) : createCommentVNode("v-if", true)])], 2))], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [__props.loading ? (openBlock(), createBlock(unref(ElIcon), {
  40908. key: 0,
  40909. class: normalizeClass(unref(ns).is("loading"))
  40910. }, {
  40911. default: withCtx(() => [createVNode(unref(loading_default))]),
  40912. _: 1
  40913. }, 8, ["class"])) : checked.value ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [__props.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40914. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeActionIcon)))]),
  40915. _: 1
  40916. })) : createCommentVNode("v-if", true)]) : !checked.value ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [__props.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40917. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveActionIcon)))]),
  40918. _: 1
  40919. })) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true)], 2)], 6),
  40920. !__props.inlinePrompt && (__props.activeIcon || __props.activeText || _ctx.$slots.active) ? (openBlock(), createElementBlock("span", {
  40921. key: 1,
  40922. class: normalizeClass(labelRightKls.value)
  40923. }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40924. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
  40925. _: 1
  40926. })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", {
  40927. key: 1,
  40928. "aria-hidden": !checked.value
  40929. }, toDisplayString(__props.activeText), 9, _hoisted_5$1)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true)
  40930. ], 2);
  40931. };
  40932. }
  40933. }));
  40934. //#endregion
  40935. //#region node_modules/element-plus/es/components/table/src/util.mjs
  40936. var getCell = function(event) {
  40937. return event.target?.closest("td");
  40938. };
  40939. var orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
  40940. if (!sortKey && !sortMethod && (!sortBy || isArray$1(sortBy) && !sortBy.length)) return array;
  40941. if (isString(reverse)) reverse = reverse === "descending" ? -1 : 1;
  40942. else reverse = reverse && reverse < 0 ? -1 : 1;
  40943. const getKey = sortMethod ? null : function(value, index) {
  40944. if (sortBy) return flatMap(castArray$1(sortBy), (by) => {
  40945. if (isString(by)) return get(value, by);
  40946. else return by(value, index, array);
  40947. });
  40948. if (sortKey !== "$key") {
  40949. if (isObject$2(value) && "$value" in value) value = value.$value;
  40950. }
  40951. return [isObject$2(value) ? sortKey ? get(value, sortKey) : null : value];
  40952. };
  40953. const compare = function(a, b) {
  40954. if (sortMethod) return sortMethod(a.value, b.value);
  40955. for (let i = 0, len = a.key?.length ?? 0; i < len; i++) {
  40956. if (a.key?.[i] < b.key?.[i]) return -1;
  40957. if (a.key?.[i] > b.key?.[i]) return 1;
  40958. }
  40959. return 0;
  40960. };
  40961. return array.map((value, index) => {
  40962. return {
  40963. value,
  40964. index,
  40965. key: getKey ? getKey(value, index) : null
  40966. };
  40967. }).sort((a, b) => {
  40968. let order = compare(a, b);
  40969. if (!order) order = a.index - b.index;
  40970. return order * +reverse;
  40971. }).map((item) => item.value);
  40972. };
  40973. var getColumnById = function(table, columnId) {
  40974. let column = null;
  40975. table.columns.forEach((item) => {
  40976. if (item.id === columnId) column = item;
  40977. });
  40978. return column;
  40979. };
  40980. var getColumnByKey = function(table, columnKey) {
  40981. let column = null;
  40982. for (let i = 0; i < table.columns.length; i++) {
  40983. const item = table.columns[i];
  40984. if (item.columnKey === columnKey) {
  40985. column = item;
  40986. break;
  40987. }
  40988. }
  40989. if (!column) throwError("ElTable", `No column matching with column-key: ${columnKey}`);
  40990. return column;
  40991. };
  40992. var getColumnByCell = function(table, cell, namespace) {
  40993. const matches = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
  40994. if (matches) return getColumnById(table, matches[0]);
  40995. return null;
  40996. };
  40997. var getRowIdentity = (row, rowKey) => {
  40998. if (!row) throw new Error("Row is required when get row identity");
  40999. if (isString(rowKey)) {
  41000. if (!rowKey.includes(".")) return `${row[rowKey]}`;
  41001. const key = rowKey.split(".");
  41002. let current = row;
  41003. for (const element of key) current = current[element];
  41004. return `${current}`;
  41005. } else if (isFunction$1(rowKey)) return rowKey.call(null, row);
  41006. return "";
  41007. };
  41008. var getKeysMap = function(array, rowKey, flatten = false, childrenKey = "children") {
  41009. const data = array || [];
  41010. const arrayMap = {};
  41011. data.forEach((row, index) => {
  41012. arrayMap[getRowIdentity(row, rowKey)] = {
  41013. row,
  41014. index
  41015. };
  41016. if (flatten) {
  41017. const children = row[childrenKey];
  41018. if (isArray$1(children)) Object.assign(arrayMap, getKeysMap(children, rowKey, true, childrenKey));
  41019. }
  41020. });
  41021. return arrayMap;
  41022. };
  41023. function mergeOptions(defaults, config) {
  41024. const options = {};
  41025. let key;
  41026. for (key in defaults) options[key] = defaults[key];
  41027. for (key in config) if (hasOwn(config, key)) {
  41028. const value = config[key];
  41029. if (!isUndefined(value)) options[key] = value;
  41030. }
  41031. return options;
  41032. }
  41033. function parseWidth(width) {
  41034. if (width === "") return width;
  41035. if (!isUndefined(width)) {
  41036. width = Number.parseInt(width, 10);
  41037. if (Number.isNaN(width)) width = "";
  41038. }
  41039. return width;
  41040. }
  41041. function parseMinWidth(minWidth) {
  41042. if (minWidth === "") return minWidth;
  41043. if (!isUndefined(minWidth)) {
  41044. minWidth = parseWidth(minWidth);
  41045. if (Number.isNaN(minWidth)) minWidth = 80;
  41046. }
  41047. return minWidth;
  41048. }
  41049. function parseHeight(height) {
  41050. if (isNumber(height)) return height;
  41051. if (isString(height)) if (/^\d+(?:px)?$/.test(height)) return Number.parseInt(height, 10);
  41052. else return height;
  41053. return null;
  41054. }
  41055. function compose(...funcs) {
  41056. if (funcs.length === 0) return (arg) => arg;
  41057. if (funcs.length === 1) return funcs[0];
  41058. return funcs.reduce((a, b) => (...args) => a(b(...args)));
  41059. }
  41060. function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex, rowKey) {
  41061. let _rowIndex = rowIndex ?? 0;
  41062. let changed = false;
  41063. const getIndex = () => {
  41064. if (!rowKey) return statusArr.indexOf(row);
  41065. const id = getRowIdentity(row, rowKey);
  41066. return statusArr.findIndex((item) => getRowIdentity(item, rowKey) === id);
  41067. };
  41068. const index = getIndex();
  41069. const included = index !== -1;
  41070. const isRowSelectable = selectable?.call(null, row, _rowIndex);
  41071. const toggleStatus = (type) => {
  41072. if (type === "add") statusArr.push(row);
  41073. else statusArr.splice(index, 1);
  41074. changed = true;
  41075. };
  41076. const getChildrenCount = (row) => {
  41077. let count = 0;
  41078. const children = tableTreeProps?.children && row[tableTreeProps.children];
  41079. if (children && isArray$1(children)) {
  41080. count += children.length;
  41081. children.forEach((item) => {
  41082. count += getChildrenCount(item);
  41083. });
  41084. }
  41085. return count;
  41086. };
  41087. if (!selectable || isRowSelectable) if (isBoolean(newVal)) {
  41088. if (newVal && !included) toggleStatus("add");
  41089. else if (!newVal && included) toggleStatus("remove");
  41090. } else included ? toggleStatus("remove") : toggleStatus("add");
  41091. if (!tableTreeProps?.checkStrictly && tableTreeProps?.children && isArray$1(row[tableTreeProps.children])) row[tableTreeProps.children].forEach((item) => {
  41092. const childChanged = toggleRowStatus(statusArr, item, newVal ?? !included, tableTreeProps, selectable, _rowIndex + 1, rowKey);
  41093. _rowIndex += getChildrenCount(item) + 1;
  41094. if (childChanged) changed = childChanged;
  41095. });
  41096. return changed;
  41097. }
  41098. function walkTreeNode(root, cb, childrenKey = "children", lazyKey = "hasChildren", lazy = false) {
  41099. const isNil = (array) => !(isArray$1(array) && array.length);
  41100. function _walker(parent, children, level) {
  41101. cb(parent, children, level);
  41102. children.forEach((item) => {
  41103. if (item[lazyKey] && lazy) {
  41104. cb(item, null, level + 1);
  41105. return;
  41106. }
  41107. const children = item[childrenKey];
  41108. if (!isNil(children)) _walker(item, children, level + 1);
  41109. });
  41110. }
  41111. root.forEach((item) => {
  41112. if (item[lazyKey] && lazy) {
  41113. cb(item, null, 0);
  41114. return;
  41115. }
  41116. const children = item[childrenKey];
  41117. if (!isNil(children)) _walker(item, children, 0);
  41118. });
  41119. }
  41120. var getTableOverflowTooltipProps = (props, innerText, row, column) => {
  41121. const popperOptions = {
  41122. strategy: "fixed",
  41123. ...props.popperOptions
  41124. };
  41125. const tooltipFormatterContent = isFunction$1(column?.tooltipFormatter) ? column.tooltipFormatter({
  41126. row,
  41127. column,
  41128. cellValue: getProp(row, column.property).value
  41129. }) : void 0;
  41130. if (isVNode(tooltipFormatterContent)) return {
  41131. slotContent: tooltipFormatterContent,
  41132. content: null,
  41133. ...props,
  41134. popperOptions
  41135. };
  41136. return {
  41137. slotContent: null,
  41138. content: tooltipFormatterContent ?? innerText,
  41139. ...props,
  41140. popperOptions
  41141. };
  41142. };
  41143. var removePopper = null;
  41144. function createTablePopper(props, popperContent, row, column, trigger, table) {
  41145. const tableOverflowTooltipProps = getTableOverflowTooltipProps(props, popperContent, row, column);
  41146. const mergedProps = {
  41147. ...tableOverflowTooltipProps,
  41148. slotContent: void 0
  41149. };
  41150. if (removePopper?.trigger === trigger) {
  41151. const comp = removePopper.vm?.component;
  41152. merge(comp?.props, mergedProps);
  41153. if (comp && tableOverflowTooltipProps.slotContent) comp.slots.content = () => [tableOverflowTooltipProps.slotContent];
  41154. return;
  41155. }
  41156. removePopper?.();
  41157. const parentNode = table?.refs.tableWrapper;
  41158. const ns = parentNode?.dataset.prefix;
  41159. const vm = createVNode(ElTooltip, {
  41160. virtualTriggering: true,
  41161. virtualRef: trigger,
  41162. appendTo: parentNode,
  41163. placement: "top",
  41164. transition: "none",
  41165. offset: 0,
  41166. hideAfter: 0,
  41167. ...mergedProps
  41168. }, tableOverflowTooltipProps.slotContent ? { content: () => tableOverflowTooltipProps.slotContent } : void 0);
  41169. vm.appContext = {
  41170. ...table.appContext,
  41171. ...table
  41172. };
  41173. const container = document.createElement("div");
  41174. render(vm, container);
  41175. vm.component.exposed.onOpen();
  41176. const scrollContainer = parentNode?.querySelector(`.${ns}-scrollbar__wrap`);
  41177. removePopper = () => {
  41178. if (vm.component?.exposed?.onClose) vm.component.exposed.onClose();
  41179. render(null, container);
  41180. const currentRemovePopper = removePopper;
  41181. scrollContainer?.removeEventListener("scroll", currentRemovePopper);
  41182. currentRemovePopper.trigger = void 0;
  41183. currentRemovePopper.vm = void 0;
  41184. removePopper = null;
  41185. };
  41186. removePopper.trigger = trigger ?? void 0;
  41187. removePopper.vm = vm;
  41188. scrollContainer?.addEventListener("scroll", removePopper);
  41189. }
  41190. function getCurrentColumns(column) {
  41191. if (column.children) return flatMap(column.children, getCurrentColumns);
  41192. else return [column];
  41193. }
  41194. function getColSpan(colSpan, column) {
  41195. return colSpan + column.colSpan;
  41196. }
  41197. var isFixedColumn = (index, fixed, store, realColumns) => {
  41198. let start = 0;
  41199. let after = index;
  41200. const columns = store.states.columns.value;
  41201. if (realColumns) {
  41202. const curColumns = getCurrentColumns(realColumns[index]);
  41203. start = columns.slice(0, columns.indexOf(curColumns[0])).reduce(getColSpan, 0);
  41204. after = start + curColumns.reduce(getColSpan, 0) - 1;
  41205. } else start = index;
  41206. let fixedLayout;
  41207. switch (fixed) {
  41208. case "left":
  41209. if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
  41210. break;
  41211. case "right":
  41212. if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
  41213. break;
  41214. default: if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
  41215. else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
  41216. }
  41217. return fixedLayout ? {
  41218. direction: fixedLayout,
  41219. start,
  41220. after
  41221. } : {};
  41222. };
  41223. var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => {
  41224. const classes = [];
  41225. const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
  41226. if (direction) {
  41227. const isLeft = direction === "left";
  41228. classes.push(`${namespace}-fixed-column--${direction}`);
  41229. if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) classes.push("is-last-column");
  41230. else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) classes.push("is-first-column");
  41231. }
  41232. return classes;
  41233. };
  41234. function getOffset(offset, column) {
  41235. return offset + (isNull(column.realWidth) || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
  41236. }
  41237. var getFixedColumnOffset = (index, fixed, store, realColumns) => {
  41238. const { direction, start = 0, after = 0 } = isFixedColumn(index, fixed, store, realColumns);
  41239. if (!direction) return;
  41240. const styles = {};
  41241. const isLeft = direction === "left";
  41242. const columns = store.states.columns.value;
  41243. if (isLeft) styles.left = columns.slice(0, start).reduce(getOffset, 0);
  41244. else styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0);
  41245. return styles;
  41246. };
  41247. var ensurePosition = (style, key) => {
  41248. if (!style) return;
  41249. if (!Number.isNaN(style[key])) style[key] = `${style[key]}px`;
  41250. };
  41251. function ensureValidVNode(vnodes) {
  41252. return vnodes.some((child) => {
  41253. if (!isVNode(child)) return true;
  41254. if (child.type === Comment) return false;
  41255. if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
  41256. return true;
  41257. }) ? vnodes : null;
  41258. }
  41259. //#endregion
  41260. //#region node_modules/element-plus/es/components/table/src/store/expand.mjs
  41261. function useExpand(watcherData) {
  41262. const instance = getCurrentInstance();
  41263. const defaultExpandAll = ref(false);
  41264. const expandRows = ref([]);
  41265. const canRowExpand = (row, index) => {
  41266. const expandableFn = instance.store.states.rowExpandable.value;
  41267. return expandableFn?.(row, index) ?? true;
  41268. };
  41269. const updateExpandRows = () => {
  41270. const data = watcherData.data.value || [];
  41271. const rowKey = watcherData.rowKey.value;
  41272. if (defaultExpandAll.value) expandRows.value = instance.store.states.rowExpandable.value ? data.filter(canRowExpand) : data.slice();
  41273. else if (rowKey) {
  41274. const expandRowsMap = getKeysMap(expandRows.value, rowKey);
  41275. expandRows.value = data.filter((row, index) => {
  41276. return !!expandRowsMap[getRowIdentity(row, rowKey)] && canRowExpand(row, index);
  41277. });
  41278. } else expandRows.value = [];
  41279. };
  41280. const toggleRowExpansion = (row, expanded) => {
  41281. const rowIndex = (watcherData.data.value || []).indexOf(row);
  41282. if (rowIndex > -1 && !canRowExpand(row, rowIndex)) return;
  41283. if (toggleRowStatus(expandRows.value, row, expanded, void 0, void 0, void 0, watcherData.rowKey.value)) instance.emit("expand-change", row, expandRows.value.slice());
  41284. };
  41285. const setExpandRowKeys = (rowKeys) => {
  41286. instance.store.assertRowKey();
  41287. const data = watcherData.data.value || [];
  41288. const rowKey = watcherData.rowKey.value;
  41289. const keysMap = getKeysMap(data, rowKey);
  41290. expandRows.value = rowKeys.reduce((prev, cur) => {
  41291. const info = keysMap[cur];
  41292. if (info && canRowExpand(info.row, info.index)) prev.push(info.row);
  41293. return prev;
  41294. }, []);
  41295. };
  41296. const isRowExpanded = (row) => {
  41297. const rowKey = watcherData.rowKey.value;
  41298. if (rowKey) return !!getKeysMap(expandRows.value, rowKey)[getRowIdentity(row, rowKey)];
  41299. return expandRows.value.includes(row);
  41300. };
  41301. return {
  41302. updateExpandRows,
  41303. toggleRowExpansion,
  41304. setExpandRowKeys,
  41305. isRowExpanded,
  41306. states: {
  41307. expandRows,
  41308. defaultExpandAll
  41309. }
  41310. };
  41311. }
  41312. //#endregion
  41313. //#region node_modules/element-plus/es/components/table/src/store/current.mjs
  41314. function useCurrent(watcherData) {
  41315. const instance = getCurrentInstance();
  41316. const _currentRowKey = ref(null);
  41317. const currentRow = ref(null);
  41318. const setCurrentRowKey = (key) => {
  41319. instance.store.assertRowKey();
  41320. _currentRowKey.value = key;
  41321. setCurrentRowByKey(key);
  41322. };
  41323. const restoreCurrentRowKey = () => {
  41324. _currentRowKey.value = null;
  41325. };
  41326. const setCurrentRowByKey = (key) => {
  41327. const { data, rowKey } = watcherData;
  41328. const oldCurrentRow = currentRow.value;
  41329. let _currentRow = null;
  41330. if (rowKey.value) _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey.value) === key) ?? null;
  41331. currentRow.value = _currentRow ?? null;
  41332. instance.emit("current-change", currentRow.value, oldCurrentRow);
  41333. };
  41334. const updateCurrentRow = (_currentRow) => {
  41335. const oldCurrentRow = currentRow.value;
  41336. if (_currentRow && _currentRow !== oldCurrentRow) {
  41337. currentRow.value = _currentRow;
  41338. instance.emit("current-change", currentRow.value, oldCurrentRow);
  41339. return;
  41340. }
  41341. if (!_currentRow && oldCurrentRow) {
  41342. currentRow.value = null;
  41343. instance.emit("current-change", null, oldCurrentRow);
  41344. }
  41345. };
  41346. const updateCurrentRowData = () => {
  41347. const rowKey = watcherData.rowKey.value;
  41348. const data = watcherData.data.value || [];
  41349. const oldCurrentRow = currentRow.value;
  41350. if (oldCurrentRow && !data.includes(oldCurrentRow)) if (rowKey) setCurrentRowByKey(getRowIdentity(oldCurrentRow, rowKey));
  41351. else {
  41352. currentRow.value = null;
  41353. instance.emit("current-change", null, oldCurrentRow);
  41354. }
  41355. else if (_currentRowKey.value) {
  41356. setCurrentRowByKey(_currentRowKey.value);
  41357. restoreCurrentRowKey();
  41358. }
  41359. };
  41360. return {
  41361. setCurrentRowKey,
  41362. restoreCurrentRowKey,
  41363. setCurrentRowByKey,
  41364. updateCurrentRow,
  41365. updateCurrentRowData,
  41366. states: {
  41367. _currentRowKey,
  41368. currentRow
  41369. }
  41370. };
  41371. }
  41372. //#endregion
  41373. //#region node_modules/element-plus/es/components/table/src/store/tree.mjs
  41374. function useTree$2(watcherData) {
  41375. const expandRowKeys = ref([]);
  41376. const treeData = ref({});
  41377. const indent = ref(16);
  41378. const lazy = ref(false);
  41379. const lazyTreeNodeMap = ref({});
  41380. const lazyColumnIdentifier = ref("hasChildren");
  41381. const childrenColumnName = ref("children");
  41382. const checkStrictly = ref(false);
  41383. const instance = getCurrentInstance();
  41384. const normalizedData = computed(() => {
  41385. if (!watcherData.rowKey.value) return {};
  41386. return normalize(watcherData.data.value || []);
  41387. });
  41388. const normalizedLazyNode = computed(() => {
  41389. const rowKey = watcherData.rowKey.value;
  41390. const keys = Object.keys(lazyTreeNodeMap.value);
  41391. const res = {};
  41392. if (!keys.length) return res;
  41393. keys.forEach((key) => {
  41394. if (lazyTreeNodeMap.value[key].length) {
  41395. const item = { children: [] };
  41396. lazyTreeNodeMap.value[key].forEach((row) => {
  41397. const currentRowKey = getRowIdentity(row, rowKey);
  41398. item.children.push(currentRowKey);
  41399. if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) res[currentRowKey] = { children: [] };
  41400. });
  41401. res[key] = item;
  41402. }
  41403. });
  41404. return res;
  41405. });
  41406. const normalize = (data) => {
  41407. const rowKey = watcherData.rowKey.value;
  41408. const res = {};
  41409. walkTreeNode(data, (parent, children, level) => {
  41410. const parentId = getRowIdentity(parent, rowKey);
  41411. if (isArray$1(children)) res[parentId] = {
  41412. children: children.map((row) => getRowIdentity(row, rowKey)),
  41413. level
  41414. };
  41415. else if (lazy.value) res[parentId] = {
  41416. children: [],
  41417. lazy: true,
  41418. level
  41419. };
  41420. }, childrenColumnName.value, lazyColumnIdentifier.value, lazy.value);
  41421. return res;
  41422. };
  41423. const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll) => {
  41424. ifExpandAll ||= instance.store?.states.defaultExpandAll.value;
  41425. const nested = normalizedData.value;
  41426. const normalizedLazyNode_ = normalizedLazyNode.value;
  41427. const keys = Object.keys(nested);
  41428. const newTreeData = {};
  41429. if (keys.length) {
  41430. const oldTreeData = unref(treeData);
  41431. const rootLazyRowKeys = [];
  41432. const getExpanded = (oldValue, key) => {
  41433. if (ifChangeExpandRowKeys) if (expandRowKeys.value) return ifExpandAll || expandRowKeys.value.includes(key);
  41434. else return !!(ifExpandAll || oldValue?.expanded);
  41435. else {
  41436. const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key);
  41437. return !!(oldValue?.expanded || included);
  41438. }
  41439. };
  41440. keys.forEach((key) => {
  41441. const oldValue = oldTreeData[key];
  41442. const newValue = { ...nested[key] };
  41443. newValue.expanded = getExpanded(oldValue, key);
  41444. if (newValue.lazy) {
  41445. const { loaded = false, loading = false } = oldValue || {};
  41446. newValue.loaded = !!loaded;
  41447. newValue.loading = !!loading;
  41448. rootLazyRowKeys.push(key);
  41449. }
  41450. newTreeData[key] = newValue;
  41451. });
  41452. const lazyKeys = Object.keys(normalizedLazyNode_);
  41453. if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) lazyKeys.forEach((key) => {
  41454. const oldValue = oldTreeData[key];
  41455. const lazyNodeChildren = normalizedLazyNode_[key].children;
  41456. if (rootLazyRowKeys.includes(key)) {
  41457. if (newTreeData[key].children?.length !== 0) throw new Error("[ElTable]children must be an empty array.");
  41458. newTreeData[key].children = lazyNodeChildren;
  41459. } else {
  41460. const { loaded = false, loading = false } = oldValue || {};
  41461. newTreeData[key] = {
  41462. lazy: true,
  41463. loaded: !!loaded,
  41464. loading: !!loading,
  41465. expanded: getExpanded(oldValue, key),
  41466. children: lazyNodeChildren,
  41467. level: void 0
  41468. };
  41469. }
  41470. });
  41471. }
  41472. treeData.value = newTreeData;
  41473. instance.store?.updateTableScrollY();
  41474. };
  41475. watch(() => expandRowKeys.value, () => {
  41476. updateTreeData(true);
  41477. });
  41478. watch(() => normalizedData.value, () => {
  41479. updateTreeData();
  41480. });
  41481. watch(() => normalizedLazyNode.value, () => {
  41482. updateTreeData();
  41483. });
  41484. const updateTreeExpandKeys = (value) => {
  41485. expandRowKeys.value = value;
  41486. updateTreeData();
  41487. };
  41488. const isUseLazy = (data) => {
  41489. return lazy.value && data && "loaded" in data && !data.loaded;
  41490. };
  41491. const toggleTreeExpansion = (row, expanded) => {
  41492. instance.store.assertRowKey();
  41493. const rowKey = watcherData.rowKey.value;
  41494. const id = getRowIdentity(row, rowKey);
  41495. const data = id && treeData.value[id];
  41496. if (id && data && "expanded" in data) {
  41497. const oldExpanded = data.expanded;
  41498. expanded = isUndefined(expanded) ? !data.expanded : expanded;
  41499. treeData.value[id].expanded = expanded;
  41500. if (oldExpanded !== expanded) instance.emit("expand-change", row, expanded);
  41501. expanded && isUseLazy(data) && loadData(row, id, data);
  41502. instance.store.updateTableScrollY();
  41503. }
  41504. };
  41505. const loadOrToggle = (row) => {
  41506. instance.store.assertRowKey();
  41507. const rowKey = watcherData.rowKey.value;
  41508. const id = getRowIdentity(row, rowKey);
  41509. const data = treeData.value[id];
  41510. if (isUseLazy(data)) loadData(row, id, data);
  41511. else toggleTreeExpansion(row, void 0);
  41512. };
  41513. const loadData = (row, key, treeNode) => {
  41514. const { load } = instance.props;
  41515. if (load && !treeData.value[key].loaded) {
  41516. treeData.value[key].loading = true;
  41517. load(row, treeNode, (data) => {
  41518. if (!isArray$1(data)) throw new TypeError("[ElTable] data must be an array");
  41519. treeData.value[key].loading = false;
  41520. treeData.value[key].loaded = true;
  41521. treeData.value[key].expanded = true;
  41522. if (data.length) lazyTreeNodeMap.value[key] = data;
  41523. instance.emit("expand-change", row, true);
  41524. });
  41525. }
  41526. };
  41527. const updateKeyChildren = (key, data) => {
  41528. const { lazy, rowKey } = instance.props;
  41529. if (!lazy) return;
  41530. if (!rowKey) throw new Error("[Table] rowKey is required in updateKeyChild");
  41531. if (lazyTreeNodeMap.value[key]) lazyTreeNodeMap.value[key] = data;
  41532. };
  41533. return {
  41534. loadData,
  41535. loadOrToggle,
  41536. toggleTreeExpansion,
  41537. updateTreeExpandKeys,
  41538. updateTreeData,
  41539. updateKeyChildren,
  41540. normalize,
  41541. states: {
  41542. expandRowKeys,
  41543. treeData,
  41544. indent,
  41545. lazy,
  41546. lazyTreeNodeMap,
  41547. lazyColumnIdentifier,
  41548. childrenColumnName,
  41549. checkStrictly
  41550. }
  41551. };
  41552. }
  41553. //#endregion
  41554. //#region node_modules/element-plus/es/components/table/src/store/watcher.mjs
  41555. var sortData = (data, states) => {
  41556. const sortingColumn = states.sortingColumn;
  41557. if (!sortingColumn || isString(sortingColumn.sortable)) return data;
  41558. return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
  41559. };
  41560. var doFlattenColumns = (columns) => {
  41561. const result = [];
  41562. columns.forEach((column) => {
  41563. if (column.children && column.children.length > 0) result.push.apply(result, doFlattenColumns(column.children));
  41564. else result.push(column);
  41565. });
  41566. return result;
  41567. };
  41568. function useWatcher$1() {
  41569. const instance = getCurrentInstance();
  41570. const { size: tableSize } = toRefs(instance.proxy?.$props);
  41571. const rowKey = ref(null);
  41572. const data = ref([]);
  41573. const _data = ref([]);
  41574. const isComplex = ref(false);
  41575. const _columns = ref([]);
  41576. const originColumns = ref([]);
  41577. const columns = ref([]);
  41578. const fixedColumns = ref([]);
  41579. const rightFixedColumns = ref([]);
  41580. const leafColumns = ref([]);
  41581. const fixedLeafColumns = ref([]);
  41582. const rightFixedLeafColumns = ref([]);
  41583. const updateOrderFns = [];
  41584. const leafColumnsLength = ref(0);
  41585. const fixedLeafColumnsLength = ref(0);
  41586. const rightFixedLeafColumnsLength = ref(0);
  41587. const isAllSelected = ref(false);
  41588. const selection = ref([]);
  41589. const reserveSelection = ref(false);
  41590. const selectOnIndeterminate = ref(false);
  41591. const selectable = ref(null);
  41592. const rowExpandable = ref(null);
  41593. const filters = ref({});
  41594. const filteredData = ref(null);
  41595. const sortingColumn = ref(null);
  41596. const sortProp = ref(null);
  41597. const sortOrder = ref(null);
  41598. const hoverRow = ref(null);
  41599. const selectedMap = computed(() => {
  41600. return rowKey.value ? getKeysMap(selection.value, rowKey.value) : void 0;
  41601. });
  41602. watch(data, () => {
  41603. if (instance.state) {
  41604. scheduleLayout(false);
  41605. if (instance.props.tableLayout === "auto") instance.refs.tableHeaderRef?.updateFixedColumnStyle();
  41606. }
  41607. }, { deep: true });
  41608. const assertRowKey = () => {
  41609. if (!rowKey.value) throw new Error("[ElTable] prop row-key is required");
  41610. };
  41611. const updateChildFixed = (column) => {
  41612. column.children?.forEach((childColumn) => {
  41613. childColumn.fixed = column.fixed;
  41614. updateChildFixed(childColumn);
  41615. });
  41616. };
  41617. const updateColumns = () => {
  41618. _columns.value.forEach((column) => {
  41619. updateChildFixed(column);
  41620. });
  41621. fixedColumns.value = _columns.value.filter((column) => [true, "left"].includes(column.fixed));
  41622. const selectColumn = _columns.value.find((column) => column.type === "selection");
  41623. let selectColFixLeft;
  41624. if (selectColumn && selectColumn.fixed !== "right" && !fixedColumns.value.includes(selectColumn)) {
  41625. if (_columns.value.indexOf(selectColumn) === 0 && fixedColumns.value.length) {
  41626. fixedColumns.value.unshift(selectColumn);
  41627. selectColFixLeft = true;
  41628. }
  41629. }
  41630. rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right");
  41631. const notFixedColumns = _columns.value.filter((column) => (selectColFixLeft ? column.type !== "selection" : true) && !column.fixed);
  41632. originColumns.value = Array.from(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);
  41633. const leafColumns = doFlattenColumns(notFixedColumns);
  41634. const fixedLeafColumns = doFlattenColumns(fixedColumns.value);
  41635. const rightFixedLeafColumns = doFlattenColumns(rightFixedColumns.value);
  41636. leafColumnsLength.value = leafColumns.length;
  41637. fixedLeafColumnsLength.value = fixedLeafColumns.length;
  41638. rightFixedLeafColumnsLength.value = rightFixedLeafColumns.length;
  41639. columns.value = Array.from(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
  41640. isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;
  41641. };
  41642. const scheduleLayout = (needUpdateColumns, immediate = false) => {
  41643. if (needUpdateColumns) updateColumns();
  41644. if (immediate) instance.state.doLayout();
  41645. else instance.state.debouncedUpdateLayout();
  41646. };
  41647. const isSelected = (row) => {
  41648. if (selectedMap.value) return !!selectedMap.value[getRowIdentity(row, rowKey.value)];
  41649. else return selection.value.includes(row);
  41650. };
  41651. const clearSelection = () => {
  41652. isAllSelected.value = false;
  41653. const oldSelection = selection.value;
  41654. selection.value = [];
  41655. if (oldSelection.length) instance.emit("selection-change", []);
  41656. };
  41657. const cleanSelection = () => {
  41658. let deleted;
  41659. if (rowKey.value) {
  41660. deleted = [];
  41661. const childrenKey = instance?.store?.states?.childrenColumnName.value;
  41662. const dataMap = getKeysMap(data.value, rowKey.value, true, childrenKey);
  41663. for (const key in selectedMap.value) if (hasOwn(selectedMap.value, key) && !dataMap[key]) deleted.push(selectedMap.value[key].row);
  41664. } else deleted = selection.value.filter((item) => !data.value.includes(item));
  41665. if (deleted.length) {
  41666. const newSelection = selection.value.filter((item) => !deleted.includes(item));
  41667. selection.value = newSelection;
  41668. instance.emit("selection-change", newSelection.slice());
  41669. }
  41670. };
  41671. const getSelectionRows = () => {
  41672. return (selection.value || []).slice();
  41673. };
  41674. const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => {
  41675. const treeProps = {
  41676. children: instance?.store?.states?.childrenColumnName.value,
  41677. checkStrictly: instance?.store?.states?.checkStrictly.value
  41678. };
  41679. if (toggleRowStatus(selection.value, row, selected, treeProps, ignoreSelectable ? void 0 : selectable.value, data.value.indexOf(row), rowKey.value)) {
  41680. const newSelection = (selection.value || []).slice();
  41681. if (emitChange) instance.emit("select", newSelection, row);
  41682. instance.emit("selection-change", newSelection);
  41683. }
  41684. };
  41685. const _toggleAllSelection = () => {
  41686. const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);
  41687. isAllSelected.value = value;
  41688. let selectionChanged = false;
  41689. let childrenCount = 0;
  41690. const rowKey = instance?.store?.states?.rowKey.value;
  41691. const { childrenColumnName } = instance.store.states;
  41692. const treeProps = {
  41693. children: childrenColumnName.value,
  41694. checkStrictly: false
  41695. };
  41696. data.value.forEach((row, index) => {
  41697. const rowIndex = index + childrenCount;
  41698. if (toggleRowStatus(selection.value, row, value, treeProps, selectable.value, rowIndex, rowKey)) selectionChanged = true;
  41699. childrenCount += getChildrenCount(getRowIdentity(row, rowKey));
  41700. });
  41701. if (selectionChanged) instance.emit("selection-change", selection.value ? selection.value.slice() : []);
  41702. instance.emit("select-all", (selection.value || []).slice());
  41703. };
  41704. const updateAllSelected = () => {
  41705. if (data.value?.length === 0) {
  41706. isAllSelected.value = false;
  41707. return;
  41708. }
  41709. const { childrenColumnName } = instance.store.states;
  41710. let rowIndex = 0;
  41711. let selectedCount = 0;
  41712. const checkSelectedStatus = (data) => {
  41713. for (const row of data) {
  41714. const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex);
  41715. if (!isSelected(row)) {
  41716. if (!selectable.value || isRowSelectable) return false;
  41717. } else selectedCount++;
  41718. rowIndex++;
  41719. if (row[childrenColumnName.value]?.length && !checkSelectedStatus(row[childrenColumnName.value])) return false;
  41720. }
  41721. return true;
  41722. };
  41723. const isAllSelected_ = checkSelectedStatus(data.value || []);
  41724. isAllSelected.value = selectedCount === 0 ? false : isAllSelected_;
  41725. };
  41726. const getChildrenCount = (rowKey) => {
  41727. if (!instance || !instance.store) return 0;
  41728. const { treeData } = instance.store.states;
  41729. let count = 0;
  41730. const children = treeData.value[rowKey]?.children;
  41731. if (children) {
  41732. count += children.length;
  41733. children.forEach((childKey) => {
  41734. count += getChildrenCount(childKey);
  41735. });
  41736. }
  41737. return count;
  41738. };
  41739. const updateFilters = (column, values) => {
  41740. const filters_ = {};
  41741. castArray$1(column).forEach((col) => {
  41742. filters.value[col.id] = values;
  41743. filters_[col.columnKey || col.id] = values;
  41744. });
  41745. return filters_;
  41746. };
  41747. const updateSort = (column, prop, order) => {
  41748. if (sortingColumn.value && sortingColumn.value !== column) sortingColumn.value.order = null;
  41749. sortingColumn.value = column;
  41750. sortProp.value = prop;
  41751. sortOrder.value = order;
  41752. };
  41753. const execFilter = () => {
  41754. let sourceData = unref(_data);
  41755. Object.keys(filters.value).forEach((columnId) => {
  41756. const values = filters.value[columnId];
  41757. if (!values || values.length === 0) return;
  41758. const column = getColumnById({ columns: columns.value }, columnId);
  41759. if (column && column.filterMethod) sourceData = sourceData.filter((row) => {
  41760. return values.some((value) => column.filterMethod.call(null, value, row, column));
  41761. });
  41762. });
  41763. filteredData.value = sourceData;
  41764. };
  41765. const execSort = () => {
  41766. data.value = sortData(filteredData.value ?? [], {
  41767. sortingColumn: sortingColumn.value,
  41768. sortProp: sortProp.value,
  41769. sortOrder: sortOrder.value
  41770. });
  41771. };
  41772. const execQuery = (ignore = void 0) => {
  41773. if (!ignore?.filter) execFilter();
  41774. execSort();
  41775. };
  41776. const clearFilter = (columnKeys) => {
  41777. const { tableHeaderRef } = instance.refs;
  41778. if (!tableHeaderRef) return;
  41779. const panels = Object.assign({}, tableHeaderRef.filterPanels);
  41780. const keys = Object.keys(panels);
  41781. if (!keys.length) return;
  41782. if (isString(columnKeys)) columnKeys = [columnKeys];
  41783. if (isArray$1(columnKeys)) {
  41784. const columns_ = columnKeys.map((key) => getColumnByKey({ columns: columns.value }, key));
  41785. keys.forEach((key) => {
  41786. const column = columns_.find((col) => col.id === key);
  41787. if (column) column.filteredValue = [];
  41788. });
  41789. instance.store.commit("filterChange", {
  41790. column: columns_,
  41791. values: [],
  41792. silent: true,
  41793. multi: true
  41794. });
  41795. } else {
  41796. keys.forEach((key) => {
  41797. const column = columns.value.find((col) => col.id === key);
  41798. if (column) column.filteredValue = [];
  41799. });
  41800. filters.value = {};
  41801. instance.store.commit("filterChange", {
  41802. column: {},
  41803. values: [],
  41804. silent: true
  41805. });
  41806. }
  41807. };
  41808. const clearSort = () => {
  41809. if (!sortingColumn.value) return;
  41810. updateSort(null, null, null);
  41811. instance.store.commit("changeSortCondition", { silent: true });
  41812. };
  41813. const { setExpandRowKeys, toggleRowExpansion, updateExpandRows, states: expandStates, isRowExpanded } = useExpand({
  41814. data,
  41815. rowKey
  41816. });
  41817. const { updateTreeExpandKeys, toggleTreeExpansion, updateTreeData, updateKeyChildren, loadOrToggle, states: treeStates } = useTree$2({
  41818. data,
  41819. rowKey
  41820. });
  41821. const { updateCurrentRowData, updateCurrentRow, setCurrentRowKey, states: currentData } = useCurrent({
  41822. data,
  41823. rowKey
  41824. });
  41825. const setExpandRowKeysAdapter = (val) => {
  41826. setExpandRowKeys(val);
  41827. updateTreeExpandKeys(val);
  41828. };
  41829. const toggleRowExpansionAdapter = (row, expanded) => {
  41830. if (columns.value.some(({ type }) => type === "expand")) toggleRowExpansion(row, expanded);
  41831. else toggleTreeExpansion(row, expanded);
  41832. };
  41833. return {
  41834. assertRowKey,
  41835. updateColumns,
  41836. scheduleLayout,
  41837. isSelected,
  41838. clearSelection,
  41839. cleanSelection,
  41840. getSelectionRows,
  41841. toggleRowSelection,
  41842. _toggleAllSelection,
  41843. toggleAllSelection: null,
  41844. updateAllSelected,
  41845. updateFilters,
  41846. updateCurrentRow,
  41847. updateSort,
  41848. execFilter,
  41849. execSort,
  41850. execQuery,
  41851. clearFilter,
  41852. clearSort,
  41853. toggleRowExpansion,
  41854. setExpandRowKeysAdapter,
  41855. setCurrentRowKey,
  41856. toggleRowExpansionAdapter,
  41857. isRowExpanded,
  41858. updateExpandRows,
  41859. updateCurrentRowData,
  41860. loadOrToggle,
  41861. updateTreeData,
  41862. updateKeyChildren,
  41863. states: {
  41864. tableSize,
  41865. rowKey,
  41866. data,
  41867. _data,
  41868. isComplex,
  41869. _columns,
  41870. originColumns,
  41871. columns,
  41872. fixedColumns,
  41873. rightFixedColumns,
  41874. leafColumns,
  41875. fixedLeafColumns,
  41876. rightFixedLeafColumns,
  41877. updateOrderFns,
  41878. leafColumnsLength,
  41879. fixedLeafColumnsLength,
  41880. rightFixedLeafColumnsLength,
  41881. isAllSelected,
  41882. selection,
  41883. reserveSelection,
  41884. selectOnIndeterminate,
  41885. selectable,
  41886. rowExpandable,
  41887. filters,
  41888. filteredData,
  41889. sortingColumn,
  41890. sortProp,
  41891. sortOrder,
  41892. hoverRow,
  41893. ...expandStates,
  41894. ...treeStates,
  41895. ...currentData
  41896. }
  41897. };
  41898. }
  41899. //#endregion
  41900. //#region node_modules/element-plus/es/components/table/src/store/index.mjs
  41901. function replaceColumn(array, column) {
  41902. return array.map((item) => {
  41903. if (item.id === column.id) return column;
  41904. else if (item.children?.length) item.children = replaceColumn(item.children, column);
  41905. return item;
  41906. });
  41907. }
  41908. function sortColumn(array) {
  41909. array.forEach((item) => {
  41910. item.no = item.getColumnIndex?.();
  41911. if (item.children?.length) sortColumn(item.children);
  41912. });
  41913. array.sort((cur, pre) => cur.no - pre.no);
  41914. }
  41915. function useStore() {
  41916. const instance = getCurrentInstance();
  41917. const watcher = useWatcher$1();
  41918. const ns = useNamespace("table");
  41919. const { t } = useLocale();
  41920. const mutations = {
  41921. setData(states, data) {
  41922. const dataInstanceChanged = unref(states._data) !== data;
  41923. states.data.value = data;
  41924. states._data.value = data;
  41925. instance.store.execQuery();
  41926. instance.store.updateCurrentRowData();
  41927. instance.store.updateExpandRows();
  41928. instance.store.updateTreeData(instance.store.states.defaultExpandAll.value);
  41929. if (unref(states.reserveSelection)) instance.store.assertRowKey();
  41930. else if (dataInstanceChanged) instance.store.clearSelection();
  41931. else instance.store.cleanSelection();
  41932. instance.store.updateAllSelected();
  41933. if (instance.$ready) instance.store.scheduleLayout();
  41934. },
  41935. insertColumn(states, column, parent, updateColumnOrder) {
  41936. const array = unref(states._columns);
  41937. let newColumns = [];
  41938. if (!parent) {
  41939. array.push(column);
  41940. newColumns = array;
  41941. } else {
  41942. if (parent && !parent.children) parent.children = [];
  41943. parent.children?.push(column);
  41944. newColumns = replaceColumn(array, parent);
  41945. }
  41946. sortColumn(newColumns);
  41947. states._columns.value = newColumns;
  41948. states.updateOrderFns.push(updateColumnOrder);
  41949. if (column.type === "selection") {
  41950. states.selectable.value = column.selectable;
  41951. states.reserveSelection.value = column.reserveSelection;
  41952. }
  41953. if (instance.$ready) {
  41954. instance.store.updateColumns();
  41955. instance.store.scheduleLayout();
  41956. }
  41957. },
  41958. updateColumnOrder(states, column) {
  41959. if (column.getColumnIndex?.() === column.no) return;
  41960. sortColumn(states._columns.value);
  41961. if (instance.$ready) instance.store.updateColumns();
  41962. },
  41963. removeColumn(states, column, parent, updateColumnOrder) {
  41964. const array = unref(states._columns) || [];
  41965. if (parent) {
  41966. parent.children?.splice(parent.children.findIndex((item) => item.id === column.id), 1);
  41967. nextTick(() => {
  41968. if (parent.children?.length === 0) delete parent.children;
  41969. });
  41970. states._columns.value = replaceColumn(array, parent);
  41971. } else {
  41972. const index = array.indexOf(column);
  41973. if (index > -1) {
  41974. array.splice(index, 1);
  41975. states._columns.value = array;
  41976. }
  41977. }
  41978. const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder);
  41979. updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1);
  41980. if (instance.$ready) {
  41981. instance.store.updateColumns();
  41982. instance.store.scheduleLayout();
  41983. }
  41984. },
  41985. sort(states, options) {
  41986. const { prop, order, init } = options;
  41987. if (prop) {
  41988. const column = unref(states.columns).find((column) => column.property === prop);
  41989. if (column) {
  41990. column.order = order;
  41991. instance.store.updateSort(column, prop, order);
  41992. instance.store.commit("changeSortCondition", { init });
  41993. }
  41994. }
  41995. },
  41996. changeSortCondition(states, options) {
  41997. const { sortingColumn, sortProp, sortOrder } = states;
  41998. const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder);
  41999. if (isNull(orderValue)) {
  42000. states.sortingColumn.value = null;
  42001. states.sortProp.value = null;
  42002. }
  42003. instance.store.execQuery({ filter: true });
  42004. if (!options || !(options.silent || options.init)) instance.emit("sort-change", {
  42005. column: columnValue,
  42006. prop: propValue,
  42007. order: orderValue
  42008. });
  42009. instance.store.updateTableScrollY();
  42010. },
  42011. filterChange(_states, options) {
  42012. const { column, values, silent } = options;
  42013. const newFilters = instance.store.updateFilters(column, values);
  42014. instance.store.execQuery();
  42015. if (!silent) instance.emit("filter-change", newFilters);
  42016. instance.store.updateTableScrollY();
  42017. },
  42018. toggleAllSelection() {
  42019. instance.store.toggleAllSelection?.();
  42020. },
  42021. rowSelectedChanged(_states, row) {
  42022. instance.store.toggleRowSelection(row);
  42023. instance.store.updateAllSelected();
  42024. },
  42025. setHoverRow(states, row) {
  42026. states.hoverRow.value = row;
  42027. },
  42028. setCurrentRow(_states, row) {
  42029. instance.store.updateCurrentRow(row);
  42030. }
  42031. };
  42032. const commit = function(name, ...args) {
  42033. const mutations = instance.store.mutations;
  42034. if (mutations[name]) mutations[name].apply(instance, [instance.store.states, ...args]);
  42035. else throw new Error(`Action not found: ${name}`);
  42036. };
  42037. const updateTableScrollY = function() {
  42038. nextTick(() => instance.layout.updateScrollY.apply(instance.layout));
  42039. };
  42040. return {
  42041. ns,
  42042. t,
  42043. ...watcher,
  42044. mutations,
  42045. commit,
  42046. updateTableScrollY
  42047. };
  42048. }
  42049. //#endregion
  42050. //#region node_modules/element-plus/es/components/table/src/store/helper.mjs
  42051. var InitialStateMap = {
  42052. rowKey: "rowKey",
  42053. defaultExpandAll: "defaultExpandAll",
  42054. rowExpandable: "rowExpandable",
  42055. selectOnIndeterminate: "selectOnIndeterminate",
  42056. indent: "indent",
  42057. lazy: "lazy",
  42058. ["treeProps.hasChildren"]: {
  42059. key: "lazyColumnIdentifier",
  42060. default: "hasChildren"
  42061. },
  42062. ["treeProps.children"]: {
  42063. key: "childrenColumnName",
  42064. default: "children"
  42065. },
  42066. ["treeProps.checkStrictly"]: {
  42067. key: "checkStrictly",
  42068. default: false
  42069. }
  42070. };
  42071. function createStore(table, props) {
  42072. if (!table) throw new Error("Table is required.");
  42073. const store = useStore();
  42074. store.toggleAllSelection = debounce(store._toggleAllSelection, 10);
  42075. Object.keys(InitialStateMap).forEach((key) => {
  42076. handleValue(getArrKeysValue(props, key), key, store);
  42077. });
  42078. proxyTableProps(store, props);
  42079. return store;
  42080. }
  42081. function proxyTableProps(store, props) {
  42082. Object.keys(InitialStateMap).forEach((key) => {
  42083. watch(() => getArrKeysValue(props, key), (value) => {
  42084. handleValue(value, key, store);
  42085. });
  42086. });
  42087. }
  42088. function handleValue(value, propsKey, store) {
  42089. let newVal = value;
  42090. let storeKey = InitialStateMap[propsKey];
  42091. if (isObject$2(storeKey)) {
  42092. newVal = newVal || storeKey.default;
  42093. storeKey = storeKey.key;
  42094. }
  42095. store.states[storeKey].value = newVal;
  42096. }
  42097. function getArrKeysValue(props, key) {
  42098. if (key.includes(".")) {
  42099. const keyList = key.split(".");
  42100. let value = props;
  42101. keyList.forEach((k) => {
  42102. value = value[k];
  42103. });
  42104. return value;
  42105. } else return props[key];
  42106. }
  42107. //#endregion
  42108. //#region node_modules/element-plus/es/components/table/src/table-layout.mjs
  42109. var TableLayout = class {
  42110. constructor(options) {
  42111. this.observers = [];
  42112. this.table = null;
  42113. this.store = null;
  42114. this.columns = [];
  42115. this.fit = true;
  42116. this.showHeader = true;
  42117. this.height = ref(null);
  42118. this.scrollX = ref(false);
  42119. this.scrollY = ref(false);
  42120. this.bodyWidth = ref(null);
  42121. this.fixedWidth = ref(null);
  42122. this.rightFixedWidth = ref(null);
  42123. this.gutterWidth = 0;
  42124. for (const name in options) if (hasOwn(options, name)) if (isRef(this[name])) this[name].value = options[name];
  42125. else this[name] = options[name];
  42126. if (!this.table) throw new Error("Table is required for Table Layout");
  42127. if (!this.store) throw new Error("Store is required for Table Layout");
  42128. }
  42129. updateScrollY() {
  42130. const height = this.height.value;
  42131. /**
  42132. * When the height is not initialized, it is null.
  42133. * After the table is initialized, when the height is not configured, the height is 0.
  42134. */
  42135. if (isNull(height)) return false;
  42136. const scrollBarRef = this.table.refs.scrollBarRef;
  42137. if (this.table.vnode.el && scrollBarRef?.wrapRef) {
  42138. let scrollY = true;
  42139. const prevScrollY = this.scrollY.value;
  42140. scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
  42141. this.scrollY.value = scrollY;
  42142. return prevScrollY !== scrollY;
  42143. }
  42144. return false;
  42145. }
  42146. setHeight(value, prop = "height") {
  42147. if (!isClient) return;
  42148. const el = this.table.vnode.el;
  42149. value = parseHeight(value);
  42150. this.height.value = Number(value);
  42151. if (!el && (value || value === 0)) {
  42152. nextTick(() => this.setHeight(value, prop));
  42153. return;
  42154. }
  42155. if (el && isNumber(value)) {
  42156. el.style[prop] = `${value}px`;
  42157. this.updateElsHeight();
  42158. } else if (el && isString(value)) {
  42159. el.style[prop] = value;
  42160. this.updateElsHeight();
  42161. }
  42162. }
  42163. setMaxHeight(value) {
  42164. this.setHeight(value, "max-height");
  42165. }
  42166. getFlattenColumns() {
  42167. const flattenColumns = [];
  42168. this.table.store.states.columns.value.forEach((column) => {
  42169. if (column.isColumnGroup) flattenColumns.push.apply(flattenColumns, column.columns);
  42170. else flattenColumns.push(column);
  42171. });
  42172. return flattenColumns;
  42173. }
  42174. updateElsHeight() {
  42175. this.updateScrollY();
  42176. this.notifyObservers("scrollable");
  42177. }
  42178. headerDisplayNone(elm) {
  42179. if (!elm) return true;
  42180. let headerChild = elm;
  42181. while (headerChild.tagName !== "DIV") {
  42182. if (getComputedStyle(headerChild).display === "none") return true;
  42183. headerChild = headerChild.parentElement;
  42184. }
  42185. return false;
  42186. }
  42187. updateColumnsWidth() {
  42188. if (!isClient) return;
  42189. const fit = this.fit;
  42190. const bodyWidth = this.table.vnode.el?.clientWidth;
  42191. let bodyMinWidth = 0;
  42192. const flattenColumns = this.getFlattenColumns();
  42193. const flexColumns = flattenColumns.filter((column) => !isNumber(column.width));
  42194. flattenColumns.forEach((column) => {
  42195. if (isNumber(column.width) && column.realWidth) column.realWidth = null;
  42196. });
  42197. if (flexColumns.length > 0 && fit) {
  42198. flattenColumns.forEach((column) => {
  42199. bodyMinWidth += Number(column.width || column.minWidth || 80);
  42200. });
  42201. if (bodyMinWidth <= bodyWidth) {
  42202. this.scrollX.value = false;
  42203. const totalFlexWidth = bodyWidth - bodyMinWidth;
  42204. if (flexColumns.length === 1) flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;
  42205. else {
  42206. const flexWidthPerPixel = totalFlexWidth / flexColumns.reduce((prev, column) => prev + Number(column.minWidth || 80), 0);
  42207. let noneFirstWidth = 0;
  42208. flexColumns.forEach((column, index) => {
  42209. if (index === 0) return;
  42210. const flexWidth = Math.floor(Number(column.minWidth || 80) * flexWidthPerPixel);
  42211. noneFirstWidth += flexWidth;
  42212. column.realWidth = Number(column.minWidth || 80) + flexWidth;
  42213. });
  42214. flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
  42215. }
  42216. } else {
  42217. this.scrollX.value = true;
  42218. flexColumns.forEach((column) => {
  42219. column.realWidth = Number(column.minWidth);
  42220. });
  42221. }
  42222. this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);
  42223. this.table.state.resizeState.value.width = this.bodyWidth.value;
  42224. } else {
  42225. flattenColumns.forEach((column) => {
  42226. if (!column.width && !column.minWidth) column.realWidth = 80;
  42227. else column.realWidth = Number(column.width || column.minWidth);
  42228. bodyMinWidth += column.realWidth;
  42229. });
  42230. this.scrollX.value = bodyMinWidth > bodyWidth;
  42231. this.bodyWidth.value = bodyMinWidth;
  42232. }
  42233. const fixedColumns = this.store.states.fixedColumns.value;
  42234. if (fixedColumns.length > 0) {
  42235. let fixedWidth = 0;
  42236. fixedColumns.forEach((column) => {
  42237. fixedWidth += Number(column.realWidth || column.width);
  42238. });
  42239. this.fixedWidth.value = fixedWidth;
  42240. }
  42241. const rightFixedColumns = this.store.states.rightFixedColumns.value;
  42242. if (rightFixedColumns.length > 0) {
  42243. let rightFixedWidth = 0;
  42244. rightFixedColumns.forEach((column) => {
  42245. rightFixedWidth += Number(column.realWidth || column.width);
  42246. });
  42247. this.rightFixedWidth.value = rightFixedWidth;
  42248. }
  42249. this.notifyObservers("columns");
  42250. }
  42251. addObserver(observer) {
  42252. this.observers.push(observer);
  42253. }
  42254. removeObserver(observer) {
  42255. const index = this.observers.indexOf(observer);
  42256. if (index !== -1) this.observers.splice(index, 1);
  42257. }
  42258. notifyObservers(event) {
  42259. this.observers.forEach((observer) => {
  42260. switch (event) {
  42261. case "columns":
  42262. observer.state?.onColumnsChange(this);
  42263. break;
  42264. case "scrollable":
  42265. observer.state?.onScrollableChange(this);
  42266. break;
  42267. default: throw new Error(`Table Layout don't have event ${event}.`);
  42268. }
  42269. });
  42270. }
  42271. };
  42272. //#endregion
  42273. //#region node_modules/element-plus/es/components/table/src/tokens.mjs
  42274. var TABLE_INJECTION_KEY = Symbol("ElTable");
  42275. //#endregion
  42276. //#region node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs
  42277. var getAllColumns = (columns) => {
  42278. const result = [];
  42279. columns.forEach((column) => {
  42280. if (column.children) {
  42281. result.push(column);
  42282. result.push.apply(result, getAllColumns(column.children));
  42283. } else result.push(column);
  42284. });
  42285. return result;
  42286. };
  42287. var convertToRows = (originColumns) => {
  42288. let maxLevel = 1;
  42289. const traverse = (column, parent) => {
  42290. if (parent) {
  42291. column.level = parent.level + 1;
  42292. if (maxLevel < column.level) maxLevel = column.level;
  42293. }
  42294. if (column.children) {
  42295. let colSpan = 0;
  42296. column.children.forEach((subColumn) => {
  42297. traverse(subColumn, column);
  42298. colSpan += subColumn.colSpan;
  42299. });
  42300. column.colSpan = colSpan;
  42301. } else column.colSpan = 1;
  42302. };
  42303. originColumns.forEach((column) => {
  42304. column.level = 1;
  42305. traverse(column, void 0);
  42306. });
  42307. const rows = [];
  42308. for (let i = 0; i < maxLevel; i++) rows.push([]);
  42309. getAllColumns(originColumns).forEach((column) => {
  42310. if (!column.children) column.rowSpan = maxLevel - column.level + 1;
  42311. else {
  42312. column.rowSpan = 1;
  42313. column.children.forEach((col) => col.isSubColumn = true);
  42314. }
  42315. rows[column.level - 1].push(column);
  42316. });
  42317. return rows;
  42318. };
  42319. function useUtils$1(props) {
  42320. const parent = inject(TABLE_INJECTION_KEY);
  42321. const columnRows = computed(() => {
  42322. return convertToRows(props.store.states.originColumns.value);
  42323. });
  42324. const isGroup = computed(() => {
  42325. const result = columnRows.value.length > 1;
  42326. if (result && parent) parent.state.isGroup.value = true;
  42327. return result;
  42328. });
  42329. const toggleAllSelection = (event) => {
  42330. event.stopPropagation();
  42331. parent?.store.commit("toggleAllSelection");
  42332. };
  42333. return {
  42334. isGroup,
  42335. toggleAllSelection,
  42336. columnRows
  42337. };
  42338. }
  42339. //#endregion
  42340. //#region node_modules/element-plus/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs
  42341. var filter_panel_vue_vue_type_script_lang_default = defineComponent({
  42342. name: "ElTableFilterPanel",
  42343. components: {
  42344. ElCheckbox,
  42345. ElCheckboxGroup,
  42346. ElScrollbar,
  42347. ElTooltip,
  42348. ElIcon,
  42349. ArrowDown: arrow_down_default,
  42350. ArrowUp: arrow_up_default
  42351. },
  42352. props: {
  42353. placement: {
  42354. type: String,
  42355. default: "bottom-start"
  42356. },
  42357. store: { type: Object },
  42358. column: { type: Object },
  42359. upDataColumn: { type: Function },
  42360. appendTo: useTooltipContentProps.appendTo
  42361. },
  42362. setup(props) {
  42363. const instance = getCurrentInstance();
  42364. const { t } = useLocale();
  42365. const ns = useNamespace("table-filter");
  42366. const parent = instance?.parent;
  42367. if (props.column && !parent.filterPanels.value[props.column.id]) parent.filterPanels.value[props.column.id] = instance;
  42368. const tooltipRef = ref(null);
  42369. const rootRef = ref(null);
  42370. const checkedIndex = ref(0);
  42371. const filters = computed(() => {
  42372. return props.column && props.column.filters;
  42373. });
  42374. const filterClassName = computed(() => {
  42375. if (props.column && props.column.filterClassName) return `${ns.b()} ${props.column.filterClassName}`;
  42376. return ns.b();
  42377. });
  42378. const filterValue = computed({
  42379. get: () => (props.column?.filteredValue || [])[0],
  42380. set: (value) => {
  42381. if (filteredValue.value) if (!isPropAbsent(value)) filteredValue.value.splice(0, 1, value);
  42382. else filteredValue.value.splice(0, 1);
  42383. }
  42384. });
  42385. const filteredValue = computed({
  42386. get() {
  42387. if (props.column) return props.column.filteredValue || [];
  42388. return [];
  42389. },
  42390. set(value) {
  42391. if (props.column) props.upDataColumn?.("filteredValue", value);
  42392. }
  42393. });
  42394. const multiple = computed(() => {
  42395. if (props.column) return props.column.filterMultiple;
  42396. return true;
  42397. });
  42398. const isActive = (filter) => {
  42399. return filter.value === filterValue.value;
  42400. };
  42401. const hidden = () => {
  42402. tooltipRef.value?.onClose();
  42403. };
  42404. const handleConfirm = () => {
  42405. confirmFilter(filteredValue.value);
  42406. hidden();
  42407. };
  42408. const handleReset = () => {
  42409. filteredValue.value = [];
  42410. confirmFilter(filteredValue.value);
  42411. hidden();
  42412. };
  42413. const handleSelect = (_filterValue, index) => {
  42414. filterValue.value = _filterValue;
  42415. checkedIndex.value = index;
  42416. if (!isPropAbsent(_filterValue)) confirmFilter(filteredValue.value);
  42417. else confirmFilter([]);
  42418. hidden();
  42419. };
  42420. const confirmFilter = (filteredValue) => {
  42421. props.store?.commit("filterChange", {
  42422. column: props.column,
  42423. values: filteredValue
  42424. });
  42425. props.store?.updateAllSelected();
  42426. };
  42427. const handleShowTooltip = () => {
  42428. rootRef.value?.focus();
  42429. !multiple.value && initCheckedIndex();
  42430. if (props.column) props.upDataColumn?.("filterOpened", true);
  42431. };
  42432. const handleHideTooltip = () => {
  42433. if (props.column) props.upDataColumn?.("filterOpened", false);
  42434. };
  42435. const initCheckedIndex = () => {
  42436. if (isPropAbsent(filterValue)) {
  42437. checkedIndex.value = 0;
  42438. return;
  42439. }
  42440. const idx = (filters.value || []).findIndex((item) => {
  42441. return item.value === filterValue.value;
  42442. });
  42443. checkedIndex.value = idx >= 0 ? idx + 1 : 0;
  42444. };
  42445. const handleKeydown = (event) => {
  42446. const code = getEventCode(event);
  42447. const len = (filters.value ? filters.value.length : 0) + 1;
  42448. let index = checkedIndex.value;
  42449. let isPreventDefault = true;
  42450. switch (code) {
  42451. case EVENT_CODE.down:
  42452. case EVENT_CODE.right:
  42453. index = (index + 1) % len;
  42454. break;
  42455. case EVENT_CODE.up:
  42456. case EVENT_CODE.left:
  42457. index = (index - 1 + len) % len;
  42458. break;
  42459. case EVENT_CODE.tab:
  42460. hidden();
  42461. isPreventDefault = false;
  42462. break;
  42463. case EVENT_CODE.enter:
  42464. case EVENT_CODE.space:
  42465. if (index === 0) handleSelect(null, 0);
  42466. else {
  42467. const item = (filters.value || [])[index - 1];
  42468. item.value && handleSelect(item.value, index);
  42469. }
  42470. break;
  42471. default:
  42472. isPreventDefault = false;
  42473. break;
  42474. }
  42475. isPreventDefault && event.preventDefault();
  42476. checkedIndex.value = index;
  42477. rootRef.value?.querySelector(`.${ns.e("list-item")}:nth-child(${index + 1})`)?.focus();
  42478. };
  42479. return {
  42480. multiple,
  42481. filterClassName,
  42482. filteredValue,
  42483. filterValue,
  42484. filters,
  42485. handleConfirm,
  42486. handleReset,
  42487. handleSelect,
  42488. isPropAbsent,
  42489. isActive,
  42490. t,
  42491. ns,
  42492. tooltipRef,
  42493. rootRef,
  42494. checkedIndex,
  42495. handleShowTooltip,
  42496. handleHideTooltip,
  42497. handleKeydown
  42498. };
  42499. }
  42500. });
  42501. //#endregion
  42502. //#region node_modules/element-plus/es/components/table/src/filter-panel.mjs
  42503. var _hoisted_1$17 = ["disabled"];
  42504. var _hoisted_2$10 = ["tabindex", "aria-checked"];
  42505. var _hoisted_3$3 = [
  42506. "tabindex",
  42507. "aria-checked",
  42508. "onClick"
  42509. ];
  42510. var _hoisted_4$2 = ["aria-label"];
  42511. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  42512. const _component_el_checkbox = resolveComponent("el-checkbox");
  42513. const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
  42514. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  42515. const _component_arrow_up = resolveComponent("arrow-up");
  42516. const _component_arrow_down = resolveComponent("arrow-down");
  42517. const _component_el_icon = resolveComponent("el-icon");
  42518. const _component_el_tooltip = resolveComponent("el-tooltip");
  42519. return openBlock(), createBlock(_component_el_tooltip, {
  42520. ref: "tooltipRef",
  42521. offset: 0,
  42522. placement: _ctx.placement,
  42523. "show-arrow": false,
  42524. trigger: "click",
  42525. role: "dialog",
  42526. teleported: "",
  42527. effect: "light",
  42528. pure: "",
  42529. loop: "",
  42530. "popper-class": _ctx.filterClassName,
  42531. persistent: "",
  42532. "append-to": _ctx.appendTo,
  42533. onShow: _ctx.handleShowTooltip,
  42534. onHide: _ctx.handleHideTooltip
  42535. }, {
  42536. content: withCtx(() => [_ctx.multiple ? (openBlock(), createElementBlock("div", {
  42537. key: 0,
  42538. ref: "rootRef",
  42539. tabindex: "-1",
  42540. class: normalizeClass(_ctx.ns.e("multiple"))
  42541. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("content")) }, [createVNode(_component_el_scrollbar, { "wrap-class": _ctx.ns.e("wrap") }, {
  42542. default: withCtx(() => [createVNode(_component_el_checkbox_group, {
  42543. modelValue: _ctx.filteredValue,
  42544. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event),
  42545. class: normalizeClass(_ctx.ns.e("checkbox-group"))
  42546. }, {
  42547. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter) => {
  42548. return openBlock(), createBlock(_component_el_checkbox, {
  42549. key: filter.value,
  42550. value: filter.value
  42551. }, {
  42552. default: withCtx(() => [createTextVNode(toDisplayString(filter.text), 1)]),
  42553. _: 2
  42554. }, 1032, ["value"]);
  42555. }), 128))]),
  42556. _: 1
  42557. }, 8, ["modelValue", "class"])]),
  42558. _: 1
  42559. }, 8, ["wrap-class"])], 2), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("bottom")) }, [createBaseVNode("button", {
  42560. class: normalizeClass(_ctx.ns.is("disabled", _ctx.filteredValue.length === 0)),
  42561. disabled: _ctx.filteredValue.length === 0,
  42562. type: "button",
  42563. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args))
  42564. }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_1$17), createBaseVNode("button", {
  42565. type: "button",
  42566. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))
  42567. }, toDisplayString(_ctx.t("el.table.resetFilter")), 1)], 2)], 2)) : (openBlock(), createElementBlock("ul", {
  42568. key: 1,
  42569. ref: "rootRef",
  42570. tabindex: "-1",
  42571. role: "radiogroup",
  42572. class: normalizeClass(_ctx.ns.e("list")),
  42573. onKeydown: _cache[4] || (_cache[4] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
  42574. }, [createBaseVNode("li", {
  42575. role: "radio",
  42576. class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isPropAbsent(_ctx.filterValue))]),
  42577. tabindex: _ctx.checkedIndex === 0 ? 0 : -1,
  42578. "aria-checked": _ctx.isPropAbsent(_ctx.filterValue),
  42579. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null, 0))
  42580. }, toDisplayString(_ctx.t("el.table.clearFilter")), 11, _hoisted_2$10), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter, idx) => {
  42581. return openBlock(), createElementBlock("li", {
  42582. key: filter.value,
  42583. role: "radio",
  42584. class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter))]),
  42585. tabindex: _ctx.checkedIndex === idx + 1 ? 0 : -1,
  42586. "aria-checked": _ctx.isActive(filter),
  42587. onClick: ($event) => _ctx.handleSelect(filter.value, idx + 1)
  42588. }, toDisplayString(filter.text), 11, _hoisted_3$3);
  42589. }), 128))], 34))]),
  42590. default: withCtx(() => [createBaseVNode("button", {
  42591. type: "button",
  42592. class: normalizeClass(`${_ctx.ns.namespace.value}-table__column-filter-trigger`),
  42593. "aria-label": _ctx.t("el.table.filterLabel", { column: _ctx.column?.label || "" })
  42594. }, [createVNode(_component_el_icon, null, {
  42595. default: withCtx(() => [renderSlot(_ctx.$slots, "filter-icon", {}, () => [_ctx.column?.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 }))])]),
  42596. _: 3
  42597. })], 10, _hoisted_4$2)]),
  42598. _: 3
  42599. }, 8, [
  42600. "placement",
  42601. "popper-class",
  42602. "append-to",
  42603. "onShow",
  42604. "onHide"
  42605. ]);
  42606. }
  42607. var filter_panel_default = /* @__PURE__ */ _plugin_vue_export_helper_default(filter_panel_vue_vue_type_script_lang_default, [["render", _sfc_render$4]]);
  42608. //#endregion
  42609. //#region node_modules/element-plus/es/components/table/src/layout-observer.mjs
  42610. function useLayoutObserver(root) {
  42611. const instance = getCurrentInstance();
  42612. onBeforeMount(() => {
  42613. tableLayout.value.addObserver(instance);
  42614. });
  42615. onMounted(() => {
  42616. onColumnsChange(tableLayout.value);
  42617. onScrollableChange(tableLayout.value);
  42618. });
  42619. onUpdated(() => {
  42620. onColumnsChange(tableLayout.value);
  42621. onScrollableChange(tableLayout.value);
  42622. });
  42623. onUnmounted(() => {
  42624. tableLayout.value.removeObserver(instance);
  42625. });
  42626. const tableLayout = computed(() => {
  42627. const layout = root.layout;
  42628. if (!layout) throw new Error("Can not find table layout.");
  42629. return layout;
  42630. });
  42631. const onColumnsChange = (layout) => {
  42632. const cols = root.vnode.el?.querySelectorAll("colgroup > col") || [];
  42633. if (!cols.length) return;
  42634. const flattenColumns = layout.getFlattenColumns();
  42635. const columnsMap = {};
  42636. flattenColumns.forEach((column) => {
  42637. columnsMap[column.id] = column;
  42638. });
  42639. for (let i = 0, j = cols.length; i < j; i++) {
  42640. const col = cols[i];
  42641. const column = columnsMap[col.getAttribute("name")];
  42642. if (column) col.setAttribute("width", column.realWidth || column.width);
  42643. }
  42644. };
  42645. const onScrollableChange = (layout) => {
  42646. const cols = root.vnode.el?.querySelectorAll("colgroup > col[name=gutter]") || [];
  42647. for (let i = 0, j = cols.length; i < j; i++) cols[i].setAttribute("width", layout.scrollY.value ? layout.gutterWidth : "0");
  42648. const ths = root.vnode.el?.querySelectorAll("th.gutter") || [];
  42649. for (let i = 0, j = ths.length; i < j; i++) {
  42650. const th = ths[i];
  42651. th.style.width = layout.scrollY.value ? `${layout.gutterWidth}px` : "0";
  42652. th.style.display = layout.scrollY.value ? "" : "none";
  42653. }
  42654. };
  42655. return {
  42656. tableLayout: tableLayout.value,
  42657. onColumnsChange,
  42658. onScrollableChange
  42659. };
  42660. }
  42661. //#endregion
  42662. //#region node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs
  42663. function useEvent(props, emit) {
  42664. const instance = getCurrentInstance();
  42665. const parent = inject(TABLE_INJECTION_KEY);
  42666. const handleFilterClick = (event) => {
  42667. event.stopPropagation();
  42668. };
  42669. const handleHeaderClick = (event, column) => {
  42670. if (!column.filters && column.sortable) handleSortClick(event, column, false);
  42671. else if (column.filterable && !column.sortable) handleFilterClick(event);
  42672. parent?.emit("header-click", column, event);
  42673. };
  42674. const handleHeaderContextMenu = (event, column) => {
  42675. parent?.emit("header-contextmenu", column, event);
  42676. };
  42677. const draggingColumn = ref(null);
  42678. const dragging = ref(false);
  42679. const dragState = ref();
  42680. const handleMouseDown = (event, column) => {
  42681. if (!isClient) return;
  42682. if (column.children && column.children.length > 0) return;
  42683. /* istanbul ignore if */
  42684. if (draggingColumn.value && props.border && draggingColumn.value.id === column.id) {
  42685. dragging.value = true;
  42686. const table = parent;
  42687. emit("set-drag-visible", true);
  42688. const tableLeft = (table?.vnode.el)?.getBoundingClientRect().left;
  42689. const columnEl = instance?.vnode?.el?.querySelector(`th.${column.id}`);
  42690. const columnRect = columnEl.getBoundingClientRect();
  42691. const minLeft = columnRect.left - tableLeft + 30;
  42692. addClass(columnEl, "noclick");
  42693. dragState.value = {
  42694. startMouseLeft: event.clientX,
  42695. startLeft: columnRect.right - tableLeft,
  42696. startColumnLeft: columnRect.left - tableLeft,
  42697. tableLeft
  42698. };
  42699. const resizeProxy = table?.refs.resizeProxy;
  42700. resizeProxy.style.left = `${dragState.value.startLeft}px`;
  42701. document.onselectstart = function() {
  42702. return false;
  42703. };
  42704. document.ondragstart = function() {
  42705. return false;
  42706. };
  42707. const handleMouseMove = (event) => {
  42708. const deltaLeft = event.clientX - dragState.value.startMouseLeft;
  42709. const proxyLeft = dragState.value.startLeft + deltaLeft;
  42710. resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`;
  42711. };
  42712. const handleMouseUp = () => {
  42713. if (dragging.value) {
  42714. const { startColumnLeft, startLeft } = dragState.value;
  42715. column.width = column.realWidth = Number.parseInt(resizeProxy.style.left, 10) - startColumnLeft;
  42716. table?.emit("header-dragend", column.width, startLeft - startColumnLeft, column, event);
  42717. requestAnimationFrame(() => {
  42718. props.store.scheduleLayout(false, true);
  42719. });
  42720. document.body.style.cursor = "";
  42721. dragging.value = false;
  42722. draggingColumn.value = null;
  42723. dragState.value = void 0;
  42724. emit("set-drag-visible", false);
  42725. }
  42726. document.removeEventListener("mousemove", handleMouseMove);
  42727. document.removeEventListener("mouseup", handleMouseUp);
  42728. document.onselectstart = null;
  42729. document.ondragstart = null;
  42730. setTimeout(() => {
  42731. removeClass(columnEl, "noclick");
  42732. }, 0);
  42733. };
  42734. document.addEventListener("mousemove", handleMouseMove);
  42735. document.addEventListener("mouseup", handleMouseUp);
  42736. }
  42737. };
  42738. const handleMouseMove = (event, column) => {
  42739. if (!props.border || column.children && column.children.length > 0) return;
  42740. const el = event.target;
  42741. const target = isElement$1(el) ? el.closest("th") : null;
  42742. if (!target) return;
  42743. const isSortable = hasClass(target, "is-sortable");
  42744. if (isSortable) {
  42745. const cursor = dragging.value ? "col-resize" : "";
  42746. target.style.cursor = cursor;
  42747. const caret = target.querySelector(".caret-wrapper");
  42748. if (caret) caret.style.cursor = cursor;
  42749. }
  42750. if (!column.resizable || dragging.value) {
  42751. draggingColumn.value = null;
  42752. return;
  42753. }
  42754. const rect = target.getBoundingClientRect();
  42755. const isLastTh = target.parentNode?.lastElementChild === target;
  42756. const allowDrag = props.allowDragLastColumn || !isLastTh;
  42757. const isResizeHandleActive = rect.width > 12 && rect.right - event.clientX < 8 && allowDrag;
  42758. const cursor = isResizeHandleActive ? "col-resize" : "";
  42759. document.body.style.cursor = cursor;
  42760. draggingColumn.value = isResizeHandleActive ? column : null;
  42761. if (isSortable) target.style.cursor = cursor;
  42762. };
  42763. const handleMouseOut = () => {
  42764. if (!isClient || dragging.value) return;
  42765. document.body.style.cursor = "";
  42766. };
  42767. const toggleOrder = ({ order, sortOrders }) => {
  42768. if (order === "") return sortOrders[0];
  42769. const index = sortOrders.indexOf(order || null);
  42770. return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
  42771. };
  42772. const handleSortClick = (event, column, givenOrder) => {
  42773. event.stopPropagation();
  42774. const order = column.order === givenOrder ? null : givenOrder || toggleOrder(column);
  42775. const target = event.target?.closest("th");
  42776. if (target) {
  42777. if (hasClass(target, "noclick")) {
  42778. removeClass(target, "noclick");
  42779. return;
  42780. }
  42781. }
  42782. if (!column.sortable) return;
  42783. const clickTarget = event.currentTarget;
  42784. if (["ascending", "descending"].some((str) => hasClass(clickTarget, str) && !column.sortOrders.includes(str))) return;
  42785. const states = props.store.states;
  42786. let sortProp = states.sortProp.value;
  42787. let sortOrder;
  42788. const sortingColumn = states.sortingColumn.value;
  42789. if (sortingColumn !== column || sortingColumn === column && isNull(sortingColumn.order)) {
  42790. if (sortingColumn) sortingColumn.order = null;
  42791. states.sortingColumn.value = column;
  42792. sortProp = column.property;
  42793. }
  42794. if (!order) sortOrder = column.order = null;
  42795. else sortOrder = column.order = order;
  42796. states.sortProp.value = sortProp;
  42797. states.sortOrder.value = sortOrder;
  42798. parent?.store.commit("changeSortCondition");
  42799. };
  42800. return {
  42801. handleHeaderClick,
  42802. handleHeaderContextMenu,
  42803. handleMouseDown,
  42804. handleMouseMove,
  42805. handleMouseOut,
  42806. handleSortClick,
  42807. handleFilterClick
  42808. };
  42809. }
  42810. //#endregion
  42811. //#region node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs
  42812. function useStyle$2(props) {
  42813. const parent = inject(TABLE_INJECTION_KEY);
  42814. const ns = useNamespace("table");
  42815. const getHeaderRowStyle = (rowIndex) => {
  42816. const headerRowStyle = parent?.props.headerRowStyle;
  42817. if (isFunction$1(headerRowStyle)) return headerRowStyle.call(null, { rowIndex });
  42818. return headerRowStyle;
  42819. };
  42820. const getHeaderRowClass = (rowIndex) => {
  42821. const classes = [];
  42822. const headerRowClassName = parent?.props.headerRowClassName;
  42823. if (isString(headerRowClassName)) classes.push(headerRowClassName);
  42824. else if (isFunction$1(headerRowClassName)) classes.push(headerRowClassName.call(null, { rowIndex }));
  42825. return classes.join(" ");
  42826. };
  42827. const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => {
  42828. let headerCellStyles = parent?.props.headerCellStyle ?? {};
  42829. if (isFunction$1(headerCellStyles)) headerCellStyles = headerCellStyles.call(null, {
  42830. rowIndex,
  42831. columnIndex,
  42832. row,
  42833. column
  42834. });
  42835. const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
  42836. ensurePosition(fixedStyle, "left");
  42837. ensurePosition(fixedStyle, "right");
  42838. return Object.assign({}, headerCellStyles, fixedStyle);
  42839. };
  42840. const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
  42841. const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row);
  42842. const classes = [
  42843. column.id,
  42844. column.order,
  42845. column.headerAlign,
  42846. column.className,
  42847. column.labelClassName,
  42848. ...fixedClasses
  42849. ];
  42850. if (!column.children) classes.push("is-leaf");
  42851. if (column.sortable) classes.push("is-sortable");
  42852. const headerCellClassName = parent?.props.headerCellClassName;
  42853. if (isString(headerCellClassName)) classes.push(headerCellClassName);
  42854. else if (isFunction$1(headerCellClassName)) classes.push(headerCellClassName.call(null, {
  42855. rowIndex,
  42856. columnIndex,
  42857. row,
  42858. column
  42859. }));
  42860. classes.push(ns.e("cell"));
  42861. return classes.filter((className) => Boolean(className)).join(" ");
  42862. };
  42863. return {
  42864. getHeaderRowStyle,
  42865. getHeaderRowClass,
  42866. getHeaderCellStyle,
  42867. getHeaderCellClass
  42868. };
  42869. }
  42870. //#endregion
  42871. //#region node_modules/element-plus/es/components/table/src/table-header/index.mjs
  42872. var table_header_default = defineComponent({
  42873. name: "ElTableHeader",
  42874. components: { ElCheckbox },
  42875. props: {
  42876. fixed: {
  42877. type: String,
  42878. default: ""
  42879. },
  42880. store: {
  42881. required: true,
  42882. type: Object
  42883. },
  42884. border: Boolean,
  42885. defaultSort: {
  42886. type: Object,
  42887. default: () => {
  42888. return {
  42889. prop: "",
  42890. order: ""
  42891. };
  42892. }
  42893. },
  42894. appendFilterPanelTo: { type: String },
  42895. allowDragLastColumn: { type: Boolean }
  42896. },
  42897. setup(props, { emit }) {
  42898. const instance = getCurrentInstance();
  42899. const parent = inject(TABLE_INJECTION_KEY);
  42900. const ns = useNamespace("table");
  42901. const filterPanels = ref({});
  42902. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
  42903. const isTableLayoutAuto = parent?.props.tableLayout === "auto";
  42904. const saveIndexSelection = reactive(/* @__PURE__ */ new Map());
  42905. const theadRef = ref();
  42906. let delayId;
  42907. const updateFixedColumnStyle = () => {
  42908. delayId = setTimeout(() => {
  42909. if (saveIndexSelection.size > 0) {
  42910. saveIndexSelection.forEach((column, key) => {
  42911. const el = theadRef.value.querySelector(`.${key.replace(/\s/g, ".")}`);
  42912. if (el) column.width = el.getBoundingClientRect().width || column.width;
  42913. });
  42914. saveIndexSelection.clear();
  42915. }
  42916. });
  42917. };
  42918. watch(saveIndexSelection, updateFixedColumnStyle);
  42919. onBeforeUnmount(() => {
  42920. if (delayId) {
  42921. clearTimeout(delayId);
  42922. delayId = void 0;
  42923. }
  42924. });
  42925. onMounted(async () => {
  42926. await nextTick();
  42927. await nextTick();
  42928. const { prop, order } = props.defaultSort;
  42929. parent?.store.commit("sort", {
  42930. prop,
  42931. order,
  42932. init: true
  42933. });
  42934. updateFixedColumnStyle();
  42935. });
  42936. const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit);
  42937. const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle$2(props);
  42938. const { isGroup, toggleAllSelection, columnRows } = useUtils$1(props);
  42939. const { t } = useLocale();
  42940. instance.state = {
  42941. onColumnsChange,
  42942. onScrollableChange
  42943. };
  42944. instance.filterPanels = filterPanels;
  42945. return {
  42946. ns,
  42947. t,
  42948. filterPanels,
  42949. onColumnsChange,
  42950. onScrollableChange,
  42951. columnRows,
  42952. getHeaderRowClass,
  42953. getHeaderRowStyle,
  42954. getHeaderCellClass,
  42955. getHeaderCellStyle,
  42956. handleHeaderClick,
  42957. handleHeaderContextMenu,
  42958. handleMouseDown,
  42959. handleMouseMove,
  42960. handleMouseOut,
  42961. handleSortClick,
  42962. handleFilterClick,
  42963. isGroup,
  42964. toggleAllSelection,
  42965. saveIndexSelection,
  42966. isTableLayoutAuto,
  42967. theadRef,
  42968. updateFixedColumnStyle
  42969. };
  42970. },
  42971. render() {
  42972. const { ns, t, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent, saveIndexSelection, isTableLayoutAuto } = this;
  42973. let rowSpan = 1;
  42974. return h$1("thead", {
  42975. ref: "theadRef",
  42976. class: ns.is("group", isGroup)
  42977. }, columnRows.map((subColumns, rowIndex) => h$1("tr", {
  42978. class: getHeaderRowClass(rowIndex),
  42979. key: rowIndex,
  42980. style: getHeaderRowStyle(rowIndex)
  42981. }, subColumns.map((column, cellIndex) => {
  42982. if (column.rowSpan > rowSpan) rowSpan = column.rowSpan;
  42983. const _class = getHeaderCellClass(rowIndex, cellIndex, subColumns, column);
  42984. if (isTableLayoutAuto && column.fixed) saveIndexSelection.set(_class, column);
  42985. return h$1("th", {
  42986. class: _class,
  42987. colspan: column.colSpan,
  42988. key: `${column.id}-thead`,
  42989. rowspan: column.rowSpan,
  42990. scope: column.colSpan > 1 ? "colgroup" : "col",
  42991. ariaSort: column.sortable ? column.order : void 0,
  42992. style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
  42993. onClick: ($event) => {
  42994. if ($event.currentTarget?.classList.contains("noclick")) return;
  42995. handleHeaderClick($event, column);
  42996. },
  42997. onContextmenu: ($event) => handleHeaderContextMenu($event, column),
  42998. onMousedown: ($event) => handleMouseDown($event, column),
  42999. onMousemove: ($event) => handleMouseMove($event, column),
  43000. onMouseout: handleMouseOut
  43001. }, [h$1("div", { class: ["cell", column.filteredValue && column.filteredValue.length > 0 ? "highlight" : ""] }, [
  43002. column.renderHeader ? column.renderHeader({
  43003. column,
  43004. $index: cellIndex,
  43005. store,
  43006. _self: $parent
  43007. }) : column.label,
  43008. column.sortable && h$1("button", {
  43009. type: "button",
  43010. class: "caret-wrapper",
  43011. "aria-label": t("el.table.sortLabel", { column: column.label || "" }),
  43012. onClick: ($event) => handleSortClick($event, column)
  43013. }, [h$1("i", {
  43014. onClick: ($event) => handleSortClick($event, column, "ascending"),
  43015. class: "sort-caret ascending"
  43016. }), h$1("i", {
  43017. onClick: ($event) => handleSortClick($event, column, "descending"),
  43018. class: "sort-caret descending"
  43019. })]),
  43020. column.filterable && h$1(filter_panel_default, {
  43021. store,
  43022. placement: column.filterPlacement || "bottom-start",
  43023. appendTo: $parent?.appendFilterPanelTo,
  43024. column,
  43025. upDataColumn: (key, value) => {
  43026. column[key] = value;
  43027. }
  43028. }, { "filter-icon": () => column.renderFilterIcon ? column.renderFilterIcon({ filterOpened: column.filterOpened }) : null })
  43029. ])]);
  43030. }))));
  43031. }
  43032. });
  43033. //#endregion
  43034. //#region node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs
  43035. function isGreaterThan(a, b, epsilon = .03) {
  43036. return a - b > epsilon;
  43037. }
  43038. function useEvents(props) {
  43039. const parent = inject(TABLE_INJECTION_KEY);
  43040. const tooltipContent = ref("");
  43041. const tooltipTrigger = ref(h$1("div"));
  43042. const handleEvent = (event, row, name) => {
  43043. const table = parent;
  43044. const cell = getCell(event);
  43045. let column = null;
  43046. const namespace = table?.vnode.el?.dataset.prefix;
  43047. if (cell) {
  43048. column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
  43049. if (column) table?.emit(`cell-${name}`, row, column, cell, event);
  43050. }
  43051. table?.emit(`row-${name}`, row, column, event);
  43052. };
  43053. const handleDoubleClick = (event, row) => {
  43054. handleEvent(event, row, "dblclick");
  43055. };
  43056. const handleClick = (event, row) => {
  43057. props.store?.commit("setCurrentRow", row);
  43058. handleEvent(event, row, "click");
  43059. };
  43060. const handleContextMenu = (event, row) => {
  43061. handleEvent(event, row, "contextmenu");
  43062. };
  43063. const handleMouseEnter = debounce((index) => {
  43064. props.store?.commit("setHoverRow", index);
  43065. }, 30);
  43066. const handleMouseLeave = debounce(() => {
  43067. props.store?.commit("setHoverRow", null);
  43068. }, 30);
  43069. const getPadding = (el) => {
  43070. const style = window.getComputedStyle(el, null);
  43071. return {
  43072. left: Number.parseInt(style.paddingLeft, 10) || 0,
  43073. right: Number.parseInt(style.paddingRight, 10) || 0,
  43074. top: Number.parseInt(style.paddingTop, 10) || 0,
  43075. bottom: Number.parseInt(style.paddingBottom, 10) || 0
  43076. };
  43077. };
  43078. const toggleRowClassByCell = (rowSpan, event, toggle) => {
  43079. let node = (event?.target)?.parentNode;
  43080. while (rowSpan > 1) {
  43081. node = node?.nextSibling;
  43082. if (!node || node.nodeName !== "TR") break;
  43083. toggle(node, "hover-row hover-fixed-row");
  43084. rowSpan--;
  43085. }
  43086. };
  43087. const handleCellMouseEnter = (event, row, tooltipOptions) => {
  43088. if (!parent) return;
  43089. const table = parent;
  43090. const cell = getCell(event);
  43091. const namespace = table?.vnode.el?.dataset.prefix;
  43092. let column = null;
  43093. if (cell) {
  43094. column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
  43095. if (!column) return;
  43096. if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, addClass);
  43097. const hoverState = table.hoverState = {
  43098. cell,
  43099. column,
  43100. row
  43101. };
  43102. table?.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event);
  43103. }
  43104. if (!tooltipOptions) {
  43105. if (removePopper?.trigger === cell) removePopper?.();
  43106. return;
  43107. }
  43108. const cellChild = event.target.querySelector(".cell");
  43109. if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length && cellChild.textContent?.trim())) return;
  43110. const range = document.createRange();
  43111. range.setStart(cellChild, 0);
  43112. range.setEnd(cellChild, cellChild.childNodes.length);
  43113. /** detail: https://github.com/element-plus/element-plus/issues/10790
  43114. * What went wrong?
  43115. * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:
  43116. * - Expected: 188
  43117. * - Actual: 188.00000762939453
  43118. */
  43119. const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect();
  43120. const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
  43121. const { top, left, right, bottom } = getPadding(cellChild);
  43122. const horizontalPadding = left + right;
  43123. const verticalPadding = top + bottom;
  43124. if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) createTablePopper(tooltipOptions, (cell?.innerText || cell?.textContent) ?? "", row, column, cell, table);
  43125. else if (removePopper?.trigger === cell) removePopper?.();
  43126. };
  43127. const handleCellMouseLeave = (event) => {
  43128. const cell = getCell(event);
  43129. if (!cell) return;
  43130. if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, removeClass);
  43131. const oldHoverState = parent?.hoverState;
  43132. parent?.emit("cell-mouse-leave", oldHoverState?.row, oldHoverState?.column, oldHoverState?.cell, event);
  43133. };
  43134. return {
  43135. handleDoubleClick,
  43136. handleClick,
  43137. handleContextMenu,
  43138. handleMouseEnter,
  43139. handleMouseLeave,
  43140. handleCellMouseEnter,
  43141. handleCellMouseLeave,
  43142. tooltipContent,
  43143. tooltipTrigger
  43144. };
  43145. }
  43146. //#endregion
  43147. //#region node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs
  43148. function useStyles$1(props) {
  43149. const parent = inject(TABLE_INJECTION_KEY);
  43150. const ns = useNamespace("table");
  43151. const getRowStyle = (row, rowIndex) => {
  43152. const rowStyle = parent?.props.rowStyle;
  43153. if (isFunction$1(rowStyle)) return rowStyle.call(null, {
  43154. row,
  43155. rowIndex
  43156. });
  43157. return rowStyle || null;
  43158. };
  43159. const getRowClass = (row, rowIndex, displayIndex) => {
  43160. const classes = [ns.e("row")];
  43161. if (parent?.props.highlightCurrentRow && row === props.store?.states.currentRow.value) classes.push("current-row");
  43162. if (props.stripe && displayIndex % 2 === 1) classes.push(ns.em("row", "striped"));
  43163. const rowClassName = parent?.props.rowClassName;
  43164. if (isString(rowClassName)) classes.push(rowClassName);
  43165. else if (isFunction$1(rowClassName)) classes.push(rowClassName.call(null, {
  43166. row,
  43167. rowIndex
  43168. }));
  43169. return classes;
  43170. };
  43171. const getCellStyle = (rowIndex, columnIndex, row, column) => {
  43172. const cellStyle = parent?.props.cellStyle;
  43173. let cellStyles = cellStyle ?? {};
  43174. if (isFunction$1(cellStyle)) cellStyles = cellStyle.call(null, {
  43175. rowIndex,
  43176. columnIndex,
  43177. row,
  43178. column
  43179. });
  43180. const fixedStyle = getFixedColumnOffset(columnIndex, props?.fixed, props.store);
  43181. ensurePosition(fixedStyle, "left");
  43182. ensurePosition(fixedStyle, "right");
  43183. return Object.assign({}, cellStyles, fixedStyle);
  43184. };
  43185. const getCellClass = (rowIndex, columnIndex, row, column, offset) => {
  43186. const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props?.fixed, props.store, void 0, offset);
  43187. const classes = [
  43188. column.id,
  43189. column.align,
  43190. column.className,
  43191. ...fixedClasses
  43192. ];
  43193. const cellClassName = parent?.props.cellClassName;
  43194. if (isString(cellClassName)) classes.push(cellClassName);
  43195. else if (isFunction$1(cellClassName)) classes.push(cellClassName.call(null, {
  43196. rowIndex,
  43197. columnIndex,
  43198. row,
  43199. column
  43200. }));
  43201. classes.push(ns.e("cell"));
  43202. return classes.filter((className) => Boolean(className)).join(" ");
  43203. };
  43204. const getSpan = (row, column, rowIndex, columnIndex) => {
  43205. let rowspan = 1;
  43206. let colspan = 1;
  43207. const fn = parent?.props.spanMethod;
  43208. if (isFunction$1(fn)) {
  43209. const result = fn({
  43210. row,
  43211. column,
  43212. rowIndex,
  43213. columnIndex
  43214. });
  43215. if (isArray$1(result)) {
  43216. rowspan = result[0];
  43217. colspan = result[1];
  43218. } else if (isObject$2(result)) {
  43219. rowspan = result.rowspan;
  43220. colspan = result.colspan;
  43221. }
  43222. }
  43223. return {
  43224. rowspan,
  43225. colspan
  43226. };
  43227. };
  43228. const getColspanRealWidth = (columns, colspan, index) => {
  43229. if (colspan < 1) return columns[index].realWidth;
  43230. const widthArr = columns.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan);
  43231. return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1));
  43232. };
  43233. return {
  43234. getRowStyle,
  43235. getRowClass,
  43236. getCellStyle,
  43237. getCellClass,
  43238. getSpan,
  43239. getColspanRealWidth
  43240. };
  43241. }
  43242. //#endregion
  43243. //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.vue_vue_type_script_setup_true_lang.mjs
  43244. var _hoisted_1$16 = ["colspan", "rowspan"];
  43245. //#endregion
  43246. //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.mjs
  43247. var td_wrapper_default = /* @__PURE__ */ defineComponent({
  43248. name: "TableTdWrapper",
  43249. __name: "td-wrapper",
  43250. props: {
  43251. colspan: {
  43252. type: Number,
  43253. default: 1
  43254. },
  43255. rowspan: {
  43256. type: Number,
  43257. default: 1
  43258. }
  43259. },
  43260. setup(__props) {
  43261. return (_ctx, _cache) => {
  43262. return openBlock(), createElementBlock("td", {
  43263. colspan: __props.colspan,
  43264. rowspan: __props.rowspan
  43265. }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$16);
  43266. };
  43267. }
  43268. });
  43269. //#endregion
  43270. //#region node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs
  43271. function useRender$1(props) {
  43272. const parent = inject(TABLE_INJECTION_KEY);
  43273. const ns = useNamespace("table");
  43274. const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props);
  43275. const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles$1(props);
  43276. let displayIndex = -1;
  43277. const firstDefaultColumnIndex = computed(() => {
  43278. return props.store?.states.columns.value.findIndex(({ type }) => type === "default");
  43279. });
  43280. const getKeyOfRow = (row, index) => {
  43281. const rowKey = (parent?.props)?.rowKey;
  43282. if (rowKey) return getRowIdentity(row, rowKey);
  43283. return index;
  43284. };
  43285. const rowRender = (row, $index, treeRowData, expanded = false) => {
  43286. const { tooltipEffect, tooltipOptions, store } = props;
  43287. const { indent, columns } = store.states;
  43288. const rowClasses = [];
  43289. let display = true;
  43290. if (treeRowData) {
  43291. rowClasses.push(ns.em("row", `level-${treeRowData.level}`));
  43292. display = !!treeRowData.display;
  43293. }
  43294. if ($index === 0) displayIndex = -1;
  43295. if (props.stripe && display) displayIndex++;
  43296. rowClasses.push(...getRowClass(row, $index, displayIndex));
  43297. return h$1("tr", {
  43298. style: [display ? null : { display: "none" }, getRowStyle(row, $index)],
  43299. class: rowClasses,
  43300. key: getKeyOfRow(row, $index),
  43301. onDblclick: ($event) => handleDoubleClick($event, row),
  43302. onClick: ($event) => handleClick($event, row),
  43303. onContextmenu: ($event) => handleContextMenu($event, row),
  43304. onMouseenter: () => handleMouseEnter($index),
  43305. onMouseleave: handleMouseLeave
  43306. }, columns.value.map((column, cellIndex) => {
  43307. const { rowspan, colspan } = getSpan(row, column, $index, cellIndex);
  43308. if (!rowspan || !colspan) return null;
  43309. const columnData = Object.assign({}, column);
  43310. columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);
  43311. const data = {
  43312. store,
  43313. _self: props.context || parent,
  43314. column: columnData,
  43315. row,
  43316. $index,
  43317. cellIndex,
  43318. expanded
  43319. };
  43320. if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {
  43321. data.treeNode = {
  43322. indent: treeRowData.level && treeRowData.level * indent.value,
  43323. level: treeRowData.level
  43324. };
  43325. if (isBoolean(treeRowData.expanded)) {
  43326. data.treeNode.expanded = treeRowData.expanded;
  43327. if ("loading" in treeRowData) data.treeNode.loading = treeRowData.loading;
  43328. if ("noLazyChildren" in treeRowData) data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
  43329. }
  43330. }
  43331. const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`;
  43332. const patchKey = columnData.columnKey || columnData.rawColumnKey || "";
  43333. const mergedTooltipOptions = column.showOverflowTooltip && merge({ effect: tooltipEffect }, tooltipOptions, column.showOverflowTooltip);
  43334. return h$1(td_wrapper_default, {
  43335. style: getCellStyle($index, cellIndex, row, column),
  43336. class: getCellClass($index, cellIndex, row, column, colspan - 1),
  43337. key: `${patchKey}${baseKey}`,
  43338. rowspan,
  43339. colspan,
  43340. onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions),
  43341. onMouseleave: handleCellMouseLeave
  43342. }, { default: () => cellChildren(cellIndex, column, data) });
  43343. }));
  43344. };
  43345. const cellChildren = (_cellIndex, column, data) => {
  43346. return column.renderCell(data);
  43347. };
  43348. const wrappedRowRender = (row, $index) => {
  43349. const store = props.store;
  43350. const { isRowExpanded, assertRowKey } = store;
  43351. const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } = store.states;
  43352. const columns = store.states.columns.value;
  43353. if (columns.some(({ type }) => type === "expand")) {
  43354. const expanded = isRowExpanded(row);
  43355. const tr = rowRender(row, $index, void 0, expanded);
  43356. const renderExpanded = parent?.renderExpanded;
  43357. if (!renderExpanded) {
  43358. console.error("[Element Error]renderExpanded is required.");
  43359. return tr;
  43360. }
  43361. const rows = [[tr]];
  43362. if (parent.props.preserveExpandedContent || expanded) rows[0].push(h$1("tr", {
  43363. key: `expanded-row__${tr.key}`,
  43364. style: { display: expanded ? "" : "none" }
  43365. }, [h$1("td", {
  43366. colspan: columns.length,
  43367. class: `${ns.e("cell")} ${ns.e("expanded-cell")}`
  43368. }, [renderExpanded({
  43369. row,
  43370. $index,
  43371. store,
  43372. expanded
  43373. })])]));
  43374. return rows;
  43375. } else if (Object.keys(treeData.value).length) {
  43376. assertRowKey();
  43377. const key = getRowIdentity(row, rowKey.value);
  43378. let cur = treeData.value[key];
  43379. let treeRowData = null;
  43380. if (cur) {
  43381. treeRowData = {
  43382. expanded: cur.expanded,
  43383. level: cur.level,
  43384. display: true,
  43385. noLazyChildren: void 0,
  43386. loading: void 0
  43387. };
  43388. if (isBoolean(cur.lazy)) {
  43389. if (treeRowData && isBoolean(cur.loaded) && cur.loaded) treeRowData.noLazyChildren = !(cur.children && cur.children.length);
  43390. treeRowData.loading = cur.loading;
  43391. }
  43392. }
  43393. const tmp = [rowRender(row, $index, treeRowData ?? void 0)];
  43394. if (cur) {
  43395. let i = 0;
  43396. const traverse = (children, parent) => {
  43397. if (!(children && children.length && parent)) return;
  43398. children.forEach((node) => {
  43399. const innerTreeRowData = {
  43400. display: parent.display && parent.expanded,
  43401. level: parent.level + 1,
  43402. expanded: false,
  43403. noLazyChildren: false,
  43404. loading: false
  43405. };
  43406. const childKey = getRowIdentity(node, rowKey.value);
  43407. if (isPropAbsent(childKey)) throw new Error("For nested data item, row-key is required.");
  43408. cur = { ...treeData.value[childKey] };
  43409. if (cur) {
  43410. innerTreeRowData.expanded = cur.expanded;
  43411. cur.level = cur.level || innerTreeRowData.level;
  43412. cur.display = !!(cur.expanded && innerTreeRowData.display);
  43413. if (isBoolean(cur.lazy)) {
  43414. if (isBoolean(cur.loaded) && cur.loaded) innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
  43415. innerTreeRowData.loading = cur.loading;
  43416. }
  43417. }
  43418. i++;
  43419. tmp.push(rowRender(node, $index + i, innerTreeRowData));
  43420. if (cur) traverse(lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value], cur);
  43421. });
  43422. };
  43423. cur.display = true;
  43424. traverse(lazyTreeNodeMap.value[key] || row[childrenColumnName.value], cur);
  43425. }
  43426. return tmp;
  43427. } else return rowRender(row, $index, void 0);
  43428. };
  43429. return {
  43430. wrappedRowRender,
  43431. tooltipContent,
  43432. tooltipTrigger
  43433. };
  43434. }
  43435. //#endregion
  43436. //#region node_modules/element-plus/es/components/table/src/table-body/index.mjs
  43437. var table_body_default = defineComponent({
  43438. name: "ElTableBody",
  43439. props: {
  43440. store: {
  43441. required: true,
  43442. type: Object
  43443. },
  43444. stripe: Boolean,
  43445. tooltipEffect: String,
  43446. tooltipOptions: { type: Object },
  43447. context: {
  43448. default: () => ({}),
  43449. type: Object
  43450. },
  43451. rowClassName: [String, Function],
  43452. rowStyle: [Object, Function],
  43453. fixed: {
  43454. type: String,
  43455. default: ""
  43456. },
  43457. highlight: Boolean
  43458. },
  43459. setup(props) {
  43460. const instance = getCurrentInstance();
  43461. const parent = inject(TABLE_INJECTION_KEY);
  43462. const ns = useNamespace("table");
  43463. const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender$1(props);
  43464. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
  43465. const hoveredCellList = [];
  43466. watch(props.store?.states.hoverRow, (newVal, oldVal) => {
  43467. const el = instance?.vnode.el;
  43468. const rows = Array.from(el?.children || []).filter((e) => e?.classList.contains(`${ns.e("row")}`));
  43469. let rowNum = newVal;
  43470. const childNodes = rows[rowNum]?.childNodes;
  43471. if (childNodes?.length) {
  43472. let control = 0;
  43473. Array.from(childNodes).reduce((acc, item, index) => {
  43474. if (childNodes[index]?.colSpan > 1) control = childNodes[index]?.colSpan;
  43475. if (item.nodeName !== "TD" && control === 0) acc.push(index);
  43476. control > 0 && control--;
  43477. return acc;
  43478. }, []).forEach((rowIndex) => {
  43479. rowNum = newVal;
  43480. while (rowNum > 0) {
  43481. const preChildNodes = rows[rowNum - 1]?.childNodes;
  43482. if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
  43483. addClass(preChildNodes[rowIndex], "hover-cell");
  43484. hoveredCellList.push(preChildNodes[rowIndex]);
  43485. break;
  43486. }
  43487. rowNum--;
  43488. }
  43489. });
  43490. } else {
  43491. hoveredCellList.forEach((item) => removeClass(item, "hover-cell"));
  43492. hoveredCellList.length = 0;
  43493. }
  43494. if (!props.store?.states.isComplex.value || !isClient) return;
  43495. rAF(() => {
  43496. const oldRow = rows[oldVal];
  43497. const newRow = rows[newVal];
  43498. if (oldRow && !oldRow.classList.contains("hover-fixed-row")) removeClass(oldRow, "hover-row");
  43499. if (newRow) addClass(newRow, "hover-row");
  43500. });
  43501. });
  43502. onUnmounted(() => {
  43503. removePopper?.();
  43504. });
  43505. return {
  43506. ns,
  43507. onColumnsChange,
  43508. onScrollableChange,
  43509. wrappedRowRender,
  43510. tooltipContent,
  43511. tooltipTrigger
  43512. };
  43513. },
  43514. render() {
  43515. const { wrappedRowRender, store } = this;
  43516. return h$1("tbody", { tabIndex: -1 }, [(store?.states.data.value || []).reduce((acc, row) => {
  43517. return acc.concat(wrappedRowRender(row, acc.length));
  43518. }, [])]);
  43519. }
  43520. });
  43521. //#endregion
  43522. //#region node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs
  43523. function useMapState() {
  43524. const store = inject(TABLE_INJECTION_KEY)?.store;
  43525. return {
  43526. leftFixedLeafCount: computed(() => {
  43527. return store?.states.fixedLeafColumnsLength.value ?? 0;
  43528. }),
  43529. rightFixedLeafCount: computed(() => {
  43530. return store?.states.rightFixedColumns.value.length ?? 0;
  43531. }),
  43532. columnsCount: computed(() => {
  43533. return store?.states.columns.value.length ?? 0;
  43534. }),
  43535. leftFixedCount: computed(() => {
  43536. return store?.states.fixedColumns.value.length ?? 0;
  43537. }),
  43538. rightFixedCount: computed(() => {
  43539. return store?.states.rightFixedColumns.value.length ?? 0;
  43540. }),
  43541. columns: computed(() => store?.states.columns.value ?? [])
  43542. };
  43543. }
  43544. //#endregion
  43545. //#region node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs
  43546. function useStyle$1(props) {
  43547. const { columns } = useMapState();
  43548. const ns = useNamespace("table");
  43549. const getCellClasses = (columns, cellIndex) => {
  43550. const column = columns[cellIndex];
  43551. const classes = [
  43552. ns.e("cell"),
  43553. column.id,
  43554. column.align,
  43555. column.labelClassName,
  43556. ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store)
  43557. ];
  43558. if (column.className) classes.push(column.className);
  43559. if (!column.children) classes.push(ns.is("leaf"));
  43560. return classes;
  43561. };
  43562. const getCellStyles = (column, cellIndex) => {
  43563. const fixedStyle = getFixedColumnOffset(cellIndex, column.fixed, props.store);
  43564. ensurePosition(fixedStyle, "left");
  43565. ensurePosition(fixedStyle, "right");
  43566. return fixedStyle;
  43567. };
  43568. return {
  43569. getCellClasses,
  43570. getCellStyles,
  43571. columns
  43572. };
  43573. }
  43574. //#endregion
  43575. //#region node_modules/element-plus/es/components/table/src/table-footer/index.mjs
  43576. var table_footer_default = defineComponent({
  43577. name: "ElTableFooter",
  43578. props: {
  43579. fixed: {
  43580. type: String,
  43581. default: ""
  43582. },
  43583. store: {
  43584. required: true,
  43585. type: Object
  43586. },
  43587. summaryMethod: Function,
  43588. sumText: String,
  43589. border: Boolean,
  43590. defaultSort: {
  43591. type: Object,
  43592. default: () => {
  43593. return {
  43594. prop: "",
  43595. order: ""
  43596. };
  43597. }
  43598. }
  43599. },
  43600. setup(props) {
  43601. const parent = inject(TABLE_INJECTION_KEY);
  43602. const ns = useNamespace("table");
  43603. const { getCellClasses, getCellStyles, columns } = useStyle$1(props);
  43604. const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent);
  43605. return {
  43606. ns,
  43607. onScrollableChange,
  43608. onColumnsChange,
  43609. getCellClasses,
  43610. getCellStyles,
  43611. columns
  43612. };
  43613. },
  43614. render() {
  43615. const { columns, getCellStyles, getCellClasses, summaryMethod, sumText } = this;
  43616. const data = this.store.states.data.value;
  43617. let sums = [];
  43618. if (summaryMethod) sums = summaryMethod({
  43619. columns,
  43620. data
  43621. });
  43622. else columns.forEach((column, index) => {
  43623. if (index === 0) {
  43624. sums[index] = sumText;
  43625. return;
  43626. }
  43627. const values = data.map((item) => Number(item[column.property]));
  43628. const precisions = [];
  43629. let notNumber = true;
  43630. values.forEach((value) => {
  43631. if (!Number.isNaN(+value)) {
  43632. notNumber = false;
  43633. const decimal = `${value}`.split(".")[1];
  43634. precisions.push(decimal ? decimal.length : 0);
  43635. }
  43636. });
  43637. const precision = Math.max.apply(null, precisions);
  43638. if (!notNumber) sums[index] = values.reduce((prev, curr) => {
  43639. const value = Number(curr);
  43640. if (!Number.isNaN(+value)) return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
  43641. else return prev;
  43642. }, 0);
  43643. else sums[index] = "";
  43644. });
  43645. return h$1(h$1("tfoot", [h$1("tr", {}, [...columns.map((column, cellIndex) => h$1("td", {
  43646. key: cellIndex,
  43647. colspan: column.colSpan,
  43648. rowspan: column.rowSpan,
  43649. class: getCellClasses(columns, cellIndex),
  43650. style: getCellStyles(column, cellIndex)
  43651. }, [h$1("div", { class: ["cell", column.labelClassName] }, [sums[cellIndex]])]))])]));
  43652. }
  43653. });
  43654. //#endregion
  43655. //#region node_modules/element-plus/es/components/table/src/table/utils-helper.mjs
  43656. function useUtils(store) {
  43657. const setCurrentRow = (row) => {
  43658. store.commit("setCurrentRow", row);
  43659. };
  43660. const getSelectionRows = () => {
  43661. return store.getSelectionRows();
  43662. };
  43663. const toggleRowSelection = (row, selected, ignoreSelectable = true) => {
  43664. store.toggleRowSelection(row, selected, false, ignoreSelectable);
  43665. store.updateAllSelected();
  43666. };
  43667. const clearSelection = () => {
  43668. store.clearSelection();
  43669. };
  43670. const clearFilter = (columnKeys) => {
  43671. store.clearFilter(columnKeys);
  43672. };
  43673. const toggleAllSelection = () => {
  43674. store.commit("toggleAllSelection");
  43675. };
  43676. const toggleRowExpansion = (row, expanded) => {
  43677. store.toggleRowExpansionAdapter(row, expanded);
  43678. };
  43679. const clearSort = () => {
  43680. store.clearSort();
  43681. };
  43682. const sort = (prop, order) => {
  43683. store.commit("sort", {
  43684. prop,
  43685. order
  43686. });
  43687. };
  43688. const updateKeyChildren = (key, data) => {
  43689. store.updateKeyChildren(key, data);
  43690. };
  43691. return {
  43692. setCurrentRow,
  43693. getSelectionRows,
  43694. toggleRowSelection,
  43695. clearSelection,
  43696. clearFilter,
  43697. toggleAllSelection,
  43698. toggleRowExpansion,
  43699. clearSort,
  43700. sort,
  43701. updateKeyChildren
  43702. };
  43703. }
  43704. //#endregion
  43705. //#region node_modules/element-plus/es/components/table/src/table/style-helper.mjs
  43706. function useStyle(props, layout, store, table) {
  43707. const isHidden = ref(false);
  43708. const renderExpanded = ref(null);
  43709. const resizeProxyVisible = ref(false);
  43710. const setDragVisible = (visible) => {
  43711. resizeProxyVisible.value = visible;
  43712. };
  43713. const resizeState = ref({
  43714. width: null,
  43715. height: null,
  43716. headerHeight: null
  43717. });
  43718. const isGroup = ref(false);
  43719. const scrollbarViewStyle = {
  43720. display: "inline-block",
  43721. verticalAlign: "middle"
  43722. };
  43723. const tableWidth = ref();
  43724. const tableScrollHeight = ref(0);
  43725. const bodyScrollHeight = ref(0);
  43726. const headerScrollHeight = ref(0);
  43727. const footerScrollHeight = ref(0);
  43728. const appendScrollHeight = ref(0);
  43729. watch(() => props.height, (value) => {
  43730. layout.setHeight(value ?? null);
  43731. }, { immediate: true });
  43732. watch(() => props.maxHeight, (value) => {
  43733. layout.setMaxHeight(value ?? null);
  43734. }, { immediate: true });
  43735. watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => {
  43736. if (!unref(rowKey) || !unref(currentRowKey)) return;
  43737. store.setCurrentRowKey(`${currentRowKey}`);
  43738. }, { immediate: true });
  43739. watch(() => props.data, (data) => {
  43740. table.store.commit("setData", data);
  43741. }, {
  43742. immediate: true,
  43743. deep: true
  43744. });
  43745. watchEffect(() => {
  43746. if (props.expandRowKeys) store.setExpandRowKeysAdapter(props.expandRowKeys);
  43747. });
  43748. const handleMouseLeave = () => {
  43749. table.store.commit("setHoverRow", null);
  43750. if (table.hoverState) table.hoverState = null;
  43751. };
  43752. const handleHeaderFooterMousewheel = (_event, data) => {
  43753. const { pixelX, pixelY } = data;
  43754. if (Math.abs(pixelX) >= Math.abs(pixelY)) table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;
  43755. };
  43756. const shouldUpdateHeight = computed(() => {
  43757. return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
  43758. });
  43759. const tableBodyStyles = computed(() => {
  43760. return { width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : "" };
  43761. });
  43762. const doLayout = () => {
  43763. if (shouldUpdateHeight.value) layout.updateElsHeight();
  43764. layout.updateColumnsWidth();
  43765. if (typeof window === "undefined") return;
  43766. requestAnimationFrame(syncPosition);
  43767. };
  43768. onMounted(async () => {
  43769. await nextTick();
  43770. store.updateColumns();
  43771. bindEvents();
  43772. requestAnimationFrame(doLayout);
  43773. const el = table.vnode.el;
  43774. const tableHeader = table.refs.headerWrapper;
  43775. if (props.flexible && el && el.parentElement) el.parentElement.style.minWidth = "0";
  43776. resizeState.value = {
  43777. width: tableWidth.value = el.offsetWidth,
  43778. height: el.offsetHeight,
  43779. headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null
  43780. };
  43781. store.states.columns.value.forEach((column) => {
  43782. if (column.filteredValue && column.filteredValue.length) table.store.commit("filterChange", {
  43783. column,
  43784. values: column.filteredValue,
  43785. silent: true
  43786. });
  43787. });
  43788. table.$ready = true;
  43789. });
  43790. const setScrollClassByEl = (el, className) => {
  43791. if (!el) return;
  43792. const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-"));
  43793. classList.push(layout.scrollX.value ? className : "is-scrolling-none");
  43794. el.className = classList.join(" ");
  43795. };
  43796. const setScrollClass = (className) => {
  43797. const { tableWrapper } = table.refs;
  43798. setScrollClassByEl(tableWrapper, className);
  43799. };
  43800. const hasScrollClass = (className) => {
  43801. const { tableWrapper } = table.refs;
  43802. return !!(tableWrapper && tableWrapper.classList.contains(className));
  43803. };
  43804. const syncPosition = function() {
  43805. if (!table.refs.scrollBarRef) return;
  43806. if (!layout.scrollX.value) {
  43807. const scrollingNoneClass = "is-scrolling-none";
  43808. if (!hasScrollClass(scrollingNoneClass)) setScrollClass(scrollingNoneClass);
  43809. return;
  43810. }
  43811. const scrollContainer = table.refs.scrollBarRef.wrapRef;
  43812. if (!scrollContainer) return;
  43813. const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer;
  43814. const { headerWrapper, footerWrapper } = table.refs;
  43815. if (headerWrapper) headerWrapper.scrollLeft = scrollLeft;
  43816. if (footerWrapper) footerWrapper.scrollLeft = scrollLeft;
  43817. if (scrollLeft >= scrollWidth - offsetWidth - 1) setScrollClass("is-scrolling-right");
  43818. else if (scrollLeft === 0) setScrollClass("is-scrolling-left");
  43819. else setScrollClass("is-scrolling-middle");
  43820. };
  43821. const bindEvents = () => {
  43822. if (!table.refs.scrollBarRef) return;
  43823. if (table.refs.scrollBarRef.wrapRef) useEventListener(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, { passive: true });
  43824. if (props.fit) useResizeObserver(table.vnode.el, resizeListener);
  43825. else useEventListener(window, "resize", resizeListener);
  43826. useResizeObserver(table.refs.tableInnerWrapper, () => {
  43827. resizeListener();
  43828. table.refs?.scrollBarRef?.update();
  43829. });
  43830. };
  43831. const resizeListener = () => {
  43832. const el = table.vnode.el;
  43833. if (!table.$ready || !el) return;
  43834. let shouldUpdateLayout = false;
  43835. const { width: oldWidth, height: oldHeight, headerHeight: oldHeaderHeight } = resizeState.value;
  43836. const width = tableWidth.value = el.offsetWidth;
  43837. if (oldWidth !== width) shouldUpdateLayout = true;
  43838. const height = el.offsetHeight;
  43839. if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) shouldUpdateLayout = true;
  43840. const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : table.refs.tableHeaderRef?.$el;
  43841. if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) shouldUpdateLayout = true;
  43842. tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0;
  43843. headerScrollHeight.value = tableHeader?.scrollHeight || 0;
  43844. footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0;
  43845. appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0;
  43846. bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value;
  43847. if (shouldUpdateLayout) {
  43848. resizeState.value = {
  43849. width,
  43850. height,
  43851. headerHeight: props.showHeader && tableHeader?.offsetHeight || 0
  43852. };
  43853. doLayout();
  43854. }
  43855. };
  43856. const tableSize = useFormSize();
  43857. const bodyWidth = computed(() => {
  43858. const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout;
  43859. return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : "";
  43860. });
  43861. const tableLayout = computed(() => {
  43862. if (props.maxHeight) return "fixed";
  43863. return props.tableLayout;
  43864. });
  43865. return {
  43866. isHidden,
  43867. renderExpanded,
  43868. setDragVisible,
  43869. isGroup,
  43870. handleMouseLeave,
  43871. handleHeaderFooterMousewheel,
  43872. tableSize,
  43873. emptyBlockStyle: computed(() => {
  43874. if (props.data && props.data.length) return;
  43875. let height = "100%";
  43876. if (props.height && bodyScrollHeight.value) height = `${bodyScrollHeight.value}px`;
  43877. const width = tableWidth.value;
  43878. return {
  43879. width: width ? `${width}px` : "",
  43880. height
  43881. };
  43882. }),
  43883. resizeProxyVisible,
  43884. bodyWidth,
  43885. resizeState,
  43886. doLayout,
  43887. tableBodyStyles,
  43888. tableLayout,
  43889. scrollbarViewStyle,
  43890. scrollbarStyle: computed(() => {
  43891. if (props.height) return { height: "100%" };
  43892. if (props.maxHeight) if (!Number.isNaN(Number(props.maxHeight))) return { maxHeight: `${+props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` };
  43893. else return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` };
  43894. return {};
  43895. })
  43896. };
  43897. }
  43898. //#endregion
  43899. //#region node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs
  43900. function useKeyRender(table) {
  43901. let observer;
  43902. const initWatchDom = () => {
  43903. const columnsWrapper = table.vnode.el.querySelector(".hidden-columns");
  43904. const config = {
  43905. childList: true,
  43906. subtree: true
  43907. };
  43908. const updateOrderFns = table.store.states.updateOrderFns;
  43909. observer = new MutationObserver(() => {
  43910. updateOrderFns.forEach((fn) => fn());
  43911. });
  43912. observer.observe(columnsWrapper, config);
  43913. };
  43914. onMounted(() => {
  43915. initWatchDom();
  43916. });
  43917. onUnmounted(() => {
  43918. observer?.disconnect();
  43919. });
  43920. }
  43921. //#endregion
  43922. //#region node_modules/element-plus/es/components/table/src/table/defaults.mjs
  43923. var defaults_default$2 = {
  43924. data: {
  43925. type: Array,
  43926. default: () => []
  43927. },
  43928. size: useSizeProp,
  43929. width: [String, Number],
  43930. height: [String, Number],
  43931. maxHeight: [String, Number],
  43932. fit: {
  43933. type: Boolean,
  43934. default: true
  43935. },
  43936. stripe: Boolean,
  43937. border: Boolean,
  43938. rowKey: [String, Function],
  43939. showHeader: {
  43940. type: Boolean,
  43941. default: true
  43942. },
  43943. showSummary: Boolean,
  43944. sumText: String,
  43945. summaryMethod: Function,
  43946. rowClassName: [String, Function],
  43947. rowStyle: [Object, Function],
  43948. cellClassName: [String, Function],
  43949. cellStyle: [Object, Function],
  43950. headerRowClassName: [String, Function],
  43951. headerRowStyle: [Object, Function],
  43952. headerCellClassName: [String, Function],
  43953. headerCellStyle: [Object, Function],
  43954. highlightCurrentRow: Boolean,
  43955. currentRowKey: [String, Number],
  43956. emptyText: String,
  43957. expandRowKeys: Array,
  43958. defaultExpandAll: Boolean,
  43959. rowExpandable: { type: Function },
  43960. defaultSort: Object,
  43961. tooltipEffect: String,
  43962. tooltipOptions: Object,
  43963. spanMethod: Function,
  43964. selectOnIndeterminate: {
  43965. type: Boolean,
  43966. default: true
  43967. },
  43968. indent: {
  43969. type: Number,
  43970. default: 16
  43971. },
  43972. treeProps: {
  43973. type: Object,
  43974. default: () => {
  43975. return {
  43976. hasChildren: "hasChildren",
  43977. children: "children",
  43978. checkStrictly: false
  43979. };
  43980. }
  43981. },
  43982. lazy: Boolean,
  43983. load: Function,
  43984. style: {
  43985. type: [
  43986. String,
  43987. Object,
  43988. Array
  43989. ],
  43990. default: () => ({})
  43991. },
  43992. className: {
  43993. type: String,
  43994. default: ""
  43995. },
  43996. tableLayout: {
  43997. type: String,
  43998. default: "fixed"
  43999. },
  44000. scrollbarAlwaysOn: Boolean,
  44001. flexible: Boolean,
  44002. showOverflowTooltip: {
  44003. type: [Boolean, Object],
  44004. default: void 0
  44005. },
  44006. tooltipFormatter: Function,
  44007. appendFilterPanelTo: String,
  44008. scrollbarTabindex: {
  44009. type: [Number, String],
  44010. default: void 0
  44011. },
  44012. allowDragLastColumn: {
  44013. type: Boolean,
  44014. default: true
  44015. },
  44016. preserveExpandedContent: Boolean,
  44017. nativeScrollbar: Boolean
  44018. };
  44019. //#endregion
  44020. //#region node_modules/element-plus/es/components/table/src/h-helper.mjs
  44021. function hColgroup(props) {
  44022. const isAuto = props.tableLayout === "auto";
  44023. let columns = props.columns || [];
  44024. if (isAuto) {
  44025. if (columns.every(({ width }) => isUndefined(width))) columns = [];
  44026. }
  44027. const getPropsData = (column) => {
  44028. const propsData = {
  44029. key: `${props.tableLayout}_${column.id}`,
  44030. style: {},
  44031. name: void 0
  44032. };
  44033. if (isAuto) propsData.style = { width: `${column.width}px` };
  44034. else propsData.name = column.id;
  44035. return propsData;
  44036. };
  44037. return h$1("colgroup", {}, columns.map((column) => h$1("col", getPropsData(column))));
  44038. }
  44039. hColgroup.props = ["columns", "tableLayout"];
  44040. //#endregion
  44041. //#region node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs
  44042. var useScrollbar$1 = () => {
  44043. const scrollBarRef = ref();
  44044. const scrollTo = (options, yCoord) => {
  44045. const scrollbar = scrollBarRef.value;
  44046. if (scrollbar) scrollbar.scrollTo(options, yCoord);
  44047. };
  44048. const setScrollPosition = (position, offset) => {
  44049. const scrollbar = scrollBarRef.value;
  44050. if (scrollbar && isNumber(offset) && ["Top", "Left"].includes(position)) scrollbar[`setScroll${position}`](offset);
  44051. };
  44052. const setScrollTop = (top) => setScrollPosition("Top", top);
  44053. const setScrollLeft = (left) => setScrollPosition("Left", left);
  44054. return {
  44055. scrollBarRef,
  44056. scrollTo,
  44057. setScrollTop,
  44058. setScrollLeft
  44059. };
  44060. };
  44061. //#endregion
  44062. //#region node_modules/element-plus/es/components/table/src/table.vue_vue_type_script_lang.mjs
  44063. var tableIdSeed = 1;
  44064. var table_vue_vue_type_script_lang_default = defineComponent({
  44065. name: "ElTable",
  44066. directives: { Mousewheel },
  44067. components: {
  44068. TableHeader: table_header_default,
  44069. TableBody: table_body_default,
  44070. TableFooter: table_footer_default,
  44071. ElScrollbar,
  44072. hColgroup
  44073. },
  44074. props: defaults_default$2,
  44075. emits: [
  44076. "select",
  44077. "select-all",
  44078. "selection-change",
  44079. "cell-mouse-enter",
  44080. "cell-mouse-leave",
  44081. "cell-contextmenu",
  44082. "cell-click",
  44083. "cell-dblclick",
  44084. "row-click",
  44085. "row-contextmenu",
  44086. "row-dblclick",
  44087. "header-click",
  44088. "header-contextmenu",
  44089. "sort-change",
  44090. "filter-change",
  44091. "current-change",
  44092. "header-dragend",
  44093. "expand-change",
  44094. "scroll"
  44095. ],
  44096. setup(props) {
  44097. const { t } = useLocale();
  44098. const ns = useNamespace("table");
  44099. const globalConfig = useGlobalConfig("table");
  44100. const table = getCurrentInstance();
  44101. provide(TABLE_INJECTION_KEY, table);
  44102. const store = createStore(table, props);
  44103. table.store = store;
  44104. const layout = new TableLayout({
  44105. store: table.store,
  44106. table,
  44107. fit: props.fit,
  44108. showHeader: props.showHeader
  44109. });
  44110. table.layout = layout;
  44111. const isEmpty = computed(() => (store.states.data.value || []).length === 0);
  44112. /**
  44113. * open functions
  44114. */
  44115. const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort, updateKeyChildren } = useUtils(store);
  44116. const { isHidden, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, scrollbarStyle } = useStyle(props, layout, store, table);
  44117. const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar$1();
  44118. const debouncedUpdateLayout = debounce(doLayout, 50);
  44119. const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`;
  44120. table.tableId = tableId;
  44121. table.state = {
  44122. isGroup,
  44123. resizeState,
  44124. doLayout,
  44125. debouncedUpdateLayout
  44126. };
  44127. const computedSumText = computed(() => props.sumText ?? t("el.table.sumText"));
  44128. const computedEmptyText = computed(() => {
  44129. return props.emptyText ?? t("el.table.emptyText");
  44130. });
  44131. const computedTooltipEffect = computed(() => props.tooltipEffect ?? globalConfig.value?.tooltipEffect);
  44132. const computedTooltipOptions = computed(() => props.tooltipOptions ?? globalConfig.value?.tooltipOptions);
  44133. const columns = computed(() => {
  44134. return convertToRows(store.states.originColumns.value)[0];
  44135. });
  44136. useKeyRender(table);
  44137. onBeforeUnmount(() => {
  44138. debouncedUpdateLayout.cancel();
  44139. });
  44140. return {
  44141. ns,
  44142. layout,
  44143. store,
  44144. columns,
  44145. handleHeaderFooterMousewheel,
  44146. handleMouseLeave,
  44147. tableId,
  44148. tableSize,
  44149. isHidden,
  44150. isEmpty,
  44151. renderExpanded,
  44152. resizeProxyVisible,
  44153. resizeState,
  44154. isGroup,
  44155. bodyWidth,
  44156. tableBodyStyles,
  44157. emptyBlockStyle,
  44158. debouncedUpdateLayout,
  44159. setCurrentRow,
  44160. getSelectionRows,
  44161. toggleRowSelection,
  44162. clearSelection,
  44163. clearFilter,
  44164. toggleAllSelection,
  44165. toggleRowExpansion,
  44166. clearSort,
  44167. doLayout,
  44168. sort,
  44169. updateKeyChildren,
  44170. t,
  44171. setDragVisible,
  44172. context: table,
  44173. computedSumText,
  44174. computedEmptyText,
  44175. computedTooltipEffect,
  44176. computedTooltipOptions,
  44177. tableLayout,
  44178. scrollbarViewStyle,
  44179. scrollbarStyle,
  44180. scrollBarRef,
  44181. scrollTo,
  44182. setScrollLeft,
  44183. setScrollTop,
  44184. allowDragLastColumn: props.allowDragLastColumn
  44185. };
  44186. }
  44187. });
  44188. //#endregion
  44189. //#region node_modules/element-plus/es/components/table/src/table.mjs
  44190. var _hoisted_1$15 = ["data-prefix"];
  44191. var _hoisted_2$9 = {
  44192. ref: "hiddenColumns",
  44193. class: "hidden-columns"
  44194. };
  44195. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  44196. const _component_hColgroup = resolveComponent("hColgroup");
  44197. const _component_table_header = resolveComponent("table-header");
  44198. const _component_table_body = resolveComponent("table-body");
  44199. const _component_table_footer = resolveComponent("table-footer");
  44200. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  44201. const _directive_mousewheel = resolveDirective("mousewheel");
  44202. return openBlock(), createElementBlock("div", {
  44203. ref: "tableWrapper",
  44204. class: normalizeClass([
  44205. {
  44206. [_ctx.ns.m("fit")]: _ctx.fit,
  44207. [_ctx.ns.m("striped")]: _ctx.stripe,
  44208. [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup,
  44209. [_ctx.ns.m("hidden")]: _ctx.isHidden,
  44210. [_ctx.ns.m("group")]: _ctx.isGroup,
  44211. [_ctx.ns.m("fluid-height")]: _ctx.maxHeight,
  44212. [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value,
  44213. [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value,
  44214. [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value,
  44215. [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100,
  44216. "has-footer": _ctx.showSummary
  44217. },
  44218. _ctx.ns.m(_ctx.tableSize),
  44219. _ctx.className,
  44220. _ctx.ns.b(),
  44221. _ctx.ns.m(`layout-${_ctx.tableLayout}`)
  44222. ]),
  44223. style: normalizeStyle(_ctx.style),
  44224. "data-prefix": _ctx.ns.namespace.value,
  44225. onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args))
  44226. }, [createBaseVNode("div", {
  44227. ref: "tableInnerWrapper",
  44228. class: normalizeClass(_ctx.ns.e("inner-wrapper"))
  44229. }, [
  44230. createBaseVNode("div", _hoisted_2$9, [renderSlot(_ctx.$slots, "default")], 512),
  44231. _ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
  44232. key: 0,
  44233. ref: "headerWrapper",
  44234. class: normalizeClass(_ctx.ns.e("header-wrapper"))
  44235. }, [createBaseVNode("table", {
  44236. ref: "tableHeader",
  44237. class: normalizeClass(_ctx.ns.e("header")),
  44238. style: normalizeStyle(_ctx.tableBodyStyles),
  44239. border: "0",
  44240. cellpadding: "0",
  44241. cellspacing: "0"
  44242. }, [createVNode(_component_hColgroup, {
  44243. columns: _ctx.store.states.columns.value,
  44244. "table-layout": _ctx.tableLayout
  44245. }, null, 8, ["columns", "table-layout"]), createVNode(_component_table_header, {
  44246. ref: "tableHeaderRef",
  44247. border: _ctx.border,
  44248. "default-sort": _ctx.defaultSort,
  44249. store: _ctx.store,
  44250. "append-filter-panel-to": _ctx.appendFilterPanelTo,
  44251. "allow-drag-last-column": _ctx.allowDragLastColumn,
  44252. onSetDragVisible: _ctx.setDragVisible
  44253. }, null, 8, [
  44254. "border",
  44255. "default-sort",
  44256. "store",
  44257. "append-filter-panel-to",
  44258. "allow-drag-last-column",
  44259. "onSetDragVisible"
  44260. ])], 6)], 2)), [[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : createCommentVNode("v-if", true),
  44261. createBaseVNode("div", {
  44262. ref: "bodyWrapper",
  44263. class: normalizeClass(_ctx.ns.e("body-wrapper"))
  44264. }, [createVNode(_component_el_scrollbar, {
  44265. ref: "scrollBarRef",
  44266. "view-style": _ctx.scrollbarViewStyle,
  44267. "wrap-style": _ctx.scrollbarStyle,
  44268. always: _ctx.scrollbarAlwaysOn,
  44269. tabindex: _ctx.scrollbarTabindex,
  44270. native: _ctx.nativeScrollbar,
  44271. onScroll: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event))
  44272. }, {
  44273. default: withCtx(() => [
  44274. createBaseVNode("table", {
  44275. ref: "tableBody",
  44276. class: normalizeClass(_ctx.ns.e("body")),
  44277. cellspacing: "0",
  44278. cellpadding: "0",
  44279. border: "0",
  44280. style: normalizeStyle({
  44281. width: _ctx.bodyWidth,
  44282. tableLayout: _ctx.tableLayout
  44283. })
  44284. }, [
  44285. createVNode(_component_hColgroup, {
  44286. columns: _ctx.store.states.columns.value,
  44287. "table-layout": _ctx.tableLayout
  44288. }, null, 8, ["columns", "table-layout"]),
  44289. _ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, {
  44290. key: 0,
  44291. ref: "tableHeaderRef",
  44292. class: normalizeClass(_ctx.ns.e("body-header")),
  44293. border: _ctx.border,
  44294. "default-sort": _ctx.defaultSort,
  44295. store: _ctx.store,
  44296. "append-filter-panel-to": _ctx.appendFilterPanelTo,
  44297. onSetDragVisible: _ctx.setDragVisible
  44298. }, null, 8, [
  44299. "class",
  44300. "border",
  44301. "default-sort",
  44302. "store",
  44303. "append-filter-panel-to",
  44304. "onSetDragVisible"
  44305. ])) : createCommentVNode("v-if", true),
  44306. createVNode(_component_table_body, {
  44307. context: _ctx.context,
  44308. highlight: _ctx.highlightCurrentRow,
  44309. "row-class-name": _ctx.rowClassName,
  44310. "tooltip-effect": _ctx.computedTooltipEffect,
  44311. "tooltip-options": _ctx.computedTooltipOptions,
  44312. "row-style": _ctx.rowStyle,
  44313. store: _ctx.store,
  44314. stripe: _ctx.stripe
  44315. }, null, 8, [
  44316. "context",
  44317. "highlight",
  44318. "row-class-name",
  44319. "tooltip-effect",
  44320. "tooltip-options",
  44321. "row-style",
  44322. "store",
  44323. "stripe"
  44324. ]),
  44325. _ctx.showSummary && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_footer, {
  44326. key: 1,
  44327. class: normalizeClass(_ctx.ns.e("body-footer")),
  44328. border: _ctx.border,
  44329. "default-sort": _ctx.defaultSort,
  44330. store: _ctx.store,
  44331. "sum-text": _ctx.computedSumText,
  44332. "summary-method": _ctx.summaryMethod
  44333. }, null, 8, [
  44334. "class",
  44335. "border",
  44336. "default-sort",
  44337. "store",
  44338. "sum-text",
  44339. "summary-method"
  44340. ])) : createCommentVNode("v-if", true)
  44341. ], 6),
  44342. _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  44343. key: 0,
  44344. ref: "emptyBlock",
  44345. style: normalizeStyle(_ctx.emptyBlockStyle),
  44346. class: normalizeClass(_ctx.ns.e("empty-block"))
  44347. }, [createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(_ctx.computedEmptyText), 1)])], 2)], 6)) : createCommentVNode("v-if", true),
  44348. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  44349. key: 1,
  44350. ref: "appendWrapper",
  44351. class: normalizeClass(_ctx.ns.e("append-wrapper"))
  44352. }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
  44353. ]),
  44354. _: 3
  44355. }, 8, [
  44356. "view-style",
  44357. "wrap-style",
  44358. "always",
  44359. "tabindex",
  44360. "native"
  44361. ])], 2),
  44362. _ctx.showSummary && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
  44363. key: 1,
  44364. ref: "footerWrapper",
  44365. class: normalizeClass(_ctx.ns.e("footer-wrapper"))
  44366. }, [createBaseVNode("table", {
  44367. class: normalizeClass(_ctx.ns.e("footer")),
  44368. cellspacing: "0",
  44369. cellpadding: "0",
  44370. border: "0",
  44371. style: normalizeStyle(_ctx.tableBodyStyles)
  44372. }, [createVNode(_component_hColgroup, {
  44373. columns: _ctx.store.states.columns.value,
  44374. "table-layout": _ctx.tableLayout
  44375. }, null, 8, ["columns", "table-layout"]), createVNode(_component_table_footer, {
  44376. border: _ctx.border,
  44377. "default-sort": _ctx.defaultSort,
  44378. store: _ctx.store,
  44379. "sum-text": _ctx.computedSumText,
  44380. "summary-method": _ctx.summaryMethod
  44381. }, null, 8, [
  44382. "border",
  44383. "default-sort",
  44384. "store",
  44385. "sum-text",
  44386. "summary-method"
  44387. ])], 6)], 2)), [[vShow, !_ctx.isEmpty], [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : createCommentVNode("v-if", true),
  44388. _ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock("div", {
  44389. key: 2,
  44390. class: normalizeClass(_ctx.ns.e("border-left-patch"))
  44391. }, null, 2)) : createCommentVNode("v-if", true)
  44392. ], 2), withDirectives(createBaseVNode("div", {
  44393. ref: "resizeProxy",
  44394. class: normalizeClass(_ctx.ns.e("column-resize-proxy"))
  44395. }, null, 2), [[vShow, _ctx.resizeProxyVisible]])], 46, _hoisted_1$15);
  44396. }
  44397. var table_default = /* @__PURE__ */ _plugin_vue_export_helper_default(table_vue_vue_type_script_lang_default, [["render", _sfc_render$3]]);
  44398. //#endregion
  44399. //#region node_modules/element-plus/es/components/table/src/config.mjs
  44400. var defaultClassNames = {
  44401. selection: "table-column--selection",
  44402. expand: "table__expand-column"
  44403. };
  44404. var cellStarts = {
  44405. default: { order: "" },
  44406. selection: {
  44407. width: 48,
  44408. minWidth: 48,
  44409. realWidth: 48,
  44410. order: ""
  44411. },
  44412. expand: {
  44413. width: 48,
  44414. minWidth: 48,
  44415. realWidth: 48,
  44416. order: ""
  44417. },
  44418. index: {
  44419. width: 48,
  44420. minWidth: 48,
  44421. realWidth: 48,
  44422. order: ""
  44423. }
  44424. };
  44425. var getDefaultClassName = (type) => {
  44426. return defaultClassNames[type] || "";
  44427. };
  44428. var cellForced = {
  44429. selection: {
  44430. renderHeader({ store }) {
  44431. function isDisabled() {
  44432. return store.states.data.value && store.states.data.value.length === 0;
  44433. }
  44434. return h$1(ElCheckbox, {
  44435. disabled: isDisabled(),
  44436. size: store.states.tableSize.value,
  44437. indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
  44438. "onUpdate:modelValue": store.toggleAllSelection ?? void 0,
  44439. modelValue: store.states.isAllSelected.value,
  44440. ariaLabel: store.t("el.table.selectAllLabel")
  44441. });
  44442. },
  44443. renderCell({ row, column, store, $index }) {
  44444. return h$1(ElCheckbox, {
  44445. disabled: column.selectable ? !column.selectable.call(null, row, $index) : false,
  44446. size: store.states.tableSize.value,
  44447. onChange: () => {
  44448. store.commit("rowSelectedChanged", row);
  44449. },
  44450. onClick: (event) => event.stopPropagation(),
  44451. modelValue: store.isSelected(row),
  44452. ariaLabel: store.t("el.table.selectRowLabel")
  44453. });
  44454. },
  44455. sortable: false,
  44456. resizable: false
  44457. },
  44458. index: {
  44459. renderHeader({ column }) {
  44460. return column.label || "#";
  44461. },
  44462. renderCell({ column, $index }) {
  44463. let i = $index + 1;
  44464. const index = column.index;
  44465. if (isNumber(index)) i = $index + index;
  44466. else if (isFunction$1(index)) i = index($index);
  44467. return h$1("div", {}, [i]);
  44468. },
  44469. sortable: false
  44470. },
  44471. expand: {
  44472. renderHeader({ column }) {
  44473. return column.label || "";
  44474. },
  44475. renderCell({ column, row, store, expanded, $index }) {
  44476. const { ns } = store;
  44477. const classes = [ns.e("expand-icon")];
  44478. if (!column.renderExpand && expanded) classes.push(ns.em("expand-icon", "expanded"));
  44479. const callback = function(e) {
  44480. e.stopPropagation();
  44481. store.toggleRowExpansion(row);
  44482. };
  44483. const isRowExpandable = store.states.rowExpandable.value?.(row, $index) ?? true;
  44484. if (!isRowExpandable) classes.push(ns.is("disabled"));
  44485. return h$1("button", {
  44486. type: "button",
  44487. disabled: !isRowExpandable,
  44488. "aria-label": store.t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  44489. "aria-expanded": expanded,
  44490. class: classes,
  44491. onClick: callback
  44492. }, { default: () => {
  44493. if (column.renderExpand) return [column.renderExpand({
  44494. expanded,
  44495. expandable: isRowExpandable
  44496. })];
  44497. return [h$1(ElIcon, null, { default: () => {
  44498. return [h$1(arrow_right_default)];
  44499. } })];
  44500. } });
  44501. },
  44502. sortable: false,
  44503. resizable: false
  44504. }
  44505. };
  44506. function defaultRenderCell({ row, column, $index }) {
  44507. const property = column.property;
  44508. const value = property && getProp(row, property).value;
  44509. if (column && column.formatter) return column.formatter(row, column, value, $index);
  44510. return value?.toString?.() || "";
  44511. }
  44512. function treeCellPrefix({ row, treeNode, store }, createPlaceholder = false) {
  44513. const { ns } = store;
  44514. if (!treeNode) {
  44515. if (createPlaceholder) return [h$1("span", { class: ns.e("placeholder") })];
  44516. return null;
  44517. }
  44518. const ele = [];
  44519. const callback = function(e) {
  44520. e.stopPropagation();
  44521. if (treeNode.loading) return;
  44522. store.loadOrToggle(row);
  44523. };
  44524. if (treeNode.indent) ele.push(h$1("span", {
  44525. class: ns.e("indent"),
  44526. style: { "padding-left": `${treeNode.indent}px` }
  44527. }));
  44528. if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {
  44529. const expandClasses = [ns.e("expand-icon"), treeNode.expanded ? ns.em("expand-icon", "expanded") : ""];
  44530. let icon = arrow_right_default;
  44531. if (treeNode.loading) icon = loading_default;
  44532. ele.push(h$1("button", {
  44533. type: "button",
  44534. "aria-label": store.t(treeNode.expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  44535. "aria-expanded": treeNode.expanded,
  44536. class: expandClasses,
  44537. onClick: callback
  44538. }, { default: () => {
  44539. return [h$1(ElIcon, { class: ns.is("loading", treeNode.loading) }, { default: () => [h$1(icon)] })];
  44540. } }));
  44541. } else ele.push(h$1("span", { class: ns.e("placeholder") }));
  44542. return ele;
  44543. }
  44544. //#endregion
  44545. //#region node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs
  44546. function getAllAliases(props, aliases) {
  44547. return props.reduce((prev, cur) => {
  44548. prev[cur] = cur;
  44549. return prev;
  44550. }, aliases);
  44551. }
  44552. function useWatcher(owner, props_) {
  44553. const instance = getCurrentInstance();
  44554. const registerComplexWatchers = () => {
  44555. const props = ["fixed"];
  44556. const aliases = {
  44557. realWidth: "width",
  44558. realMinWidth: "minWidth"
  44559. };
  44560. const allAliases = getAllAliases(props, aliases);
  44561. Object.keys(allAliases).forEach((key) => {
  44562. const columnKey = aliases[key];
  44563. if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
  44564. let value = newVal;
  44565. if (columnKey === "width" && key === "realWidth") value = parseWidth(newVal);
  44566. if (columnKey === "minWidth" && key === "realMinWidth") value = parseMinWidth(newVal);
  44567. instance.columnConfig.value[columnKey] = value;
  44568. instance.columnConfig.value[key] = value;
  44569. const updateColumns = columnKey === "fixed";
  44570. owner.value.store.scheduleLayout(updateColumns);
  44571. });
  44572. });
  44573. };
  44574. const registerNormalWatchers = () => {
  44575. const props = [
  44576. "label",
  44577. "filters",
  44578. "filterMultiple",
  44579. "filteredValue",
  44580. "sortable",
  44581. "index",
  44582. "formatter",
  44583. "className",
  44584. "labelClassName",
  44585. "filterClassName",
  44586. "showOverflowTooltip",
  44587. "tooltipFormatter",
  44588. "resizable"
  44589. ];
  44590. const parentProps = ["showOverflowTooltip"];
  44591. const aliases = {
  44592. property: "prop",
  44593. align: "realAlign",
  44594. headerAlign: "realHeaderAlign"
  44595. };
  44596. const allAliases = getAllAliases(props, aliases);
  44597. Object.keys(allAliases).forEach((key) => {
  44598. const columnKey = aliases[key];
  44599. if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
  44600. instance.columnConfig.value[key] = newVal;
  44601. if (key === "filters" || key === "filterMethod") instance.columnConfig.value["filterable"] = !!(instance.columnConfig.value["filters"] || instance.columnConfig.value["filterMethod"]);
  44602. });
  44603. });
  44604. parentProps.forEach((key) => {
  44605. if (hasOwn(owner.value.props, key)) watch(() => owner.value.props[key], (newVal) => {
  44606. if (instance.columnConfig.value.type === "selection") return;
  44607. if (!isUndefined(props_[key])) return;
  44608. instance.columnConfig.value[key] = newVal;
  44609. });
  44610. });
  44611. const globalConfig = useGlobalConfig("table");
  44612. if (globalConfig.value && hasOwn(globalConfig.value, "showOverflowTooltip")) watch(() => globalConfig.value?.showOverflowTooltip, (newVal) => {
  44613. if (instance.columnConfig.value.type === "selection") return;
  44614. if (!isUndefined(props_.showOverflowTooltip) || !isUndefined(owner.value.props.showOverflowTooltip)) return;
  44615. instance.columnConfig.value.showOverflowTooltip = newVal;
  44616. });
  44617. };
  44618. return {
  44619. registerComplexWatchers,
  44620. registerNormalWatchers
  44621. };
  44622. }
  44623. //#endregion
  44624. //#region node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs
  44625. function useRender(props, slots, owner) {
  44626. const instance = getCurrentInstance();
  44627. const columnId = ref("");
  44628. const isSubColumn = ref(false);
  44629. const realAlign = ref();
  44630. const realHeaderAlign = ref();
  44631. const ns = useNamespace("table");
  44632. watchEffect(() => {
  44633. realAlign.value = props.align ? `is-${props.align}` : null;
  44634. realAlign.value;
  44635. });
  44636. watchEffect(() => {
  44637. realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value;
  44638. realHeaderAlign.value;
  44639. });
  44640. const columnOrTableParent = computed(() => {
  44641. let parent = instance.vnode.vParent || instance.parent;
  44642. while (parent && !parent.tableId && !parent.columnId) parent = parent.vnode.vParent || parent.parent;
  44643. return parent;
  44644. });
  44645. const hasTreeColumn = computed(() => {
  44646. const { store } = instance.parent;
  44647. if (!store) return false;
  44648. const { treeData } = store.states;
  44649. const treeDataValue = treeData.value;
  44650. return treeDataValue && Object.keys(treeDataValue).length > 0;
  44651. });
  44652. const realWidth = ref(parseWidth(props.width));
  44653. const realMinWidth = ref(parseMinWidth(props.minWidth));
  44654. const setColumnWidth = (column) => {
  44655. if (realWidth.value) column.width = realWidth.value;
  44656. if (realMinWidth.value) column.minWidth = realMinWidth.value;
  44657. if (!realWidth.value && realMinWidth.value) column.width = void 0;
  44658. if (!column.minWidth) column.minWidth = 80;
  44659. column.realWidth = Number(isUndefined(column.width) ? column.minWidth : column.width);
  44660. return column;
  44661. };
  44662. const setColumnForcedProps = (column) => {
  44663. const type = column.type;
  44664. const source = cellForced[type] || {};
  44665. Object.keys(source).forEach((prop) => {
  44666. const value = source[prop];
  44667. if (prop !== "className" && !isUndefined(value)) column[prop] = value;
  44668. });
  44669. const className = getDefaultClassName(type);
  44670. if (className) {
  44671. const forceClass = `${unref(ns.namespace)}-${className}`;
  44672. column.className = column.className ? `${column.className} ${forceClass}` : forceClass;
  44673. }
  44674. return column;
  44675. };
  44676. const checkSubColumn = (children) => {
  44677. if (isArray$1(children)) children.forEach((child) => check(child));
  44678. else check(children);
  44679. function check(item) {
  44680. if (item?.type?.name === "ElTableColumn") item.vParent = instance;
  44681. }
  44682. };
  44683. const setColumnRenders = (column) => {
  44684. if (props.renderHeader) debugWarn("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.");
  44685. else if (column.type !== "selection") column.renderHeader = (scope) => {
  44686. instance.columnConfig.value["label"];
  44687. if (slots.header) {
  44688. const slotResult = slots.header(scope);
  44689. if (ensureValidVNode(slotResult)) return h$1(Fragment, slotResult);
  44690. }
  44691. return createTextVNode(column.label);
  44692. };
  44693. if (slots["filter-icon"]) column.renderFilterIcon = (scope) => {
  44694. return renderSlot(slots, "filter-icon", scope);
  44695. };
  44696. if (slots.expand) column.renderExpand = (scope) => {
  44697. return renderSlot(slots, "expand", scope);
  44698. };
  44699. let originRenderCell = column.renderCell;
  44700. if (column.type === "expand") {
  44701. column.renderCell = (data) => h$1("div", { class: "cell" }, [originRenderCell(data)]);
  44702. owner.value.renderExpanded = (row) => {
  44703. return slots.default ? slots.default(row) : slots.default;
  44704. };
  44705. } else {
  44706. originRenderCell = originRenderCell || defaultRenderCell;
  44707. column.renderCell = (data) => {
  44708. let children = null;
  44709. if (slots.default) {
  44710. const vnodes = slots.default(data);
  44711. children = vnodes.some((v) => v.type !== Comment) ? vnodes : originRenderCell(data);
  44712. } else children = originRenderCell(data);
  44713. const { columns } = owner.value.store.states;
  44714. const firstUserColumnIndex = columns.value.findIndex((item) => item.type === "default");
  44715. const prefix = treeCellPrefix(data, hasTreeColumn.value && data.cellIndex === firstUserColumnIndex);
  44716. const props = {
  44717. class: "cell",
  44718. style: {}
  44719. };
  44720. if (column.showOverflowTooltip) {
  44721. props.class = `${props.class} ${unref(ns.namespace)}-tooltip`;
  44722. props.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` };
  44723. }
  44724. checkSubColumn(children);
  44725. return h$1("div", props, [prefix, children]);
  44726. };
  44727. }
  44728. return column;
  44729. };
  44730. const getPropsData = (...propsKey) => {
  44731. return propsKey.reduce((prev, cur) => {
  44732. if (isArray$1(cur)) cur.forEach((key) => {
  44733. prev[key] = props[key];
  44734. });
  44735. return prev;
  44736. }, {});
  44737. };
  44738. const getColumnElIndex = (children, child) => {
  44739. return Array.prototype.indexOf.call(children, child);
  44740. };
  44741. const updateColumnOrder = () => {
  44742. owner.value.store.commit("updateColumnOrder", instance.columnConfig.value);
  44743. };
  44744. return {
  44745. columnId,
  44746. realAlign,
  44747. isSubColumn,
  44748. realHeaderAlign,
  44749. columnOrTableParent,
  44750. setColumnWidth,
  44751. setColumnForcedProps,
  44752. setColumnRenders,
  44753. getPropsData,
  44754. getColumnElIndex,
  44755. updateColumnOrder
  44756. };
  44757. }
  44758. //#endregion
  44759. //#region node_modules/element-plus/es/components/table/src/table-column/defaults.mjs
  44760. var defaults_default$1 = {
  44761. type: {
  44762. type: String,
  44763. default: "default"
  44764. },
  44765. label: String,
  44766. className: String,
  44767. labelClassName: String,
  44768. property: String,
  44769. prop: String,
  44770. width: {
  44771. type: [String, Number],
  44772. default: ""
  44773. },
  44774. minWidth: {
  44775. type: [String, Number],
  44776. default: ""
  44777. },
  44778. renderHeader: Function,
  44779. sortable: {
  44780. type: [Boolean, String],
  44781. default: false
  44782. },
  44783. sortMethod: Function,
  44784. sortBy: [
  44785. String,
  44786. Function,
  44787. Array
  44788. ],
  44789. resizable: {
  44790. type: Boolean,
  44791. default: true
  44792. },
  44793. columnKey: String,
  44794. align: String,
  44795. headerAlign: String,
  44796. showOverflowTooltip: {
  44797. type: [Boolean, Object],
  44798. default: void 0
  44799. },
  44800. tooltipFormatter: Function,
  44801. fixed: [Boolean, String],
  44802. formatter: Function,
  44803. selectable: Function,
  44804. reserveSelection: Boolean,
  44805. filterMethod: Function,
  44806. filteredValue: Array,
  44807. filters: Array,
  44808. filterPlacement: String,
  44809. filterMultiple: {
  44810. type: Boolean,
  44811. default: true
  44812. },
  44813. filterClassName: String,
  44814. index: [Number, Function],
  44815. sortOrders: {
  44816. type: Array,
  44817. default: () => {
  44818. return [
  44819. "ascending",
  44820. "descending",
  44821. null
  44822. ];
  44823. },
  44824. validator: (val) => {
  44825. return val.every((order) => [
  44826. "ascending",
  44827. "descending",
  44828. null
  44829. ].includes(order));
  44830. }
  44831. }
  44832. };
  44833. //#endregion
  44834. //#region node_modules/element-plus/es/components/table/src/table-column/index.mjs
  44835. var columnIdSeed = 1;
  44836. //#endregion
  44837. //#region node_modules/element-plus/es/components/table/src/tableColumn.mjs
  44838. var tableColumn_default = defineComponent({
  44839. name: "ElTableColumn",
  44840. components: { ElCheckbox },
  44841. props: defaults_default$1,
  44842. setup(props, { slots }) {
  44843. const instance = getCurrentInstance();
  44844. const globalConfig = useGlobalConfig("table");
  44845. const columnConfig = ref({});
  44846. const owner = computed(() => {
  44847. let parent = instance.parent;
  44848. while (parent && !parent.tableId) parent = parent.parent;
  44849. return parent;
  44850. });
  44851. const { registerNormalWatchers, registerComplexWatchers } = useWatcher(owner, props);
  44852. const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender(props, slots, owner);
  44853. const parent = columnOrTableParent.value;
  44854. columnId.value = `${"tableId" in parent && parent.tableId || "columnId" in parent && parent.columnId}_column_${columnIdSeed++}`;
  44855. onBeforeMount(() => {
  44856. isSubColumn.value = owner.value !== parent;
  44857. const type = props.type || "default";
  44858. const sortable = props.sortable === "" ? true : props.sortable;
  44859. const showOverflowTooltip = type === "selection" ? false : isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip ?? globalConfig.value?.showOverflowTooltip : props.showOverflowTooltip;
  44860. const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter : props.tooltipFormatter;
  44861. const defaults = {
  44862. ...cellStarts[type],
  44863. id: columnId.value,
  44864. type,
  44865. property: props.prop || props.property,
  44866. align: realAlign,
  44867. headerAlign: realHeaderAlign,
  44868. showOverflowTooltip,
  44869. tooltipFormatter,
  44870. filterable: props.filters || props.filterMethod,
  44871. filteredValue: [],
  44872. filterPlacement: "",
  44873. filterClassName: "",
  44874. isColumnGroup: false,
  44875. isSubColumn: false,
  44876. filterOpened: false,
  44877. sortable,
  44878. index: props.index,
  44879. rawColumnKey: instance.vnode.key
  44880. };
  44881. let column = getPropsData([
  44882. "columnKey",
  44883. "label",
  44884. "className",
  44885. "labelClassName",
  44886. "type",
  44887. "renderHeader",
  44888. "formatter",
  44889. "fixed",
  44890. "resizable"
  44891. ], [
  44892. "sortMethod",
  44893. "sortBy",
  44894. "sortOrders"
  44895. ], ["selectable", "reserveSelection"], [
  44896. "filterMethod",
  44897. "filters",
  44898. "filterMultiple",
  44899. "filterOpened",
  44900. "filteredValue",
  44901. "filterPlacement",
  44902. "filterClassName"
  44903. ]);
  44904. column = mergeOptions(defaults, column);
  44905. column = compose(setColumnRenders, setColumnWidth, setColumnForcedProps)(column);
  44906. columnConfig.value = column;
  44907. registerNormalWatchers();
  44908. registerComplexWatchers();
  44909. });
  44910. onMounted(() => {
  44911. const parent = columnOrTableParent.value;
  44912. const children = isSubColumn.value ? parent.vnode.el?.children : parent.refs.hiddenColumns?.children;
  44913. const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
  44914. columnConfig.value.getColumnIndex = getColumnIndex;
  44915. getColumnIndex() > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
  44916. });
  44917. onBeforeUnmount(() => {
  44918. const getColumnIndex = columnConfig.value.getColumnIndex;
  44919. (getColumnIndex ? getColumnIndex() : -1) > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
  44920. });
  44921. instance.columnId = columnId.value;
  44922. instance.columnConfig = columnConfig;
  44923. },
  44924. render() {
  44925. try {
  44926. const renderDefault = this.$slots.default?.({
  44927. row: {},
  44928. column: {},
  44929. $index: -1
  44930. });
  44931. const children = [];
  44932. if (isArray$1(renderDefault)) {
  44933. for (const childNode of renderDefault) if (childNode.type?.name === "ElTableColumn" || childNode.shapeFlag & 2) children.push(childNode);
  44934. else if (childNode.type === Fragment && isArray$1(childNode.children)) childNode.children.forEach((vnode) => {
  44935. if (vnode?.patchFlag !== 1024 && !isString(vnode?.children)) children.push(vnode);
  44936. });
  44937. }
  44938. return h$1("div", children);
  44939. } catch {
  44940. return h$1("div", []);
  44941. }
  44942. }
  44943. });
  44944. //#endregion
  44945. //#region node_modules/element-plus/es/components/table/index.mjs
  44946. var ElTable = withInstall(table_default, { TableColumn: tableColumn_default });
  44947. var ElTableColumn = withNoopInstall(tableColumn_default);
  44948. //#endregion
  44949. //#region node_modules/element-plus/es/components/table-v2/src/constants.mjs
  44950. var SortOrder = /* @__PURE__ */ function(SortOrder) {
  44951. SortOrder["ASC"] = "asc";
  44952. SortOrder["DESC"] = "desc";
  44953. return SortOrder;
  44954. }({});
  44955. var Alignment = /* @__PURE__ */ function(Alignment) {
  44956. Alignment["LEFT"] = "left";
  44957. Alignment["CENTER"] = "center";
  44958. Alignment["RIGHT"] = "right";
  44959. return Alignment;
  44960. }({});
  44961. var FixedDir = /* @__PURE__ */ function(FixedDir) {
  44962. FixedDir["LEFT"] = "left";
  44963. FixedDir["RIGHT"] = "right";
  44964. return FixedDir;
  44965. }({});
  44966. var oppositeOrderMap = {
  44967. [SortOrder.ASC]: SortOrder.DESC,
  44968. [SortOrder.DESC]: SortOrder.ASC
  44969. };
  44970. SortOrder.ASC, SortOrder.DESC;
  44971. //#endregion
  44972. //#region node_modules/element-plus/es/components/table-v2/src/private.mjs
  44973. var placeholderSign = Symbol("placeholder");
  44974. //#endregion
  44975. //#region node_modules/element-plus/es/components/table-v2/src/common.mjs
  44976. /**
  44977. * @Note even though we can use `string[] | string` as the type but for
  44978. * convenience here we only use `string` as the acceptable value here.
  44979. */
  44980. var classType = String;
  44981. var columns = {
  44982. type: definePropType(Array),
  44983. required: true
  44984. };
  44985. definePropType(Object);
  44986. var fixedDataType = { type: definePropType(Array) };
  44987. var dataType = {
  44988. ...fixedDataType,
  44989. required: true
  44990. };
  44991. var expandColumnKey = String;
  44992. var expandKeys = {
  44993. type: definePropType(Array),
  44994. default: () => mutable([])
  44995. };
  44996. var requiredNumber = {
  44997. type: Number,
  44998. required: true
  44999. };
  45000. var rowKey = {
  45001. type: definePropType([
  45002. String,
  45003. Number,
  45004. Symbol
  45005. ]),
  45006. default: "id"
  45007. };
  45008. /**
  45009. * @note even though we can use `StyleValue` but that would be difficult for us to mapping them,
  45010. * so we only use `CSSProperties` as the acceptable value here.
  45011. */
  45012. var styleType = { type: definePropType(Object) };
  45013. //#endregion
  45014. //#region node_modules/element-plus/es/components/table-v2/src/row.mjs
  45015. var tableV2RowProps = buildProps({
  45016. class: String,
  45017. columns,
  45018. columnsStyles: {
  45019. type: definePropType(Object),
  45020. required: true
  45021. },
  45022. depth: Number,
  45023. expandColumnKey,
  45024. estimatedRowHeight: {
  45025. ...virtualizedGridProps.estimatedRowHeight,
  45026. default: void 0
  45027. },
  45028. isScrolling: Boolean,
  45029. onRowExpand: { type: definePropType(Function) },
  45030. onRowHover: { type: definePropType(Function) },
  45031. onRowHeightChange: { type: definePropType(Function) },
  45032. rowData: {
  45033. type: definePropType(Object),
  45034. required: true
  45035. },
  45036. rowEventHandlers: { type: definePropType(Object) },
  45037. rowIndex: {
  45038. type: Number,
  45039. required: true
  45040. },
  45041. rowKey,
  45042. style: { type: definePropType(Object) }
  45043. });
  45044. //#endregion
  45045. //#region node_modules/element-plus/es/components/table-v2/src/header.mjs
  45046. var requiredNumberType = {
  45047. type: Number,
  45048. required: true
  45049. };
  45050. var tableV2HeaderProps = buildProps({
  45051. class: String,
  45052. columns,
  45053. fixedHeaderData: { type: definePropType(Array) },
  45054. headerData: {
  45055. type: definePropType(Array),
  45056. required: true
  45057. },
  45058. headerHeight: {
  45059. type: definePropType([Number, Array]),
  45060. default: 50
  45061. },
  45062. rowWidth: requiredNumberType,
  45063. rowHeight: {
  45064. type: Number,
  45065. default: 50
  45066. },
  45067. height: requiredNumberType,
  45068. width: requiredNumberType
  45069. });
  45070. //#endregion
  45071. //#region node_modules/element-plus/es/components/table-v2/src/grid.mjs
  45072. var tableV2GridProps = buildProps({
  45073. columns,
  45074. data: dataType,
  45075. fixedData: fixedDataType,
  45076. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  45077. width: requiredNumber,
  45078. height: requiredNumber,
  45079. headerWidth: requiredNumber,
  45080. headerHeight: tableV2HeaderProps.headerHeight,
  45081. bodyWidth: requiredNumber,
  45082. rowHeight: requiredNumber,
  45083. cache: virtualizedListProps.cache,
  45084. useIsScrolling: Boolean,
  45085. scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn,
  45086. scrollbarStartGap: virtualizedGridProps.scrollbarStartGap,
  45087. scrollbarEndGap: virtualizedGridProps.scrollbarEndGap,
  45088. class: classType,
  45089. style: styleType,
  45090. containerStyle: styleType,
  45091. getRowHeight: {
  45092. type: definePropType(Function),
  45093. required: true
  45094. },
  45095. rowKey: tableV2RowProps.rowKey,
  45096. onRowsRendered: { type: definePropType(Function) },
  45097. onScroll: { type: definePropType(Function) }
  45098. });
  45099. //#endregion
  45100. //#region node_modules/element-plus/es/components/table-v2/src/table.mjs
  45101. var tableV2Props = buildProps({
  45102. cache: tableV2GridProps.cache,
  45103. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  45104. rowKey,
  45105. headerClass: { type: definePropType([String, Function]) },
  45106. headerProps: { type: definePropType([Object, Function]) },
  45107. headerCellProps: { type: definePropType([Object, Function]) },
  45108. headerHeight: tableV2HeaderProps.headerHeight,
  45109. footerHeight: {
  45110. type: Number,
  45111. default: 0
  45112. },
  45113. rowClass: { type: definePropType([String, Function]) },
  45114. rowProps: { type: definePropType([Object, Function]) },
  45115. rowHeight: {
  45116. type: Number,
  45117. default: 50
  45118. },
  45119. cellProps: { type: definePropType([Object, Function]) },
  45120. columns,
  45121. data: dataType,
  45122. dataGetter: { type: definePropType(Function) },
  45123. fixedData: fixedDataType,
  45124. expandColumnKey: tableV2RowProps.expandColumnKey,
  45125. expandedRowKeys: expandKeys,
  45126. defaultExpandedRowKeys: expandKeys,
  45127. class: classType,
  45128. fixed: Boolean,
  45129. style: { type: definePropType(Object) },
  45130. width: requiredNumber,
  45131. height: requiredNumber,
  45132. maxHeight: Number,
  45133. useIsScrolling: Boolean,
  45134. indentSize: {
  45135. type: Number,
  45136. default: 12
  45137. },
  45138. iconSize: {
  45139. type: Number,
  45140. default: 12
  45141. },
  45142. hScrollbarSize: virtualizedGridProps.hScrollbarSize,
  45143. vScrollbarSize: virtualizedGridProps.vScrollbarSize,
  45144. scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn,
  45145. sortBy: {
  45146. type: definePropType(Object),
  45147. default: () => ({})
  45148. },
  45149. sortState: {
  45150. type: definePropType(Object),
  45151. default: void 0
  45152. },
  45153. onColumnSort: { type: definePropType(Function) },
  45154. onExpandedRowsChange: { type: definePropType(Function) },
  45155. onEndReached: { type: definePropType(Function) },
  45156. onRowExpand: tableV2RowProps.onRowExpand,
  45157. onScroll: tableV2GridProps.onScroll,
  45158. onRowsRendered: tableV2GridProps.onRowsRendered,
  45159. rowEventHandlers: tableV2RowProps.rowEventHandlers
  45160. });
  45161. //#endregion
  45162. //#region node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs
  45163. var calcColumnStyle = (column, fixedColumn, fixed) => {
  45164. const flex = {
  45165. flexGrow: 0,
  45166. flexShrink: 0,
  45167. ...fixed ? {} : {
  45168. flexGrow: column.flexGrow ?? 0,
  45169. flexShrink: column.flexShrink ?? 1
  45170. }
  45171. };
  45172. const style = {
  45173. ...column.style ?? {},
  45174. ...flex,
  45175. flexBasis: "auto",
  45176. width: column.width
  45177. };
  45178. if (!fixedColumn) {
  45179. if (column.maxWidth) style.maxWidth = column.maxWidth;
  45180. if (column.minWidth) style.minWidth = column.minWidth;
  45181. }
  45182. return style;
  45183. };
  45184. //#endregion
  45185. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs
  45186. function useColumns(props, columns, fixed) {
  45187. const _columns = computed(() => unref(columns).map((column, index) => ({
  45188. ...column,
  45189. key: column.key ?? column.dataKey ?? index
  45190. })));
  45191. const visibleColumns = computed(() => {
  45192. return unref(_columns).filter((column) => !column.hidden);
  45193. });
  45194. const fixedColumnsOnLeft = computed(() => unref(visibleColumns).filter((column) => column.fixed === "left" || column.fixed === true));
  45195. const fixedColumnsOnRight = computed(() => unref(visibleColumns).filter((column) => column.fixed === "right"));
  45196. const normalColumns = computed(() => unref(visibleColumns).filter((column) => !column.fixed));
  45197. const mainColumns = computed(() => {
  45198. const ret = [];
  45199. unref(fixedColumnsOnLeft).forEach((column) => {
  45200. ret.push({
  45201. ...column,
  45202. placeholderSign
  45203. });
  45204. });
  45205. unref(normalColumns).forEach((column) => {
  45206. ret.push(column);
  45207. });
  45208. unref(fixedColumnsOnRight).forEach((column) => {
  45209. ret.push({
  45210. ...column,
  45211. placeholderSign
  45212. });
  45213. });
  45214. return ret;
  45215. });
  45216. const hasFixedColumns = computed(() => {
  45217. return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length;
  45218. });
  45219. const columnsStyles = computed(() => {
  45220. return unref(_columns).reduce((style, column) => {
  45221. style[column.key] = calcColumnStyle(column, unref(fixed), props.fixed);
  45222. return style;
  45223. }, {});
  45224. });
  45225. const columnsTotalWidth = computed(() => {
  45226. return unref(visibleColumns).reduce((width, column) => width + column.width, 0);
  45227. });
  45228. const getColumn = (key) => {
  45229. return unref(_columns).find((column) => column.key === key);
  45230. };
  45231. const getColumnStyle = (key) => {
  45232. return unref(columnsStyles)[key];
  45233. };
  45234. const updateColumnWidth = (column, width) => {
  45235. column.width = width;
  45236. };
  45237. function onColumnSorted(e) {
  45238. const { key } = e.currentTarget.dataset;
  45239. if (!key) return;
  45240. const { sortState, sortBy } = props;
  45241. let order = SortOrder.ASC;
  45242. if (isObject$2(sortState)) order = oppositeOrderMap[sortState[key]];
  45243. else order = oppositeOrderMap[sortBy.order];
  45244. props.onColumnSort?.({
  45245. column: getColumn(key),
  45246. key,
  45247. order
  45248. });
  45249. }
  45250. return {
  45251. columns: _columns,
  45252. columnsStyles,
  45253. columnsTotalWidth,
  45254. fixedColumnsOnLeft,
  45255. fixedColumnsOnRight,
  45256. hasFixedColumns,
  45257. mainColumns,
  45258. normalColumns,
  45259. visibleColumns,
  45260. getColumn,
  45261. getColumnStyle,
  45262. updateColumnWidth,
  45263. onColumnSorted
  45264. };
  45265. }
  45266. //#endregion
  45267. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs
  45268. var useScrollbar = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => {
  45269. const scrollPos = ref({
  45270. scrollLeft: 0,
  45271. scrollTop: 0
  45272. });
  45273. function doScroll(params) {
  45274. const { scrollTop } = params;
  45275. mainTableRef.value?.scrollTo(params);
  45276. leftTableRef.value?.scrollToTop(scrollTop);
  45277. rightTableRef.value?.scrollToTop(scrollTop);
  45278. }
  45279. function scrollTo(params) {
  45280. scrollPos.value = params;
  45281. doScroll(params);
  45282. }
  45283. function scrollToTop(scrollTop) {
  45284. scrollPos.value.scrollTop = scrollTop;
  45285. doScroll(unref(scrollPos));
  45286. }
  45287. function scrollToLeft(scrollLeft) {
  45288. scrollPos.value.scrollLeft = scrollLeft;
  45289. mainTableRef.value?.scrollTo?.(unref(scrollPos));
  45290. }
  45291. function onScroll(params) {
  45292. scrollTo(params);
  45293. props.onScroll?.(params);
  45294. }
  45295. function onVerticalScroll({ scrollTop }) {
  45296. const { scrollTop: currentScrollTop } = unref(scrollPos);
  45297. if (scrollTop !== currentScrollTop) scrollToTop(scrollTop);
  45298. }
  45299. function scrollToRow(row, strategy = "auto") {
  45300. mainTableRef.value?.scrollToRow(row, strategy);
  45301. }
  45302. watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
  45303. if (cur > prev) onMaybeEndReached();
  45304. });
  45305. return {
  45306. scrollPos,
  45307. scrollTo,
  45308. scrollToLeft,
  45309. scrollToTop,
  45310. scrollToRow,
  45311. onScroll,
  45312. onVerticalScroll
  45313. };
  45314. };
  45315. //#endregion
  45316. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs
  45317. var useRow = (props, { mainTableRef, leftTableRef, rightTableRef, tableInstance, ns, isScrolling }) => {
  45318. const vm = getCurrentInstance();
  45319. const { emit } = vm;
  45320. const isResetting = shallowRef(false);
  45321. const expandedRowKeys = ref(props.defaultExpandedRowKeys || []);
  45322. const lastRenderedRowIndex = ref(-1);
  45323. const resetIndex = shallowRef(null);
  45324. const rowHeights = ref({});
  45325. const pendingRowHeights = ref({});
  45326. const leftTableHeights = shallowRef({});
  45327. const mainTableHeights = shallowRef({});
  45328. const rightTableHeights = shallowRef({});
  45329. const isDynamic = computed(() => isNumber(props.estimatedRowHeight));
  45330. function onRowsRendered(params) {
  45331. props.onRowsRendered?.(params);
  45332. if (params.rowCacheEnd > unref(lastRenderedRowIndex)) lastRenderedRowIndex.value = params.rowCacheEnd;
  45333. }
  45334. function onRowHovered({ hovered, rowKey }) {
  45335. if (isScrolling.value) return;
  45336. tableInstance.vnode.el.querySelectorAll(`[rowkey="${String(rowKey)}"]`).forEach((row) => {
  45337. if (hovered) row.classList.add(ns.is("hovered"));
  45338. else row.classList.remove(ns.is("hovered"));
  45339. });
  45340. }
  45341. function onRowExpanded({ expanded, rowData, rowIndex, rowKey }) {
  45342. const _expandedRowKeys = [...unref(expandedRowKeys)];
  45343. const currentKeyIndex = _expandedRowKeys.indexOf(rowKey);
  45344. if (expanded) {
  45345. if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey);
  45346. } else if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1);
  45347. expandedRowKeys.value = _expandedRowKeys;
  45348. emit("update:expandedRowKeys", _expandedRowKeys);
  45349. props.onRowExpand?.({
  45350. expanded,
  45351. rowData,
  45352. rowIndex,
  45353. rowKey
  45354. });
  45355. props.onExpandedRowsChange?.(_expandedRowKeys);
  45356. if (tableInstance.vnode.el.querySelector(`.${ns.is("hovered")}[rowkey="${String(rowKey)}"]`)) nextTick(() => onRowHovered({
  45357. hovered: true,
  45358. rowKey
  45359. }));
  45360. }
  45361. const flushingRowHeights = debounce(() => {
  45362. isResetting.value = true;
  45363. rowHeights.value = {
  45364. ...unref(rowHeights),
  45365. ...unref(pendingRowHeights)
  45366. };
  45367. resetAfterIndex(unref(resetIndex), false);
  45368. pendingRowHeights.value = {};
  45369. resetIndex.value = null;
  45370. mainTableRef.value?.forceUpdate();
  45371. leftTableRef.value?.forceUpdate();
  45372. rightTableRef.value?.forceUpdate();
  45373. vm.proxy?.$forceUpdate();
  45374. isResetting.value = false;
  45375. }, 0);
  45376. function resetAfterIndex(index, forceUpdate = false) {
  45377. if (!unref(isDynamic)) return;
  45378. [
  45379. mainTableRef,
  45380. leftTableRef,
  45381. rightTableRef
  45382. ].forEach((tableRef) => {
  45383. const table = unref(tableRef);
  45384. if (table) table.resetAfterRowIndex(index, forceUpdate);
  45385. });
  45386. }
  45387. function resetHeights(rowKey, height, rowIdx) {
  45388. const resetIdx = unref(resetIndex);
  45389. if (resetIdx === null) resetIndex.value = rowIdx;
  45390. else if (resetIdx > rowIdx) resetIndex.value = rowIdx;
  45391. pendingRowHeights.value[rowKey] = height;
  45392. }
  45393. function onRowHeightChange({ rowKey, height, rowIndex }, fixedDir) {
  45394. if (!fixedDir) mainTableHeights.value[rowKey] = height;
  45395. else if (fixedDir === FixedDir.RIGHT) rightTableHeights.value[rowKey] = height;
  45396. else leftTableHeights.value[rowKey] = height;
  45397. const maximumHeight = Math.max(...[
  45398. leftTableHeights,
  45399. rightTableHeights,
  45400. mainTableHeights
  45401. ].map((records) => records.value[rowKey] || 0));
  45402. if (unref(rowHeights)[rowKey] !== maximumHeight) {
  45403. resetHeights(rowKey, maximumHeight, rowIndex);
  45404. flushingRowHeights();
  45405. }
  45406. }
  45407. return {
  45408. expandedRowKeys,
  45409. lastRenderedRowIndex,
  45410. isDynamic,
  45411. isResetting,
  45412. rowHeights,
  45413. resetAfterIndex,
  45414. onRowExpanded,
  45415. onRowHovered,
  45416. onRowsRendered,
  45417. onRowHeightChange
  45418. };
  45419. };
  45420. //#endregion
  45421. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs
  45422. var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => {
  45423. const depthMap = ref({});
  45424. const flattenedData = computed(() => {
  45425. const depths = {};
  45426. const { data, rowKey } = props;
  45427. const _expandedRowKeys = unref(expandedRowKeys);
  45428. if (!_expandedRowKeys || !_expandedRowKeys.length) return data;
  45429. const array = [];
  45430. const keysSet = /* @__PURE__ */ new Set();
  45431. _expandedRowKeys.forEach((x) => keysSet.add(x));
  45432. let copy = data.slice();
  45433. copy.forEach((x) => depths[x[rowKey]] = 0);
  45434. while (copy.length > 0) {
  45435. const item = copy.shift();
  45436. array.push(item);
  45437. if (keysSet.has(item[rowKey]) && isArray$1(item.children) && item.children.length > 0) {
  45438. copy = [...item.children, ...copy];
  45439. item.children.forEach((child) => depths[child[rowKey]] = depths[item[rowKey]] + 1);
  45440. }
  45441. }
  45442. depthMap.value = depths;
  45443. return array;
  45444. });
  45445. const data = computed(() => {
  45446. const { data, expandColumnKey } = props;
  45447. return expandColumnKey ? unref(flattenedData) : data;
  45448. });
  45449. watch(data, (val, prev) => {
  45450. if (val !== prev) {
  45451. lastRenderedRowIndex.value = -1;
  45452. resetAfterIndex(0, true);
  45453. }
  45454. });
  45455. return {
  45456. data,
  45457. depthMap
  45458. };
  45459. };
  45460. //#endregion
  45461. //#region node_modules/element-plus/es/components/table-v2/src/utils.mjs
  45462. var sumReducer = (sum, num) => sum + num;
  45463. var sum = (listLike) => {
  45464. return isArray$1(listLike) ? listLike.reduce(sumReducer, 0) : listLike;
  45465. };
  45466. var tryCall = (fLike, params, defaultRet = {}) => {
  45467. return isFunction$1(fLike) ? fLike(params) : fLike ?? defaultRet;
  45468. };
  45469. var enforceUnit = (style) => {
  45470. [
  45471. "width",
  45472. "maxWidth",
  45473. "minWidth",
  45474. "height"
  45475. ].forEach((key) => {
  45476. style[key] = addUnit(style[key]);
  45477. });
  45478. return style;
  45479. };
  45480. var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props) => h$1(ComponentLike, props) : ComponentLike;
  45481. //#endregion
  45482. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs
  45483. var useStyles = (props, { columnsTotalWidth, rowsHeight, fixedColumnsOnLeft, fixedColumnsOnRight }) => {
  45484. const bodyWidth = computed(() => {
  45485. const { fixed, width, vScrollbarSize } = props;
  45486. const ret = width - vScrollbarSize;
  45487. return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
  45488. });
  45489. const mainTableHeight = computed(() => {
  45490. const { height = 0, maxHeight = 0, footerHeight, hScrollbarSize } = props;
  45491. if (maxHeight > 0) {
  45492. const _fixedRowsHeight = unref(fixedRowsHeight);
  45493. const _rowsHeight = unref(rowsHeight);
  45494. const total = unref(headerHeight) + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
  45495. return Math.min(total, maxHeight - footerHeight);
  45496. }
  45497. return height - footerHeight;
  45498. });
  45499. const fixedTableHeight = computed(() => {
  45500. const { maxHeight } = props;
  45501. const tableHeight = unref(mainTableHeight);
  45502. if (isNumber(maxHeight) && maxHeight > 0) return tableHeight;
  45503. const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight);
  45504. return Math.min(tableHeight, totalHeight);
  45505. });
  45506. const mapColumn = (column) => column.width;
  45507. const leftTableWidth = computed(() => sum(unref(fixedColumnsOnLeft).map(mapColumn)));
  45508. const rightTableWidth = computed(() => sum(unref(fixedColumnsOnRight).map(mapColumn)));
  45509. const headerHeight = computed(() => sum(props.headerHeight));
  45510. const fixedRowsHeight = computed(() => {
  45511. return (props.fixedData?.length || 0) * props.rowHeight;
  45512. });
  45513. const windowHeight = computed(() => {
  45514. return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight);
  45515. });
  45516. const rootStyle = computed(() => {
  45517. const { style = {}, height, width } = props;
  45518. return enforceUnit({
  45519. ...style,
  45520. height,
  45521. width
  45522. });
  45523. });
  45524. return {
  45525. bodyWidth,
  45526. fixedTableHeight,
  45527. mainTableHeight,
  45528. leftTableWidth,
  45529. rightTableWidth,
  45530. windowHeight,
  45531. footerHeight: computed(() => enforceUnit({ height: props.footerHeight })),
  45532. emptyStyle: computed(() => ({
  45533. top: addUnit(unref(headerHeight)),
  45534. bottom: addUnit(props.footerHeight),
  45535. width: addUnit(props.width)
  45536. })),
  45537. rootStyle,
  45538. headerHeight
  45539. };
  45540. };
  45541. //#endregion
  45542. //#region node_modules/element-plus/es/components/table-v2/src/use-table.mjs
  45543. function useTable(props) {
  45544. const mainTableRef = ref();
  45545. const leftTableRef = ref();
  45546. const rightTableRef = ref();
  45547. const { columns, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, onColumnSorted } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed"));
  45548. const { scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll, scrollPos } = useScrollbar(props, {
  45549. mainTableRef,
  45550. leftTableRef,
  45551. rightTableRef,
  45552. onMaybeEndReached
  45553. });
  45554. const ns = useNamespace("table-v2");
  45555. const instance = getCurrentInstance();
  45556. const isScrolling = shallowRef(false);
  45557. const { expandedRowKeys, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHeightChange, onRowHovered, onRowsRendered } = useRow(props, {
  45558. mainTableRef,
  45559. leftTableRef,
  45560. rightTableRef,
  45561. tableInstance: instance,
  45562. ns,
  45563. isScrolling
  45564. });
  45565. const { data, depthMap } = useData(props, {
  45566. expandedRowKeys,
  45567. lastRenderedRowIndex,
  45568. resetAfterIndex
  45569. });
  45570. const rowsHeight = computed(() => {
  45571. const { estimatedRowHeight, rowHeight } = props;
  45572. const _data = unref(data);
  45573. if (isNumber(estimatedRowHeight)) return Object.values(unref(rowHeights)).reduce((acc, curr) => acc + curr, 0);
  45574. return _data.length * rowHeight;
  45575. });
  45576. const { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight } = useStyles(props, {
  45577. columnsTotalWidth,
  45578. fixedColumnsOnLeft,
  45579. fixedColumnsOnRight,
  45580. rowsHeight
  45581. });
  45582. const containerRef = ref();
  45583. const showEmpty = computed(() => {
  45584. const noData = unref(data).length === 0;
  45585. return isArray$1(props.fixedData) ? props.fixedData.length === 0 && noData : noData;
  45586. });
  45587. function getRowHeight(rowIndex) {
  45588. const { estimatedRowHeight, rowHeight, rowKey } = props;
  45589. if (!estimatedRowHeight) return rowHeight;
  45590. return unref(rowHeights)[unref(data)[rowIndex][rowKey]] || estimatedRowHeight;
  45591. }
  45592. const isEndReached = ref(false);
  45593. function onMaybeEndReached() {
  45594. const { onEndReached } = props;
  45595. if (!onEndReached) return;
  45596. const { scrollTop } = unref(scrollPos);
  45597. const _totalHeight = unref(rowsHeight);
  45598. const remainDistance = _totalHeight - (scrollTop + unref(windowHeight)) + props.hScrollbarSize;
  45599. if (!isEndReached.value && unref(lastRenderedRowIndex) >= 0 && _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)) {
  45600. isEndReached.value = true;
  45601. onEndReached(remainDistance);
  45602. } else isEndReached.value = false;
  45603. }
  45604. watch(() => unref(rowsHeight), () => isEndReached.value = false);
  45605. watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, { deep: true });
  45606. return {
  45607. columns,
  45608. containerRef,
  45609. mainTableRef,
  45610. leftTableRef,
  45611. rightTableRef,
  45612. isDynamic,
  45613. isResetting,
  45614. isScrolling,
  45615. hasFixedColumns,
  45616. columnsStyles,
  45617. columnsTotalWidth,
  45618. data,
  45619. expandedRowKeys,
  45620. depthMap,
  45621. fixedColumnsOnLeft,
  45622. fixedColumnsOnRight,
  45623. mainColumns,
  45624. bodyWidth,
  45625. emptyStyle,
  45626. rootStyle,
  45627. footerHeight,
  45628. mainTableHeight,
  45629. fixedTableHeight,
  45630. leftTableWidth,
  45631. rightTableWidth,
  45632. showEmpty,
  45633. getRowHeight,
  45634. onColumnSorted,
  45635. onRowHovered,
  45636. onRowExpanded,
  45637. onRowsRendered,
  45638. onRowHeightChange,
  45639. scrollTo,
  45640. scrollToLeft,
  45641. scrollToTop,
  45642. scrollToRow,
  45643. onScroll,
  45644. onVerticalScroll
  45645. };
  45646. }
  45647. //#endregion
  45648. //#region node_modules/element-plus/es/components/table-v2/src/tokens.mjs
  45649. var TableV2InjectionKey = Symbol("tableV2");
  45650. var TABLE_V2_GRID_INJECTION_KEY = "tableV2GridScrollLeft";
  45651. //#endregion
  45652. //#region node_modules/element-plus/es/components/table-v2/src/components/header.mjs
  45653. var TableV2Header = /* @__PURE__ */ defineComponent({
  45654. name: "ElTableV2Header",
  45655. props: tableV2HeaderProps,
  45656. setup(props, { slots, expose }) {
  45657. const ns = useNamespace("table-v2");
  45658. const scrollLeftInfo = inject(TABLE_V2_GRID_INJECTION_KEY);
  45659. const headerRef = ref();
  45660. const headerStyle = computed(() => enforceUnit({
  45661. width: props.width,
  45662. height: props.height
  45663. }));
  45664. const rowStyle = computed(() => enforceUnit({
  45665. width: props.rowWidth,
  45666. height: props.height
  45667. }));
  45668. const headerHeights = computed(() => castArray$1(unref(props.headerHeight)));
  45669. const scrollToLeft = (left) => {
  45670. const headerEl = unref(headerRef);
  45671. nextTick(() => {
  45672. headerEl?.scroll && headerEl.scroll({ left });
  45673. });
  45674. };
  45675. const renderFixedRows = () => {
  45676. const fixedRowClassName = ns.e("fixed-header-row");
  45677. const { columns, fixedHeaderData, rowHeight } = props;
  45678. return fixedHeaderData?.map((fixedRowData, fixedRowIndex) => {
  45679. const style = enforceUnit({
  45680. height: rowHeight,
  45681. width: "100%"
  45682. });
  45683. return slots.fixed?.({
  45684. class: fixedRowClassName,
  45685. columns,
  45686. rowData: fixedRowData,
  45687. rowIndex: -(fixedRowIndex + 1),
  45688. style
  45689. });
  45690. });
  45691. };
  45692. const renderDynamicRows = () => {
  45693. const dynamicRowClassName = ns.e("dynamic-header-row");
  45694. const { columns } = props;
  45695. return unref(headerHeights).map((rowHeight, rowIndex) => {
  45696. const style = enforceUnit({
  45697. width: "100%",
  45698. height: rowHeight
  45699. });
  45700. return slots.dynamic?.({
  45701. class: dynamicRowClassName,
  45702. columns,
  45703. headerIndex: rowIndex,
  45704. style
  45705. });
  45706. });
  45707. };
  45708. onUpdated(() => {
  45709. if (scrollLeftInfo?.value) scrollToLeft(scrollLeftInfo.value);
  45710. });
  45711. expose({ scrollToLeft });
  45712. return () => {
  45713. if (props.height <= 0) return;
  45714. return createVNode("div", {
  45715. "ref": headerRef,
  45716. "class": props.class,
  45717. "style": unref(headerStyle),
  45718. "role": "rowgroup"
  45719. }, [createVNode("div", {
  45720. "style": unref(rowStyle),
  45721. "class": ns.e("header")
  45722. }, [renderDynamicRows(), renderFixedRows()])]);
  45723. };
  45724. }
  45725. });
  45726. //#endregion
  45727. //#region node_modules/element-plus/es/components/table-v2/src/table-grid.mjs
  45728. var COMPONENT_NAME$5 = "ElTableV2Grid";
  45729. var useTableGrid = (props) => {
  45730. const headerRef = ref();
  45731. const bodyRef = ref();
  45732. const scrollLeft = ref(0);
  45733. const totalHeight = computed(() => {
  45734. const { data, rowHeight, estimatedRowHeight } = props;
  45735. if (estimatedRowHeight) return;
  45736. return data.length * rowHeight;
  45737. });
  45738. const fixedRowHeight = computed(() => {
  45739. const { fixedData, rowHeight } = props;
  45740. return (fixedData?.length || 0) * rowHeight;
  45741. });
  45742. const headerHeight = computed(() => sum(props.headerHeight));
  45743. const gridHeight = computed(() => {
  45744. const { height } = props;
  45745. return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight));
  45746. });
  45747. const hasHeader = computed(() => {
  45748. return unref(headerHeight) + unref(fixedRowHeight) > 0;
  45749. });
  45750. const itemKey = ({ data, rowIndex }) => data[rowIndex][props.rowKey];
  45751. function onItemRendered({ rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }) {
  45752. props.onRowsRendered?.({
  45753. rowCacheStart,
  45754. rowCacheEnd,
  45755. rowVisibleStart,
  45756. rowVisibleEnd
  45757. });
  45758. }
  45759. function resetAfterRowIndex(index, forceUpdate) {
  45760. bodyRef.value?.resetAfterRowIndex(index, forceUpdate);
  45761. }
  45762. function scrollTo(leftOrOptions, top) {
  45763. const header$ = unref(headerRef);
  45764. const body$ = unref(bodyRef);
  45765. if (isObject$2(leftOrOptions)) {
  45766. header$?.scrollToLeft(leftOrOptions.scrollLeft);
  45767. scrollLeft.value = leftOrOptions.scrollLeft;
  45768. body$?.scrollTo(leftOrOptions);
  45769. } else {
  45770. header$?.scrollToLeft(leftOrOptions);
  45771. scrollLeft.value = leftOrOptions;
  45772. body$?.scrollTo({
  45773. scrollLeft: leftOrOptions,
  45774. scrollTop: top
  45775. });
  45776. }
  45777. }
  45778. function scrollToTop(scrollTop) {
  45779. unref(bodyRef)?.scrollTo({ scrollTop });
  45780. }
  45781. function scrollToRow(row, strategy) {
  45782. const body = unref(bodyRef);
  45783. if (!body) return;
  45784. const prevScrollLeft = scrollLeft.value;
  45785. body.scrollToItem(row, 0, strategy);
  45786. if (prevScrollLeft) scrollTo({ scrollLeft: prevScrollLeft });
  45787. }
  45788. function forceUpdate() {
  45789. unref(bodyRef)?.$forceUpdate();
  45790. unref(headerRef)?.$forceUpdate();
  45791. }
  45792. watch(() => props.bodyWidth, () => {
  45793. if (isNumber(props.estimatedRowHeight)) bodyRef.value?.resetAfter({ columnIndex: 0 }, false);
  45794. });
  45795. return {
  45796. bodyRef,
  45797. forceUpdate,
  45798. fixedRowHeight,
  45799. gridHeight,
  45800. hasHeader,
  45801. headerHeight,
  45802. headerRef,
  45803. totalHeight,
  45804. itemKey,
  45805. onItemRendered,
  45806. resetAfterRowIndex,
  45807. scrollTo,
  45808. scrollToTop,
  45809. scrollToRow,
  45810. scrollLeft
  45811. };
  45812. };
  45813. var TableGrid = /* @__PURE__ */ defineComponent({
  45814. name: COMPONENT_NAME$5,
  45815. props: tableV2GridProps,
  45816. setup(props, { slots, expose }) {
  45817. const { ns } = inject(TableV2InjectionKey);
  45818. const { bodyRef, fixedRowHeight, gridHeight, hasHeader, headerRef, headerHeight, totalHeight, forceUpdate, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow, scrollLeft } = useTableGrid(props);
  45819. provide(TABLE_V2_GRID_INJECTION_KEY, scrollLeft);
  45820. onActivated(async () => {
  45821. await nextTick();
  45822. const scrollTop = bodyRef.value?.states.scrollTop;
  45823. scrollTop && scrollToTop(Math.round(scrollTop) + 1);
  45824. });
  45825. expose({
  45826. forceUpdate,
  45827. totalHeight,
  45828. scrollTo,
  45829. scrollToTop,
  45830. scrollToRow,
  45831. resetAfterRowIndex
  45832. });
  45833. const getColumnWidth = () => props.bodyWidth;
  45834. return () => {
  45835. const { cache, columns, data, fixedData, useIsScrolling, scrollbarAlwaysOn, scrollbarEndGap, scrollbarStartGap, style, rowHeight, bodyWidth, estimatedRowHeight, headerWidth, height, width, getRowHeight, onScroll } = props;
  45836. const isDynamicRowEnabled = isNumber(estimatedRowHeight);
  45837. const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid;
  45838. const _headerHeight = unref(headerHeight);
  45839. return createVNode("div", {
  45840. "role": "table",
  45841. "class": [ns.e("table"), props.class],
  45842. "style": style
  45843. }, [createVNode(Grid, {
  45844. "ref": bodyRef,
  45845. "data": data,
  45846. "useIsScrolling": useIsScrolling,
  45847. "itemKey": itemKey,
  45848. "columnCache": 0,
  45849. "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth,
  45850. "totalColumn": 1,
  45851. "totalRow": data.length,
  45852. "rowCache": cache,
  45853. "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight,
  45854. "width": width,
  45855. "height": unref(gridHeight),
  45856. "class": ns.e("body"),
  45857. "role": "rowgroup",
  45858. "scrollbarStartGap": scrollbarStartGap,
  45859. "scrollbarEndGap": scrollbarEndGap,
  45860. "scrollbarAlwaysOn": scrollbarAlwaysOn,
  45861. "onScroll": onScroll,
  45862. "onItemRendered": onItemRendered,
  45863. "perfMode": false
  45864. }, { default: (params) => {
  45865. const rowData = data[params.rowIndex];
  45866. return slots.row?.({
  45867. ...params,
  45868. columns,
  45869. rowData
  45870. });
  45871. } }), unref(hasHeader) && createVNode(TableV2Header, {
  45872. "ref": headerRef,
  45873. "class": ns.e("header-wrapper"),
  45874. "columns": columns,
  45875. "headerData": data,
  45876. "headerHeight": props.headerHeight,
  45877. "fixedHeaderData": fixedData,
  45878. "rowWidth": headerWidth,
  45879. "rowHeight": rowHeight,
  45880. "width": width,
  45881. "height": Math.min(_headerHeight + unref(fixedRowHeight), height)
  45882. }, {
  45883. dynamic: slots.header,
  45884. fixed: slots.row
  45885. })]);
  45886. };
  45887. }
  45888. });
  45889. //#endregion
  45890. //#region node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs
  45891. function _isSlot$5(s) {
  45892. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  45893. }
  45894. var MainTable = (props, { slots }) => {
  45895. const { mainTableRef, ...rest } = props;
  45896. return createVNode(TableGrid, mergeProps({ "ref": mainTableRef }, rest), _isSlot$5(slots) ? slots : { default: () => [slots] });
  45897. };
  45898. //#endregion
  45899. //#region node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs
  45900. function _isSlot$4(s) {
  45901. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  45902. }
  45903. var LeftTable = (props, { slots }) => {
  45904. if (!props.columns.length) return;
  45905. const { leftTableRef, ...rest } = props;
  45906. return createVNode(TableGrid, mergeProps({ "ref": leftTableRef }, rest), _isSlot$4(slots) ? slots : { default: () => [slots] });
  45907. };
  45908. //#endregion
  45909. //#region node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs
  45910. function _isSlot$3(s) {
  45911. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  45912. }
  45913. var RightTable = (props, { slots }) => {
  45914. if (!props.columns.length) return;
  45915. const { rightTableRef, ...rest } = props;
  45916. return createVNode(TableGrid, mergeProps({ "ref": rightTableRef }, rest), _isSlot$3(slots) ? slots : { default: () => [slots] });
  45917. };
  45918. //#endregion
  45919. //#region node_modules/element-plus/es/components/table-v2/src/components/row.mjs
  45920. var useTableRow = (props) => {
  45921. const { isScrolling } = inject(TableV2InjectionKey);
  45922. const measured = ref(false);
  45923. const rowRef = ref();
  45924. const measurable = computed(() => {
  45925. return isNumber(props.estimatedRowHeight) && props.rowIndex >= 0;
  45926. });
  45927. const doMeasure = (isInit = false) => {
  45928. const $rowRef = unref(rowRef);
  45929. if (!$rowRef) return;
  45930. const { columns, onRowHeightChange, rowKey, rowIndex, style } = props;
  45931. const { height } = $rowRef.getBoundingClientRect();
  45932. measured.value = true;
  45933. nextTick(() => {
  45934. if (isInit || height !== Number.parseInt(style.height)) {
  45935. const firstColumn = columns[0];
  45936. const isPlaceholder = firstColumn?.placeholderSign === placeholderSign;
  45937. onRowHeightChange?.({
  45938. rowKey,
  45939. height,
  45940. rowIndex
  45941. }, firstColumn && !isPlaceholder && firstColumn.fixed);
  45942. }
  45943. });
  45944. };
  45945. const eventHandlers = computed(() => {
  45946. const { rowData, rowIndex, rowKey, onRowHover } = props;
  45947. const handlers = props.rowEventHandlers || {};
  45948. const eventHandlers = {};
  45949. Object.entries(handlers).forEach(([eventName, handler]) => {
  45950. if (isFunction$1(handler)) eventHandlers[eventName] = (event) => {
  45951. handler({
  45952. event,
  45953. rowData,
  45954. rowIndex,
  45955. rowKey
  45956. });
  45957. };
  45958. });
  45959. if (onRowHover) [{
  45960. name: "onMouseleave",
  45961. hovered: false
  45962. }, {
  45963. name: "onMouseenter",
  45964. hovered: true
  45965. }].forEach(({ name, hovered }) => {
  45966. const existedHandler = eventHandlers[name];
  45967. eventHandlers[name] = (event) => {
  45968. onRowHover({
  45969. event,
  45970. hovered,
  45971. rowData,
  45972. rowIndex,
  45973. rowKey
  45974. });
  45975. existedHandler?.(event);
  45976. };
  45977. });
  45978. return eventHandlers;
  45979. });
  45980. const onExpand = (expanded) => {
  45981. const { onRowExpand, rowData, rowIndex, rowKey } = props;
  45982. onRowExpand?.({
  45983. expanded,
  45984. rowData,
  45985. rowIndex,
  45986. rowKey
  45987. });
  45988. };
  45989. onMounted(() => {
  45990. if (unref(measurable)) doMeasure(true);
  45991. });
  45992. return {
  45993. isScrolling,
  45994. measurable,
  45995. measured,
  45996. rowRef,
  45997. eventHandlers,
  45998. onExpand
  45999. };
  46000. };
  46001. var TableV2Row = /* @__PURE__ */ defineComponent({
  46002. name: "ElTableV2TableRow",
  46003. props: tableV2RowProps,
  46004. setup(props, { expose, slots, attrs }) {
  46005. const { eventHandlers, isScrolling, measurable, measured, rowRef, onExpand } = useTableRow(props);
  46006. expose({ onExpand });
  46007. return () => {
  46008. const { columns, columnsStyles, expandColumnKey, depth, rowData, rowIndex, style } = props;
  46009. let ColumnCells = columns.map((column, columnIndex) => {
  46010. const expandable = isArray$1(rowData.children) && rowData.children.length > 0 && column.key === expandColumnKey;
  46011. return slots.cell({
  46012. column,
  46013. columns,
  46014. columnIndex,
  46015. depth,
  46016. style: columnsStyles[column.key],
  46017. rowData,
  46018. rowIndex,
  46019. isScrolling: unref(isScrolling),
  46020. expandIconProps: expandable ? {
  46021. rowData,
  46022. rowIndex,
  46023. onExpand
  46024. } : void 0
  46025. });
  46026. });
  46027. if (slots.row) ColumnCells = slots.row({
  46028. cells: ColumnCells.map((node) => {
  46029. if (isArray$1(node) && node.length === 1) return node[0];
  46030. return node;
  46031. }),
  46032. style,
  46033. columns,
  46034. depth,
  46035. rowData,
  46036. rowIndex,
  46037. isScrolling: unref(isScrolling)
  46038. });
  46039. if (unref(measurable)) {
  46040. const { height, ...exceptHeightStyle } = style || {};
  46041. const _measured = unref(measured);
  46042. return createVNode("div", mergeProps({
  46043. "ref": rowRef,
  46044. "class": props.class,
  46045. "style": _measured ? style : exceptHeightStyle,
  46046. "role": "row"
  46047. }, attrs, unref(eventHandlers)), [ColumnCells]);
  46048. }
  46049. return createVNode("div", mergeProps(attrs, {
  46050. "ref": rowRef,
  46051. "class": props.class,
  46052. "style": style,
  46053. "role": "row"
  46054. }, unref(eventHandlers)), [ColumnCells]);
  46055. };
  46056. }
  46057. });
  46058. //#endregion
  46059. //#region node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs
  46060. function _isSlot$2(s) {
  46061. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  46062. }
  46063. var RowRenderer = (props, { slots }) => {
  46064. const { columns, columnsStyles, depthMap, expandColumnKey, expandedRowKeys, estimatedRowHeight, hasFixedColumns, rowData, rowIndex, style, isScrolling, rowProps, rowClass, rowKey, rowEventHandlers, ns, onRowHovered, onRowExpanded } = props;
  46065. const rowKls = tryCall(rowClass, {
  46066. columns,
  46067. rowData,
  46068. rowIndex
  46069. }, "");
  46070. const additionalProps = tryCall(rowProps, {
  46071. columns,
  46072. rowData,
  46073. rowIndex
  46074. });
  46075. const _rowKey = rowData[rowKey];
  46076. const depth = depthMap[_rowKey] || 0;
  46077. const canExpand = Boolean(expandColumnKey);
  46078. const isFixedRow = rowIndex < 0;
  46079. const kls = [
  46080. ns.e("row"),
  46081. rowKls,
  46082. ns.is("expanded", canExpand && expandedRowKeys.includes(_rowKey)),
  46083. ns.is("fixed", !depth && isFixedRow),
  46084. ns.is("customized", Boolean(slots.row)),
  46085. { [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0 }
  46086. ];
  46087. const onRowHover = hasFixedColumns ? onRowHovered : void 0;
  46088. const _rowProps = {
  46089. ...additionalProps,
  46090. columns,
  46091. columnsStyles,
  46092. class: kls,
  46093. depth,
  46094. expandColumnKey,
  46095. estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight,
  46096. isScrolling,
  46097. rowIndex,
  46098. rowData,
  46099. rowKey: _rowKey,
  46100. rowEventHandlers,
  46101. style
  46102. };
  46103. const handlerMouseEnter = (e) => {
  46104. onRowHover?.({
  46105. hovered: true,
  46106. rowKey: _rowKey,
  46107. event: e,
  46108. rowData,
  46109. rowIndex
  46110. });
  46111. };
  46112. const handlerMouseLeave = (e) => {
  46113. onRowHover?.({
  46114. hovered: false,
  46115. rowKey: _rowKey,
  46116. event: e,
  46117. rowData,
  46118. rowIndex
  46119. });
  46120. };
  46121. return createVNode(TableV2Row, mergeProps(_rowProps, {
  46122. "onRowExpand": onRowExpanded,
  46123. "onMouseenter": handlerMouseEnter,
  46124. "onMouseleave": handlerMouseLeave,
  46125. "rowkey": _rowKey
  46126. }), _isSlot$2(slots) ? slots : { default: () => [slots] });
  46127. };
  46128. //#endregion
  46129. //#region node_modules/element-plus/es/components/table-v2/src/components/cell.mjs
  46130. var TableV2Cell = (props, { slots }) => {
  46131. const { cellData, style } = props;
  46132. const displayText = cellData?.toString?.() || "";
  46133. const defaultSlot = renderSlot(slots, "default", props, () => [displayText]);
  46134. return createVNode("div", {
  46135. "class": props.class,
  46136. "title": displayText,
  46137. "style": style
  46138. }, [defaultSlot]);
  46139. };
  46140. TableV2Cell.displayName = "ElTableV2Cell";
  46141. TableV2Cell.inheritAttrs = false;
  46142. //#endregion
  46143. //#region node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs
  46144. var ExpandIcon = (props) => {
  46145. const { expanded, expandable, onExpand, style, size, ariaLabel } = props;
  46146. return createVNode("button", mergeProps({
  46147. onClick: expandable ? () => onExpand(!expanded) : void 0,
  46148. ariaLabel,
  46149. ariaExpanded: expanded,
  46150. class: props.class
  46151. }, { "type": "button" }), [createVNode(ElIcon, {
  46152. "size": size,
  46153. "style": style
  46154. }, { default: () => [createVNode(arrow_right_default, null, null)] })]);
  46155. };
  46156. ExpandIcon.inheritAttrs = false;
  46157. //#endregion
  46158. //#region node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs
  46159. var CellRenderer = ({ columns, column, columnIndex, depth, expandIconProps, isScrolling, rowData, rowIndex, style, expandedRowKeys, ns, t, cellProps: _cellProps, expandColumnKey, indentSize, iconSize, rowKey }, { slots }) => {
  46160. const cellStyle = enforceUnit(style);
  46161. if (column.placeholderSign === placeholderSign) return createVNode("div", {
  46162. "class": ns.em("row-cell", "placeholder"),
  46163. "style": cellStyle
  46164. }, null);
  46165. const { cellRenderer, dataKey, dataGetter } = column;
  46166. const cellData = isFunction$1(dataGetter) ? dataGetter({
  46167. columns,
  46168. column,
  46169. columnIndex,
  46170. rowData,
  46171. rowIndex
  46172. }) : get(rowData, dataKey ?? "");
  46173. const extraCellProps = tryCall(_cellProps, {
  46174. cellData,
  46175. columns,
  46176. column,
  46177. columnIndex,
  46178. rowIndex,
  46179. rowData
  46180. });
  46181. const cellProps = {
  46182. class: ns.e("cell-text"),
  46183. columns,
  46184. column,
  46185. columnIndex,
  46186. cellData,
  46187. isScrolling,
  46188. rowData,
  46189. rowIndex
  46190. };
  46191. const columnCellRenderer = componentToSlot(cellRenderer);
  46192. const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(TableV2Cell, cellProps, null)]);
  46193. const kls = [
  46194. ns.e("row-cell"),
  46195. column.class,
  46196. column.align === Alignment.CENTER && ns.is("align-center"),
  46197. column.align === Alignment.RIGHT && ns.is("align-right")
  46198. ];
  46199. const expandable = rowIndex >= 0 && expandColumnKey && column.key === expandColumnKey;
  46200. const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey]);
  46201. let IconOrPlaceholder;
  46202. const iconStyle = `margin-inline-start: ${depth * indentSize}px;`;
  46203. if (expandable) if (isObject$2(expandIconProps)) IconOrPlaceholder = createVNode(ExpandIcon, mergeProps(expandIconProps, {
  46204. "class": [ns.e("expand-icon"), ns.is("expanded", expanded)],
  46205. "size": iconSize,
  46206. "expanded": expanded,
  46207. "ariaLabel": t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  46208. "style": iconStyle,
  46209. "expandable": true
  46210. }), null);
  46211. else IconOrPlaceholder = createVNode("div", { "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ") }, null);
  46212. return createVNode("div", mergeProps({
  46213. "class": kls,
  46214. "style": cellStyle
  46215. }, extraCellProps, { "role": "cell" }), [IconOrPlaceholder, Cell]);
  46216. };
  46217. CellRenderer.inheritAttrs = false;
  46218. //#endregion
  46219. //#region node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs
  46220. var TableV2HeaderRow = /* @__PURE__ */ defineComponent({
  46221. name: "ElTableV2HeaderRow",
  46222. props: buildProps({
  46223. class: String,
  46224. columns,
  46225. columnsStyles: {
  46226. type: definePropType(Object),
  46227. required: true
  46228. },
  46229. headerIndex: Number,
  46230. style: { type: definePropType(Object) }
  46231. }),
  46232. setup(props, { slots }) {
  46233. return () => {
  46234. const { columns, columnsStyles, headerIndex, style } = props;
  46235. let Cells = columns.map((column, columnIndex) => {
  46236. return slots.cell({
  46237. columns,
  46238. column,
  46239. columnIndex,
  46240. headerIndex,
  46241. style: columnsStyles[column.key]
  46242. });
  46243. });
  46244. if (slots.header) Cells = slots.header({
  46245. cells: Cells.map((node) => {
  46246. if (isArray$1(node) && node.length === 1) return node[0];
  46247. return node;
  46248. }),
  46249. columns,
  46250. headerIndex
  46251. });
  46252. return createVNode("div", {
  46253. "class": props.class,
  46254. "style": style,
  46255. "role": "row"
  46256. }, [Cells]);
  46257. };
  46258. }
  46259. });
  46260. //#endregion
  46261. //#region node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs
  46262. function _isSlot$1(s) {
  46263. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  46264. }
  46265. var HeaderRenderer = ({ columns, columnsStyles, headerIndex, style, headerClass, headerProps, ns }, { slots }) => {
  46266. const param = {
  46267. columns,
  46268. headerIndex
  46269. };
  46270. const kls = [
  46271. ns.e("header-row"),
  46272. tryCall(headerClass, param, ""),
  46273. ns.is("customized", Boolean(slots.header))
  46274. ];
  46275. return createVNode(TableV2HeaderRow, {
  46276. ...tryCall(headerProps, param),
  46277. columnsStyles,
  46278. class: kls,
  46279. columns,
  46280. headerIndex,
  46281. style
  46282. }, _isSlot$1(slots) ? slots : { default: () => [slots] });
  46283. };
  46284. //#endregion
  46285. //#region node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs
  46286. var HeaderCell = (props, { slots }) => renderSlot(slots, "default", props, () => [createVNode("div", {
  46287. "class": props.class,
  46288. "title": props.column?.title
  46289. }, [props.column?.title])]);
  46290. HeaderCell.displayName = "ElTableV2HeaderCell";
  46291. HeaderCell.inheritAttrs = false;
  46292. //#endregion
  46293. //#region node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs
  46294. var SortIcon = (props) => {
  46295. const { sortOrder } = props;
  46296. return createVNode("button", {
  46297. "type": "button",
  46298. "aria-label": props.ariaLabel,
  46299. "class": props.class
  46300. }, [createVNode(ElIcon, { "size": 14 }, { default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] })]);
  46301. };
  46302. //#endregion
  46303. //#region node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs
  46304. var HeaderCellRenderer = (props, { slots }) => {
  46305. const { column, ns, t, style, onColumnSorted } = props;
  46306. const cellStyle = enforceUnit(style);
  46307. if (column.placeholderSign === placeholderSign) return createVNode("div", {
  46308. "class": ns.em("header-row-cell", "placeholder"),
  46309. "style": cellStyle
  46310. }, null);
  46311. const { headerCellRenderer, headerClass, sortable } = column;
  46312. /**
  46313. * render Cell children
  46314. */
  46315. const cellProps = {
  46316. ...props,
  46317. class: ns.e("header-cell-text")
  46318. };
  46319. const columnCellRenderer = componentToSlot(headerCellRenderer);
  46320. const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(HeaderCell, cellProps, null)]);
  46321. /**
  46322. * Render cell container and sort indicator
  46323. */
  46324. const { sortBy, sortState, headerCellProps } = props;
  46325. let sorting, sortOrder, ariaSort;
  46326. if (sortState) {
  46327. const order = sortState[column.key];
  46328. sorting = Boolean(oppositeOrderMap[order]);
  46329. sortOrder = sorting ? order : SortOrder.ASC;
  46330. } else {
  46331. sorting = column.key === sortBy.key;
  46332. sortOrder = sorting ? sortBy.order : SortOrder.ASC;
  46333. }
  46334. if (sortOrder === SortOrder.ASC) ariaSort = "ascending";
  46335. else if (sortOrder === SortOrder.DESC) ariaSort = "descending";
  46336. else ariaSort = void 0;
  46337. const cellKls = [
  46338. ns.e("header-cell"),
  46339. tryCall(headerClass, props, ""),
  46340. column.align === Alignment.CENTER && ns.is("align-center"),
  46341. column.align === Alignment.RIGHT && ns.is("align-right"),
  46342. sortable && ns.is("sortable")
  46343. ];
  46344. return createVNode("div", mergeProps({
  46345. ...tryCall(headerCellProps, props),
  46346. onClick: column.sortable ? onColumnSorted : void 0,
  46347. ariaSort: sortable ? ariaSort : void 0,
  46348. class: cellKls,
  46349. style: cellStyle,
  46350. ["data-key"]: column.key
  46351. }, { "role": "columnheader" }), [Cell, sortable && createVNode(SortIcon, {
  46352. "class": [ns.e("sort-icon"), sorting && ns.is("sorting")],
  46353. "sortOrder": sortOrder,
  46354. "ariaLabel": t("el.table.sortLabel", { column: column.title || "" })
  46355. }, null)]);
  46356. };
  46357. //#endregion
  46358. //#region node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs
  46359. var Footer$1 = (props, { slots }) => {
  46360. return createVNode("div", {
  46361. "class": props.class,
  46362. "style": props.style
  46363. }, [slots.default?.()]);
  46364. };
  46365. Footer$1.displayName = "ElTableV2Footer";
  46366. //#endregion
  46367. //#region node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs
  46368. var Footer = (props, { slots }) => {
  46369. const defaultSlot = renderSlot(slots, "default", {}, () => [createVNode(ElEmpty, null, null)]);
  46370. return createVNode("div", {
  46371. "class": props.class,
  46372. "style": props.style
  46373. }, [defaultSlot]);
  46374. };
  46375. Footer.displayName = "ElTableV2Empty";
  46376. //#endregion
  46377. //#region node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs
  46378. var Overlay = (props, { slots }) => {
  46379. return createVNode("div", {
  46380. "class": props.class,
  46381. "style": props.style
  46382. }, [slots.default?.()]);
  46383. };
  46384. Overlay.displayName = "ElTableV2Overlay";
  46385. //#endregion
  46386. //#region node_modules/element-plus/es/components/table-v2/src/table-v2.mjs
  46387. function _isSlot(s) {
  46388. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  46389. }
  46390. var TableV2 = /* @__PURE__ */ defineComponent({
  46391. name: "ElTableV2",
  46392. props: tableV2Props,
  46393. setup(props, { slots, expose }) {
  46394. const ns = useNamespace("table-v2");
  46395. const { t } = useLocale();
  46396. const { columnsStyles, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, data, depthMap, expandedRowKeys, hasFixedColumns, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, bodyWidth, emptyStyle, rootStyle, footerHeight, showEmpty, scrollTo, scrollToLeft, scrollToTop, scrollToRow, getRowHeight, onColumnSorted, onRowHeightChange, onRowHovered, onRowExpanded, onRowsRendered, onScroll, onVerticalScroll } = useTable(props);
  46397. expose({
  46398. scrollTo,
  46399. scrollToLeft,
  46400. scrollToTop,
  46401. scrollToRow
  46402. });
  46403. provide(TableV2InjectionKey, {
  46404. ns,
  46405. isResetting,
  46406. isScrolling
  46407. });
  46408. return () => {
  46409. const { cache, cellProps, estimatedRowHeight, expandColumnKey, fixedData, headerHeight, headerClass, headerProps, headerCellProps, sortBy, sortState, rowHeight, rowClass, rowEventHandlers, rowKey, rowProps, scrollbarAlwaysOn, indentSize, iconSize, useIsScrolling, vScrollbarSize, width } = props;
  46410. const _data = unref(data);
  46411. const mainTableProps = {
  46412. cache,
  46413. class: ns.e("main"),
  46414. columns: unref(mainColumns),
  46415. data: _data,
  46416. fixedData,
  46417. estimatedRowHeight,
  46418. bodyWidth: unref(bodyWidth),
  46419. headerHeight,
  46420. headerWidth: unref(bodyWidth),
  46421. height: unref(mainTableHeight),
  46422. mainTableRef,
  46423. rowKey,
  46424. rowHeight,
  46425. scrollbarAlwaysOn,
  46426. scrollbarStartGap: 2,
  46427. scrollbarEndGap: vScrollbarSize,
  46428. useIsScrolling,
  46429. width,
  46430. getRowHeight,
  46431. onRowsRendered,
  46432. onScroll
  46433. };
  46434. const leftColumnsWidth = unref(leftTableWidth);
  46435. const _fixedTableHeight = unref(fixedTableHeight);
  46436. const leftTableProps = {
  46437. cache,
  46438. class: ns.e("left"),
  46439. columns: unref(fixedColumnsOnLeft),
  46440. data: _data,
  46441. fixedData,
  46442. estimatedRowHeight,
  46443. leftTableRef,
  46444. rowHeight,
  46445. bodyWidth: leftColumnsWidth,
  46446. headerWidth: leftColumnsWidth,
  46447. headerHeight,
  46448. height: _fixedTableHeight,
  46449. rowKey,
  46450. scrollbarAlwaysOn,
  46451. scrollbarStartGap: 2,
  46452. scrollbarEndGap: vScrollbarSize,
  46453. useIsScrolling,
  46454. width: leftColumnsWidth,
  46455. getRowHeight,
  46456. onScroll: onVerticalScroll
  46457. };
  46458. const rightColumnsWidth = unref(rightTableWidth);
  46459. const rightTableProps = {
  46460. cache,
  46461. class: ns.e("right"),
  46462. columns: unref(fixedColumnsOnRight),
  46463. data: _data,
  46464. fixedData,
  46465. estimatedRowHeight,
  46466. rightTableRef,
  46467. rowHeight,
  46468. bodyWidth: rightColumnsWidth,
  46469. headerWidth: rightColumnsWidth,
  46470. headerHeight,
  46471. height: _fixedTableHeight,
  46472. rowKey,
  46473. scrollbarAlwaysOn,
  46474. scrollbarStartGap: 2,
  46475. scrollbarEndGap: vScrollbarSize,
  46476. width: rightColumnsWidth,
  46477. style: `${ns.cssVarName("table-scrollbar-size")}: ${vScrollbarSize}px`,
  46478. useIsScrolling,
  46479. getRowHeight,
  46480. onScroll: onVerticalScroll
  46481. };
  46482. const _columnsStyles = unref(columnsStyles);
  46483. const tableRowProps = {
  46484. ns,
  46485. depthMap: unref(depthMap),
  46486. columnsStyles: _columnsStyles,
  46487. expandColumnKey,
  46488. expandedRowKeys: unref(expandedRowKeys),
  46489. estimatedRowHeight,
  46490. hasFixedColumns: unref(hasFixedColumns),
  46491. rowProps,
  46492. rowClass,
  46493. rowKey,
  46494. rowEventHandlers,
  46495. onRowHovered,
  46496. onRowExpanded,
  46497. onRowHeightChange
  46498. };
  46499. const tableCellProps = {
  46500. cellProps,
  46501. expandColumnKey,
  46502. indentSize,
  46503. iconSize,
  46504. rowKey,
  46505. expandedRowKeys: unref(expandedRowKeys),
  46506. ns,
  46507. t
  46508. };
  46509. const tableHeaderProps = {
  46510. ns,
  46511. headerClass,
  46512. headerProps,
  46513. columnsStyles: _columnsStyles
  46514. };
  46515. const tableHeaderCellProps = {
  46516. ns,
  46517. t,
  46518. sortBy,
  46519. sortState,
  46520. headerCellProps,
  46521. onColumnSorted
  46522. };
  46523. const tableSlots = {
  46524. row: (props) => createVNode(RowRenderer, mergeProps(props, tableRowProps), {
  46525. row: slots.row,
  46526. cell: (props) => {
  46527. let _slot;
  46528. return slots.cell ? createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot = slots.cell(props)) ? _slot : { default: () => [_slot] }) : createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), null);
  46529. }
  46530. }),
  46531. header: (props) => createVNode(HeaderRenderer, mergeProps(props, tableHeaderProps), {
  46532. header: slots.header,
  46533. cell: (props) => {
  46534. let _slot2;
  46535. return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot2 = slots["header-cell"](props)) ? _slot2 : { default: () => [_slot2] }) : createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), null);
  46536. }
  46537. })
  46538. };
  46539. const rootKls = [
  46540. props.class,
  46541. ns.b(),
  46542. ns.e("root"),
  46543. ns.is("dynamic", unref(isDynamic))
  46544. ];
  46545. const footerProps = {
  46546. class: ns.e("footer"),
  46547. style: unref(footerHeight)
  46548. };
  46549. return createVNode("div", {
  46550. "class": rootKls,
  46551. "style": unref(rootStyle)
  46552. }, [
  46553. createVNode(MainTable, mainTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  46554. createVNode(LeftTable, leftTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  46555. createVNode(RightTable, rightTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  46556. slots.footer && createVNode(Footer$1, footerProps, { default: slots.footer }),
  46557. unref(showEmpty) && createVNode(Footer, {
  46558. "class": ns.e("empty"),
  46559. "style": unref(emptyStyle)
  46560. }, { default: slots.empty }),
  46561. slots.overlay && createVNode(Overlay, { "class": ns.e("overlay") }, { default: slots.overlay })
  46562. ]);
  46563. };
  46564. }
  46565. });
  46566. //#endregion
  46567. //#region node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs
  46568. var autoResizerProps = buildProps({
  46569. disableWidth: Boolean,
  46570. disableHeight: Boolean,
  46571. onResize: { type: definePropType(Function) }
  46572. });
  46573. //#endregion
  46574. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs
  46575. var useAutoResize = (props) => {
  46576. const sizer = ref();
  46577. const width$ = ref(0);
  46578. const height$ = ref(0);
  46579. let resizerStopper;
  46580. onMounted(() => {
  46581. resizerStopper = useResizeObserver(sizer, ([entry]) => {
  46582. const { width, height } = entry.contentRect;
  46583. const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target);
  46584. const left = Number.parseInt(paddingLeft) || 0;
  46585. const right = Number.parseInt(paddingRight) || 0;
  46586. const top = Number.parseInt(paddingTop) || 0;
  46587. const bottom = Number.parseInt(paddingBottom) || 0;
  46588. width$.value = width - left - right;
  46589. height$.value = height - top - bottom;
  46590. }).stop;
  46591. });
  46592. onBeforeUnmount(() => {
  46593. resizerStopper?.();
  46594. });
  46595. watch([width$, height$], ([width, height]) => {
  46596. props.onResize?.({
  46597. width,
  46598. height
  46599. });
  46600. });
  46601. return {
  46602. sizer,
  46603. width: width$,
  46604. height: height$
  46605. };
  46606. };
  46607. //#endregion
  46608. //#region node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs
  46609. var AutoResizer = /* @__PURE__ */ defineComponent({
  46610. name: "ElAutoResizer",
  46611. props: autoResizerProps,
  46612. setup(props, { slots }) {
  46613. const ns = useNamespace("auto-resizer");
  46614. const { height, width, sizer } = useAutoResize(props);
  46615. const style = {
  46616. width: "100%",
  46617. height: "100%"
  46618. };
  46619. return () => {
  46620. return createVNode("div", {
  46621. "ref": sizer,
  46622. "class": ns.b(),
  46623. "style": style
  46624. }, [slots.default?.({
  46625. height: height.value,
  46626. width: width.value
  46627. })]);
  46628. };
  46629. }
  46630. });
  46631. //#endregion
  46632. //#region node_modules/element-plus/es/components/table-v2/index.mjs
  46633. var ElTableV2 = withInstall(TableV2);
  46634. var ElAutoResizer = withInstall(AutoResizer);
  46635. //#endregion
  46636. //#region node_modules/element-plus/es/components/tabs/src/constants.mjs
  46637. var tabsRootContextKey = Symbol("tabsRootContextKey");
  46638. //#endregion
  46639. //#region node_modules/element-plus/es/components/tabs/src/tab-bar.mjs
  46640. /**
  46641. * @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
  46642. */
  46643. var tabBarProps = buildProps({
  46644. tabs: {
  46645. type: definePropType(Array),
  46646. default: () => mutable([])
  46647. },
  46648. tabRefs: {
  46649. type: definePropType(Object),
  46650. default: () => mutable({})
  46651. }
  46652. });
  46653. //#endregion
  46654. //#region node_modules/element-plus/es/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.mjs
  46655. var COMPONENT_NAME$4 = "ElTabBar";
  46656. //#endregion
  46657. //#region node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs
  46658. var tab_bar_default = /* @__PURE__ */ defineComponent({
  46659. name: COMPONENT_NAME$4,
  46660. __name: "tab-bar",
  46661. props: tabBarProps,
  46662. setup(__props, { expose: __expose }) {
  46663. const props = __props;
  46664. const rootTabs = inject(tabsRootContextKey);
  46665. if (!rootTabs) throwError(COMPONENT_NAME$4, "<el-tabs><el-tab-bar /></el-tabs>");
  46666. const ns = useNamespace("tabs");
  46667. const barRef = ref();
  46668. const barStyle = ref();
  46669. /**
  46670. * when defaultValue is not set, the bar is always shown.
  46671. *
  46672. * when defaultValue is set, the bar will be hidden until style is calculated
  46673. * to avoid the bar showing in the wrong position on initial render.
  46674. */
  46675. const renderActiveBar = computed(() => isUndefined(rootTabs.props.defaultValue) || Boolean(barStyle.value?.transform));
  46676. const getBarStyle = () => {
  46677. let offset = 0;
  46678. let tabSize = 0;
  46679. const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
  46680. const sizeDir = sizeName === "width" ? "x" : "y";
  46681. const position = sizeDir === "x" ? "left" : "top";
  46682. props.tabs.every((tab) => {
  46683. if (isUndefined(tab.paneName)) return false;
  46684. const $el = props.tabRefs[tab.paneName];
  46685. if (!$el) return false;
  46686. if (!tab.active) return true;
  46687. offset = $el[`offset${capitalize(position)}`];
  46688. tabSize = $el[`client${capitalize(sizeName)}`];
  46689. const tabStyles = window.getComputedStyle($el);
  46690. if (sizeName === "width") {
  46691. tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
  46692. offset += Number.parseFloat(tabStyles.paddingLeft);
  46693. }
  46694. return false;
  46695. });
  46696. return {
  46697. [sizeName]: `${tabSize}px`,
  46698. transform: `translate${capitalize(sizeDir)}(${offset}px)`
  46699. };
  46700. };
  46701. const update = () => barStyle.value = getBarStyle();
  46702. const tabObservers = [];
  46703. const observerTabs = () => {
  46704. tabObservers.forEach((observer) => observer.stop());
  46705. tabObservers.length = 0;
  46706. Object.values(props.tabRefs).forEach((tab) => {
  46707. tabObservers.push(useResizeObserver(tab, update));
  46708. });
  46709. };
  46710. watch(() => props.tabs, async () => {
  46711. await nextTick();
  46712. update();
  46713. observerTabs();
  46714. }, { immediate: true });
  46715. const barObserver = useResizeObserver(barRef, () => update());
  46716. onBeforeUnmount(() => {
  46717. tabObservers.forEach((observer) => observer.stop());
  46718. tabObservers.length = 0;
  46719. barObserver.stop();
  46720. });
  46721. __expose({
  46722. ref: barRef,
  46723. update
  46724. });
  46725. return (_ctx, _cache) => {
  46726. return renderActiveBar.value ? (openBlock(), createElementBlock("div", {
  46727. key: 0,
  46728. ref_key: "barRef",
  46729. ref: barRef,
  46730. class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
  46731. style: normalizeStyle(barStyle.value)
  46732. }, null, 6)) : createCommentVNode("v-if", true);
  46733. };
  46734. }
  46735. });
  46736. //#endregion
  46737. //#region node_modules/element-plus/es/components/tabs/src/tab-nav.mjs
  46738. var tabNavProps = buildProps({
  46739. panes: {
  46740. type: definePropType(Array),
  46741. default: () => mutable([])
  46742. },
  46743. currentName: {
  46744. type: [String, Number],
  46745. default: ""
  46746. },
  46747. editable: Boolean,
  46748. type: {
  46749. type: String,
  46750. values: [
  46751. "card",
  46752. "border-card",
  46753. ""
  46754. ],
  46755. default: ""
  46756. },
  46757. stretch: Boolean,
  46758. tabindex: {
  46759. type: [String, Number],
  46760. default: void 0
  46761. }
  46762. });
  46763. var tabNavEmits = {
  46764. tabClick: (tab, tabName, ev) => ev instanceof Event,
  46765. tabRemove: (tab, ev) => ev instanceof Event
  46766. };
  46767. var COMPONENT_NAME$3 = "ElTabNav";
  46768. var TabNav = /* @__PURE__ */ defineComponent({
  46769. name: COMPONENT_NAME$3,
  46770. props: tabNavProps,
  46771. emits: tabNavEmits,
  46772. setup(props, { expose, emit }) {
  46773. const rootTabs = inject(tabsRootContextKey);
  46774. if (!rootTabs) throwError(COMPONENT_NAME$3, `<el-tabs><tab-nav /></el-tabs>`);
  46775. const ns = useNamespace("tabs");
  46776. const visibility = useDocumentVisibility();
  46777. const focused = useWindowFocus();
  46778. const navScroll$ = ref();
  46779. const nav$ = ref();
  46780. const el$ = ref();
  46781. const tabRefsMap = ref({});
  46782. const tabBarRef = ref();
  46783. const scrollable = ref(false);
  46784. const navOffset = ref(0);
  46785. const isFocus = ref(false);
  46786. const focusable = ref(true);
  46787. const tracker = shallowRef();
  46788. const isHorizontal = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition));
  46789. const sizeName = computed(() => isHorizontal.value ? "width" : "height");
  46790. const navStyle = computed(() => {
  46791. return { transform: `translate${sizeName.value === "width" ? "X" : "Y"}(-${navOffset.value}px)` };
  46792. });
  46793. const { width: navContainerWidth, height: navContainerHeight } = useElementSize(navScroll$);
  46794. const { width: navWidth, height: navHeight } = useElementSize(nav$, {
  46795. width: 0,
  46796. height: 0
  46797. }, { box: "border-box" });
  46798. const navContainerSize = computed(() => isHorizontal.value ? navContainerWidth.value : navContainerHeight.value);
  46799. const navSize = computed(() => isHorizontal.value ? navWidth.value : navHeight.value);
  46800. const { onWheel } = useWheel({
  46801. atStartEdge: computed(() => navOffset.value <= 0),
  46802. atEndEdge: computed(() => navSize.value - navOffset.value <= navContainerSize.value),
  46803. layout: computed(() => isHorizontal.value ? "horizontal" : "vertical")
  46804. }, (offset) => {
  46805. navOffset.value = clamp$2(navOffset.value + offset, 0, navSize.value - navContainerSize.value);
  46806. });
  46807. const scrollPrev = () => {
  46808. if (!navScroll$.value) return;
  46809. const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
  46810. const currentOffset = navOffset.value;
  46811. if (!currentOffset) return;
  46812. navOffset.value = currentOffset > containerSize ? currentOffset - containerSize : 0;
  46813. };
  46814. const scrollNext = () => {
  46815. if (!navScroll$.value || !nav$.value) return;
  46816. const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];
  46817. const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
  46818. const currentOffset = navOffset.value;
  46819. if (navSize - currentOffset <= containerSize) return;
  46820. navOffset.value = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
  46821. };
  46822. const scrollToActiveTab = async () => {
  46823. const nav = nav$.value;
  46824. if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return;
  46825. await nextTick();
  46826. const activeTab = tabRefsMap.value[props.currentName];
  46827. if (!activeTab) return;
  46828. const navScroll = navScroll$.value;
  46829. const activeTabBounding = activeTab.getBoundingClientRect();
  46830. const navScrollBounding = navScroll.getBoundingClientRect();
  46831. const maxOffset = isHorizontal.value ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
  46832. const currentOffset = navOffset.value;
  46833. let newOffset = currentOffset;
  46834. if (isHorizontal.value) {
  46835. if (activeTabBounding.left < navScrollBounding.left) newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
  46836. if (activeTabBounding.right > navScrollBounding.right) newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
  46837. } else {
  46838. if (activeTabBounding.top < navScrollBounding.top) newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
  46839. if (activeTabBounding.bottom > navScrollBounding.bottom) newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
  46840. }
  46841. newOffset = Math.max(newOffset, 0);
  46842. navOffset.value = Math.min(newOffset, maxOffset);
  46843. };
  46844. const update = () => {
  46845. if (!nav$.value || !navScroll$.value) return;
  46846. props.stretch && tabBarRef.value?.update();
  46847. const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];
  46848. const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
  46849. const currentOffset = navOffset.value;
  46850. if (containerSize < navSize) {
  46851. scrollable.value = scrollable.value || {};
  46852. scrollable.value.prev = currentOffset;
  46853. scrollable.value.next = currentOffset + containerSize < navSize;
  46854. if (navSize - currentOffset < containerSize) navOffset.value = navSize - containerSize;
  46855. } else {
  46856. scrollable.value = false;
  46857. if (currentOffset > 0) navOffset.value = 0;
  46858. }
  46859. };
  46860. const changeTab = (event) => {
  46861. const code = getEventCode(event);
  46862. let step = 0;
  46863. switch (code) {
  46864. case EVENT_CODE.left:
  46865. case EVENT_CODE.up:
  46866. step = -1;
  46867. break;
  46868. case EVENT_CODE.right:
  46869. case EVENT_CODE.down:
  46870. step = 1;
  46871. break;
  46872. default: return;
  46873. }
  46874. const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
  46875. let nextIndex = tabList.indexOf(event.target) + step;
  46876. if (nextIndex < 0) nextIndex = tabList.length - 1;
  46877. else if (nextIndex >= tabList.length) nextIndex = 0;
  46878. tabList[nextIndex].focus({ preventScroll: true });
  46879. tabList[nextIndex].click();
  46880. setFocus();
  46881. };
  46882. const setFocus = () => {
  46883. if (focusable.value) isFocus.value = true;
  46884. };
  46885. const removeFocus = () => isFocus.value = false;
  46886. const setRefs = (el, key) => {
  46887. tabRefsMap.value[key] = el;
  46888. };
  46889. const focusActiveTab = async () => {
  46890. await nextTick();
  46891. tabRefsMap.value[props.currentName]?.focus({ preventScroll: true });
  46892. };
  46893. watch(visibility, (visibility) => {
  46894. if (visibility === "hidden") focusable.value = false;
  46895. else if (visibility === "visible") setTimeout(() => focusable.value = true, 50);
  46896. });
  46897. watch(focused, (focused) => {
  46898. if (focused) setTimeout(() => focusable.value = true, 50);
  46899. else focusable.value = false;
  46900. });
  46901. useResizeObserver(el$, () => {
  46902. rAF(update);
  46903. });
  46904. onMounted(() => setTimeout(() => scrollToActiveTab(), 0));
  46905. onUpdated(() => update());
  46906. expose({
  46907. scrollToActiveTab,
  46908. removeFocus,
  46909. focusActiveTab,
  46910. tabListRef: nav$,
  46911. tabBarRef,
  46912. scheduleRender: () => triggerRef(tracker)
  46913. });
  46914. return () => {
  46915. const scrollBtn = scrollable.value ? [createVNode("span", {
  46916. "class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)],
  46917. "onClick": scrollPrev
  46918. }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_left_default, null, null)] })]), createVNode("span", {
  46919. "class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)],
  46920. "onClick": scrollNext
  46921. }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_right_default, null, null)] })])] : null;
  46922. const tabs = props.panes.map((pane, index) => {
  46923. const uid = pane.uid;
  46924. const disabled = pane.props.disabled;
  46925. const tabName = pane.props.name ?? pane.index ?? `${index}`;
  46926. const closable = !disabled && (pane.isClosable || pane.props.closable !== false && props.editable);
  46927. pane.index = `${index}`;
  46928. const btnClose = closable ? createVNode(ElIcon, {
  46929. "class": "is-icon-close",
  46930. "onClick": (ev) => emit("tabRemove", pane, ev)
  46931. }, { default: () => [createVNode(close_default, null, null)] }) : null;
  46932. const tabLabelContent = pane.slots.label?.() || pane.props.label;
  46933. const tabindex = !disabled && pane.active ? props.tabindex ?? rootTabs.props.tabindex : -1;
  46934. return createVNode("div", {
  46935. "ref": (el) => setRefs(el, tabName),
  46936. "class": [
  46937. ns.e("item"),
  46938. ns.is(rootTabs.props.tabPosition),
  46939. ns.is("active", pane.active),
  46940. ns.is("disabled", disabled),
  46941. ns.is("closable", closable),
  46942. ns.is("focus", isFocus.value)
  46943. ],
  46944. "id": `tab-${tabName}`,
  46945. "key": `tab-${uid}`,
  46946. "aria-controls": `pane-${tabName}`,
  46947. "role": "tab",
  46948. "aria-selected": pane.active,
  46949. "tabindex": tabindex,
  46950. "onFocus": () => setFocus(),
  46951. "onBlur": () => removeFocus(),
  46952. "onClick": (ev) => {
  46953. removeFocus();
  46954. emit("tabClick", pane, tabName, ev);
  46955. },
  46956. "onKeydown": (ev) => {
  46957. const code = getEventCode(ev);
  46958. if (closable && (code === EVENT_CODE.delete || code === EVENT_CODE.backspace)) emit("tabRemove", pane, ev);
  46959. }
  46960. }, [...[tabLabelContent, btnClose]]);
  46961. });
  46962. tracker.value;
  46963. return createVNode("div", {
  46964. "ref": el$,
  46965. "class": [
  46966. ns.e("nav-wrap"),
  46967. ns.is("scrollable", !!scrollable.value),
  46968. ns.is(rootTabs.props.tabPosition)
  46969. ]
  46970. }, [scrollBtn, createVNode("div", {
  46971. "class": ns.e("nav-scroll"),
  46972. "ref": navScroll$
  46973. }, [props.panes.length > 0 ? createVNode("div", {
  46974. "class": [
  46975. ns.e("nav"),
  46976. ns.is(rootTabs.props.tabPosition),
  46977. ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))
  46978. ],
  46979. "ref": nav$,
  46980. "style": navStyle.value,
  46981. "role": "tablist",
  46982. "onKeydown": changeTab,
  46983. "onWheel": onWheel
  46984. }, [...[!props.type ? createVNode(tab_bar_default, {
  46985. "ref": tabBarRef,
  46986. "tabs": [...props.panes],
  46987. "tabRefs": tabRefsMap.value
  46988. }, null) : null, tabs]]) : null])]);
  46989. };
  46990. }
  46991. });
  46992. //#endregion
  46993. //#region node_modules/element-plus/es/components/tabs/src/tabs.mjs
  46994. var tabsProps = buildProps({
  46995. type: {
  46996. type: String,
  46997. values: [
  46998. "card",
  46999. "border-card",
  47000. ""
  47001. ],
  47002. default: ""
  47003. },
  47004. closable: Boolean,
  47005. addable: Boolean,
  47006. modelValue: { type: [String, Number] },
  47007. defaultValue: { type: [String, Number] },
  47008. editable: Boolean,
  47009. tabPosition: {
  47010. type: String,
  47011. values: [
  47012. "top",
  47013. "right",
  47014. "bottom",
  47015. "left"
  47016. ],
  47017. default: "top"
  47018. },
  47019. beforeLeave: {
  47020. type: definePropType(Function),
  47021. default: () => true
  47022. },
  47023. stretch: Boolean,
  47024. tabindex: {
  47025. type: [String, Number],
  47026. default: 0
  47027. }
  47028. });
  47029. var isPaneName = (value) => isString(value) || isNumber(value);
  47030. var tabsEmits = {
  47031. [UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
  47032. tabClick: (pane, ev) => ev instanceof Event,
  47033. tabChange: (name) => isPaneName(name),
  47034. edit: (paneName, action) => ["remove", "add"].includes(action),
  47035. tabRemove: (name) => isPaneName(name),
  47036. tabAdd: () => true
  47037. };
  47038. var Tabs = /* @__PURE__ */ defineComponent({
  47039. name: "ElTabs",
  47040. props: tabsProps,
  47041. emits: tabsEmits,
  47042. setup(props, { emit, slots, expose }) {
  47043. const ns = useNamespace("tabs");
  47044. const isVertical = computed(() => ["left", "right"].includes(props.tabPosition));
  47045. const { children: panes, addChild: registerPane, removeChild: unregisterPane, ChildrenSorter: PanesSorter } = useOrderedChildren(getCurrentInstance(), "ElTabPane");
  47046. const nav$ = ref();
  47047. const currentName = ref((isUndefined(props.modelValue) ? props.defaultValue : props.modelValue) ?? "0");
  47048. const setCurrentName = async (value, trigger = false) => {
  47049. if (currentName.value === value || isUndefined(value)) return;
  47050. try {
  47051. let canLeave;
  47052. if (props.beforeLeave) {
  47053. const result = props.beforeLeave(value, currentName.value);
  47054. canLeave = result instanceof Promise ? await result : result;
  47055. } else canLeave = true;
  47056. if (canLeave !== false) {
  47057. const isFocusInsidePane = panes.value.find((item) => item.paneName === currentName.value)?.isFocusInsidePane();
  47058. currentName.value = value;
  47059. if (trigger) {
  47060. emit(UPDATE_MODEL_EVENT, value);
  47061. emit("tabChange", value);
  47062. }
  47063. nav$.value?.removeFocus?.();
  47064. if (isFocusInsidePane) nav$.value?.focusActiveTab();
  47065. }
  47066. } catch {}
  47067. };
  47068. const handleTabClick = (tab, tabName, event) => {
  47069. if (tab.props.disabled) return;
  47070. emit("tabClick", tab, event);
  47071. setCurrentName(tabName, true);
  47072. };
  47073. const handleTabRemove = (pane, ev) => {
  47074. if (pane.props.disabled || isUndefined(pane.props.name)) return;
  47075. ev.stopPropagation();
  47076. emit("edit", pane.props.name, "remove");
  47077. emit("tabRemove", pane.props.name);
  47078. };
  47079. const handleTabAdd = () => {
  47080. emit("edit", void 0, "add");
  47081. emit("tabAdd");
  47082. };
  47083. const handleKeydown = (event) => {
  47084. const code = getEventCode(event);
  47085. if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(code)) handleTabAdd();
  47086. };
  47087. const swapChildren = (vnode) => {
  47088. const actualFirstChild = vnode.el.firstChild;
  47089. const firstChild = ["bottom", "right"].includes(props.tabPosition) ? vnode.children[0].el : vnode.children[1].el;
  47090. if (actualFirstChild !== firstChild) actualFirstChild.before(firstChild);
  47091. };
  47092. watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
  47093. watch(currentName, async () => {
  47094. await nextTick();
  47095. nav$.value?.scrollToActiveTab();
  47096. });
  47097. provide(tabsRootContextKey, {
  47098. props,
  47099. currentName,
  47100. registerPane,
  47101. unregisterPane,
  47102. nav$
  47103. });
  47104. expose({
  47105. currentName,
  47106. get tabNavRef() {
  47107. return omit(nav$.value, ["scheduleRender"]);
  47108. }
  47109. });
  47110. return () => {
  47111. const addSlot = slots["add-icon"];
  47112. const newButton = props.editable || props.addable ? createVNode("div", {
  47113. "class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")],
  47114. "tabindex": props.tabindex,
  47115. "onClick": handleTabAdd,
  47116. "onKeydown": handleKeydown
  47117. }, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, { "class": ns.is("icon-plus") }, { default: () => [createVNode(plus_default, null, null)] })]) : null;
  47118. const tabNav = () => createVNode(TabNav, {
  47119. "ref": nav$,
  47120. "currentName": currentName.value,
  47121. "editable": props.editable,
  47122. "type": props.type,
  47123. "panes": panes.value,
  47124. "stretch": props.stretch,
  47125. "onTabClick": handleTabClick,
  47126. "onTabRemove": handleTabRemove
  47127. }, null);
  47128. const header = createVNode("div", { "class": [
  47129. ns.e("header"),
  47130. isVertical.value && ns.e("header-vertical"),
  47131. ns.is(props.tabPosition)
  47132. ] }, [createVNode(PanesSorter, null, {
  47133. default: tabNav,
  47134. $stable: true
  47135. }), newButton]);
  47136. const panels = createVNode("div", { "class": ns.e("content") }, [renderSlot(slots, "default")]);
  47137. return createVNode("div", {
  47138. "class": [
  47139. ns.b(),
  47140. ns.m(props.tabPosition),
  47141. {
  47142. [ns.m("card")]: props.type === "card",
  47143. [ns.m("border-card")]: props.type === "border-card"
  47144. }
  47145. ],
  47146. "onVnodeMounted": swapChildren,
  47147. "onVnodeUpdated": swapChildren
  47148. }, [panels, header]);
  47149. };
  47150. }
  47151. });
  47152. //#endregion
  47153. //#region node_modules/element-plus/es/components/tabs/src/tab-pane.mjs
  47154. /**
  47155. * @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
  47156. */
  47157. var tabPaneProps = buildProps({
  47158. label: {
  47159. type: String,
  47160. default: ""
  47161. },
  47162. name: { type: [String, Number] },
  47163. closable: {
  47164. type: Boolean,
  47165. default: void 0
  47166. },
  47167. disabled: Boolean,
  47168. lazy: Boolean
  47169. });
  47170. //#endregion
  47171. //#region node_modules/element-plus/es/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.mjs
  47172. var _hoisted_1$14 = [
  47173. "id",
  47174. "aria-hidden",
  47175. "aria-labelledby"
  47176. ];
  47177. var COMPONENT_NAME$2 = "ElTabPane";
  47178. //#endregion
  47179. //#region node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs
  47180. var tab_pane_default = /* @__PURE__ */ defineComponent({
  47181. name: COMPONENT_NAME$2,
  47182. __name: "tab-pane",
  47183. props: tabPaneProps,
  47184. setup(__props) {
  47185. const props = __props;
  47186. const instance = getCurrentInstance();
  47187. const slots = useSlots();
  47188. const tabsRoot = inject(tabsRootContextKey);
  47189. if (!tabsRoot) throwError(COMPONENT_NAME$2, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
  47190. const ns = useNamespace("tab-pane");
  47191. const paneRef = ref();
  47192. const index = ref();
  47193. const isClosable = computed(() => props.closable ?? tabsRoot.props.closable);
  47194. const active = computed(() => tabsRoot.currentName.value === (props.name ?? index.value));
  47195. const loaded = ref(active.value);
  47196. const paneName = computed(() => props.name ?? index.value);
  47197. const shouldBeRender = computed(() => !props.lazy || loaded.value || active.value);
  47198. const isFocusInsidePane = () => {
  47199. return paneRef.value?.contains(document.activeElement);
  47200. };
  47201. watch(active, (val) => {
  47202. if (val) loaded.value = true;
  47203. });
  47204. const pane = reactive({
  47205. uid: instance.uid,
  47206. getVnode: () => instance.vnode,
  47207. slots,
  47208. props,
  47209. paneName,
  47210. active,
  47211. index,
  47212. isClosable,
  47213. isFocusInsidePane
  47214. });
  47215. tabsRoot.registerPane(pane);
  47216. onBeforeUnmount(() => {
  47217. tabsRoot.unregisterPane(pane);
  47218. });
  47219. onBeforeUpdate(() => {
  47220. if (slots.label) tabsRoot.nav$.value?.scheduleRender();
  47221. });
  47222. return (_ctx, _cache) => {
  47223. return shouldBeRender.value ? withDirectives((openBlock(), createElementBlock("div", {
  47224. key: 0,
  47225. id: `pane-${paneName.value}`,
  47226. ref_key: "paneRef",
  47227. ref: paneRef,
  47228. class: normalizeClass(unref(ns).b()),
  47229. role: "tabpanel",
  47230. "aria-hidden": !active.value,
  47231. "aria-labelledby": `tab-${paneName.value}`
  47232. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$14)), [[vShow, active.value]]) : createCommentVNode("v-if", true);
  47233. };
  47234. }
  47235. });
  47236. //#endregion
  47237. //#region node_modules/element-plus/es/components/tabs/index.mjs
  47238. var ElTabs = withInstall(Tabs, { TabPane: tab_pane_default });
  47239. var ElTabPane = withNoopInstall(tab_pane_default);
  47240. //#endregion
  47241. //#region node_modules/element-plus/es/components/text/src/text.mjs
  47242. /**
  47243. * @deprecated Removed after 3.0.0, Use `TextProps` instead.
  47244. */
  47245. var textProps = buildProps({
  47246. type: {
  47247. type: String,
  47248. values: [
  47249. "primary",
  47250. "success",
  47251. "info",
  47252. "warning",
  47253. "danger",
  47254. ""
  47255. ],
  47256. default: ""
  47257. },
  47258. size: {
  47259. type: String,
  47260. values: componentSizes,
  47261. default: ""
  47262. },
  47263. truncated: Boolean,
  47264. lineClamp: { type: [String, Number] },
  47265. tag: {
  47266. type: String,
  47267. default: "span"
  47268. }
  47269. });
  47270. //#endregion
  47271. //#region node_modules/element-plus/es/components/text/index.mjs
  47272. var ElText = withInstall(/* @__PURE__ */ defineComponent({
  47273. name: "ElText",
  47274. __name: "text",
  47275. props: textProps,
  47276. setup(__props) {
  47277. const props = __props;
  47278. const textRef = ref();
  47279. const textSize = useFormSize();
  47280. const ns = useNamespace("text");
  47281. const textKls = computed(() => [
  47282. ns.b(),
  47283. ns.m(props.type),
  47284. ns.m(textSize.value),
  47285. ns.is("truncated", props.truncated),
  47286. ns.is("line-clamp", !isUndefined(props.lineClamp))
  47287. ]);
  47288. const bindTitle = () => {
  47289. if (useAttrs$1().title) return;
  47290. let shouldAddTitle = false;
  47291. const text = textRef.value?.textContent || "";
  47292. if (props.truncated) {
  47293. const width = textRef.value?.offsetWidth;
  47294. const scrollWidth = textRef.value?.scrollWidth;
  47295. if (width && scrollWidth && scrollWidth > width) shouldAddTitle = true;
  47296. } else if (!isUndefined(props.lineClamp)) {
  47297. const height = textRef.value?.offsetHeight;
  47298. const scrollHeight = textRef.value?.scrollHeight;
  47299. if (height && scrollHeight && scrollHeight > height) shouldAddTitle = true;
  47300. }
  47301. if (shouldAddTitle) textRef.value?.setAttribute("title", text);
  47302. else textRef.value?.removeAttribute("title");
  47303. };
  47304. onMounted(bindTitle);
  47305. onUpdated(bindTitle);
  47306. return (_ctx, _cache) => {
  47307. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  47308. ref_key: "textRef",
  47309. ref: textRef,
  47310. class: normalizeClass(textKls.value),
  47311. style: normalizeStyle({ "-webkit-line-clamp": __props.lineClamp })
  47312. }, {
  47313. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  47314. _: 3
  47315. }, 8, ["class", "style"]);
  47316. };
  47317. }
  47318. }));
  47319. //#endregion
  47320. //#region node_modules/element-plus/es/components/time-select/src/time-select.mjs
  47321. var DEFAULT_STEP = "00:30";
  47322. /**
  47323. * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
  47324. */
  47325. var timeSelectProps = buildProps({
  47326. format: {
  47327. type: String,
  47328. default: "HH:mm"
  47329. },
  47330. modelValue: { type: definePropType(String) },
  47331. disabled: {
  47332. type: Boolean,
  47333. default: void 0
  47334. },
  47335. editable: {
  47336. type: Boolean,
  47337. default: true
  47338. },
  47339. effect: {
  47340. type: definePropType(String),
  47341. default: "light"
  47342. },
  47343. clearable: {
  47344. type: Boolean,
  47345. default: true
  47346. },
  47347. size: useSizeProp,
  47348. placeholder: String,
  47349. start: {
  47350. type: String,
  47351. default: "09:00"
  47352. },
  47353. end: {
  47354. type: String,
  47355. default: "18:00"
  47356. },
  47357. step: {
  47358. type: String,
  47359. default: DEFAULT_STEP
  47360. },
  47361. minTime: { type: definePropType(String) },
  47362. maxTime: { type: definePropType(String) },
  47363. includeEndTime: Boolean,
  47364. name: String,
  47365. prefixIcon: {
  47366. type: definePropType([String, Object]),
  47367. default: () => clock_default
  47368. },
  47369. clearIcon: {
  47370. type: definePropType([String, Object]),
  47371. default: () => circle_close_default
  47372. },
  47373. popperClass: {
  47374. type: String,
  47375. default: ""
  47376. },
  47377. popperStyle: { type: definePropType([String, Object]) },
  47378. ...useEmptyValuesProps
  47379. });
  47380. //#endregion
  47381. //#region node_modules/element-plus/es/components/time-select/src/utils.mjs
  47382. var parseTime = (time) => {
  47383. const values = (time || "").split(":");
  47384. if (values.length >= 2) {
  47385. let hours = Number.parseInt(values[0], 10);
  47386. const minutes = Number.parseInt(values[1], 10);
  47387. const timeUpper = time.toUpperCase();
  47388. if (timeUpper.includes("AM") && hours === 12) hours = 0;
  47389. else if (timeUpper.includes("PM") && hours !== 12) hours += 12;
  47390. return {
  47391. hours,
  47392. minutes
  47393. };
  47394. }
  47395. return null;
  47396. };
  47397. var compareTime = (time1, time2) => {
  47398. const value1 = parseTime(time1);
  47399. if (!value1) return -1;
  47400. const value2 = parseTime(time2);
  47401. if (!value2) return -1;
  47402. const minutes1 = value1.minutes + value1.hours * 60;
  47403. const minutes2 = value2.minutes + value2.hours * 60;
  47404. if (minutes1 === minutes2) return 0;
  47405. return minutes1 > minutes2 ? 1 : -1;
  47406. };
  47407. var padTime = (time) => {
  47408. return `${time}`.padStart(2, "0");
  47409. };
  47410. var formatTime = (time) => {
  47411. return `${padTime(time.hours)}:${padTime(time.minutes)}`;
  47412. };
  47413. var nextTime = (time, step) => {
  47414. const timeValue = parseTime(time);
  47415. if (!timeValue) return "";
  47416. const stepValue = parseTime(step);
  47417. if (!stepValue) return "";
  47418. const next = {
  47419. hours: timeValue.hours,
  47420. minutes: timeValue.minutes
  47421. };
  47422. next.minutes += stepValue.minutes;
  47423. next.hours += stepValue.hours;
  47424. next.hours += Math.floor(next.minutes / 60);
  47425. next.minutes = next.minutes % 60;
  47426. return formatTime(next);
  47427. };
  47428. //#endregion
  47429. //#region node_modules/element-plus/es/components/time-select/index.mjs
  47430. var ElTimeSelect = withInstall(/* @__PURE__ */ defineComponent({
  47431. name: "ElTimeSelect",
  47432. __name: "time-select",
  47433. props: timeSelectProps,
  47434. emits: [
  47435. CHANGE_EVENT,
  47436. "blur",
  47437. "focus",
  47438. "clear",
  47439. UPDATE_MODEL_EVENT
  47440. ],
  47441. setup(__props, { expose: __expose }) {
  47442. import_dayjs_min.default.extend(import_customParseFormat.default);
  47443. const { Option: ElOption } = ElSelect;
  47444. const props = __props;
  47445. const nsInput = useNamespace("input");
  47446. const select = ref();
  47447. const _disabled = useFormDisabled();
  47448. const { lang } = useLocale();
  47449. const value = computed(() => props.modelValue);
  47450. const start = computed(() => {
  47451. const time = parseTime(props.start);
  47452. return time ? formatTime(time) : null;
  47453. });
  47454. const end = computed(() => {
  47455. const time = parseTime(props.end);
  47456. return time ? formatTime(time) : null;
  47457. });
  47458. const minTime = computed(() => {
  47459. const time = parseTime(props.minTime || "");
  47460. return time ? formatTime(time) : null;
  47461. });
  47462. const maxTime = computed(() => {
  47463. const time = parseTime(props.maxTime || "");
  47464. return time ? formatTime(time) : null;
  47465. });
  47466. const step = computed(() => {
  47467. const time = parseTime(props.step);
  47468. const isInvalidStep = !time || time.hours < 0 || time.minutes < 0 || Number.isNaN(time.hours) || Number.isNaN(time.minutes) || time.hours === 0 && time.minutes === 0;
  47469. if (isInvalidStep) debugWarn("ElTimeSelect", `invalid step, fallback to default step (${DEFAULT_STEP}).`);
  47470. return !isInvalidStep ? formatTime(time) : DEFAULT_STEP;
  47471. });
  47472. const items = computed(() => {
  47473. const result = [];
  47474. const push = (formattedValue, rawValue) => {
  47475. result.push({
  47476. value: formattedValue,
  47477. rawValue,
  47478. disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0
  47479. });
  47480. };
  47481. if (props.start && props.end && props.step) {
  47482. let current = start.value;
  47483. let currentTime;
  47484. while (current && end.value && compareTime(current, end.value) <= 0) {
  47485. currentTime = (0, import_dayjs_min.default)(current, "HH:mm").locale(lang.value).format(props.format);
  47486. push(currentTime, current);
  47487. current = nextTime(current, step.value);
  47488. }
  47489. if (props.includeEndTime && end.value && result[result.length - 1]?.rawValue !== end.value) push((0, import_dayjs_min.default)(end.value, "HH:mm").locale(lang.value).format(props.format), end.value);
  47490. }
  47491. return result;
  47492. });
  47493. const blur = () => {
  47494. select.value?.blur?.();
  47495. };
  47496. const focus = () => {
  47497. select.value?.focus?.();
  47498. };
  47499. __expose({
  47500. blur,
  47501. focus
  47502. });
  47503. return (_ctx, _cache) => {
  47504. return openBlock(), createBlock(unref(ElSelect), {
  47505. ref_key: "select",
  47506. ref: select,
  47507. name: __props.name,
  47508. "model-value": value.value,
  47509. disabled: unref(_disabled),
  47510. clearable: __props.clearable,
  47511. "clear-icon": __props.clearIcon,
  47512. size: __props.size,
  47513. effect: __props.effect,
  47514. placeholder: __props.placeholder,
  47515. "default-first-option": "",
  47516. filterable: __props.editable,
  47517. "empty-values": __props.emptyValues,
  47518. "value-on-clear": __props.valueOnClear,
  47519. "popper-class": __props.popperClass,
  47520. "popper-style": __props.popperStyle,
  47521. "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit(unref("update:modelValue"), event)),
  47522. onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit(unref("change"), event)),
  47523. onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
  47524. onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)),
  47525. onClear: _cache[4] || (_cache[4] = () => _ctx.$emit("clear"))
  47526. }, {
  47527. prefix: withCtx(() => [__props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  47528. key: 0,
  47529. class: normalizeClass(unref(nsInput).e("prefix-icon"))
  47530. }, {
  47531. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
  47532. _: 1
  47533. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  47534. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
  47535. return openBlock(), createBlock(unref(ElOption), {
  47536. key: item.value,
  47537. label: item.value,
  47538. value: item.value,
  47539. disabled: item.disabled
  47540. }, null, 8, [
  47541. "label",
  47542. "value",
  47543. "disabled"
  47544. ]);
  47545. }), 128))]),
  47546. _: 1
  47547. }, 8, [
  47548. "name",
  47549. "model-value",
  47550. "disabled",
  47551. "clearable",
  47552. "clear-icon",
  47553. "size",
  47554. "effect",
  47555. "placeholder",
  47556. "filterable",
  47557. "empty-values",
  47558. "value-on-clear",
  47559. "popper-class",
  47560. "popper-style"
  47561. ]);
  47562. };
  47563. }
  47564. }));
  47565. //#endregion
  47566. //#region node_modules/element-plus/es/components/timeline/src/tokens.mjs
  47567. var TIMELINE_INJECTION_KEY = "timeline";
  47568. //#endregion
  47569. //#region node_modules/element-plus/es/components/timeline/src/timeline.mjs
  47570. var timelineProps = buildProps({
  47571. mode: {
  47572. type: String,
  47573. values: [
  47574. "start",
  47575. "alternate",
  47576. "alternate-reverse",
  47577. "end"
  47578. ],
  47579. default: "start"
  47580. },
  47581. reverse: Boolean
  47582. });
  47583. var Timeline = defineComponent({
  47584. name: "ElTimeline",
  47585. props: timelineProps,
  47586. setup(props, { slots }) {
  47587. const ns = useNamespace("timeline");
  47588. provide(TIMELINE_INJECTION_KEY, {
  47589. props,
  47590. slots
  47591. });
  47592. const timelineKls = computed(() => [ns.b(), ns.is(props.mode)]);
  47593. return () => {
  47594. const children = flattedChildren(slots.default?.() ?? []);
  47595. return h$1("ul", { class: timelineKls.value }, props.reverse ? children.reverse() : children);
  47596. };
  47597. }
  47598. });
  47599. //#endregion
  47600. //#region node_modules/element-plus/es/components/timeline/src/timeline-item.mjs
  47601. /**
  47602. * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
  47603. */
  47604. var timelineItemProps = buildProps({
  47605. timestamp: {
  47606. type: String,
  47607. default: ""
  47608. },
  47609. hideTimestamp: Boolean,
  47610. center: Boolean,
  47611. placement: {
  47612. type: String,
  47613. values: ["top", "bottom"],
  47614. default: "bottom"
  47615. },
  47616. type: {
  47617. type: String,
  47618. values: [
  47619. "primary",
  47620. "success",
  47621. "warning",
  47622. "danger",
  47623. "info"
  47624. ],
  47625. default: ""
  47626. },
  47627. color: {
  47628. type: String,
  47629. default: ""
  47630. },
  47631. size: {
  47632. type: String,
  47633. values: ["normal", "large"],
  47634. default: "normal"
  47635. },
  47636. icon: { type: iconPropType },
  47637. hollow: Boolean
  47638. });
  47639. //#endregion
  47640. //#region node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs
  47641. var timeline_item_default = /* @__PURE__ */ defineComponent({
  47642. name: "ElTimelineItem",
  47643. __name: "timeline-item",
  47644. props: timelineItemProps,
  47645. setup(__props) {
  47646. const props = __props;
  47647. const { props: timelineProps } = inject(TIMELINE_INJECTION_KEY);
  47648. const ns = useNamespace("timeline-item");
  47649. const defaultNodeKls = computed(() => [
  47650. ns.e("node"),
  47651. ns.em("node", props.size || ""),
  47652. ns.em("node", props.type || ""),
  47653. ns.is("hollow", props.hollow)
  47654. ]);
  47655. const timelineItemKls = computed(() => [
  47656. ns.b(),
  47657. { [ns.e("center")]: props.center },
  47658. ns.is(timelineProps.mode)
  47659. ]);
  47660. return (_ctx, _cache) => {
  47661. return openBlock(), createElementBlock("li", { class: normalizeClass(timelineItemKls.value) }, [
  47662. createBaseVNode("div", { class: normalizeClass(unref(ns).e("tail")) }, null, 2),
  47663. !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  47664. key: 0,
  47665. class: normalizeClass(defaultNodeKls.value),
  47666. style: normalizeStyle({ backgroundColor: __props.color })
  47667. }, [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  47668. key: 0,
  47669. class: normalizeClass(unref(ns).e("icon"))
  47670. }, {
  47671. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  47672. _: 1
  47673. }, 8, ["class"])) : createCommentVNode("v-if", true)], 6)) : createCommentVNode("v-if", true),
  47674. _ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  47675. key: 1,
  47676. class: normalizeClass(unref(ns).e("dot"))
  47677. }, [renderSlot(_ctx.$slots, "dot")], 2)) : createCommentVNode("v-if", true),
  47678. createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [
  47679. !__props.hideTimestamp && __props.placement === "top" ? (openBlock(), createElementBlock("div", {
  47680. key: 0,
  47681. class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
  47682. }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true),
  47683. createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2),
  47684. !__props.hideTimestamp && __props.placement === "bottom" ? (openBlock(), createElementBlock("div", {
  47685. key: 1,
  47686. class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
  47687. }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true)
  47688. ], 2)
  47689. ], 2);
  47690. };
  47691. }
  47692. });
  47693. //#endregion
  47694. //#region node_modules/element-plus/es/components/timeline/index.mjs
  47695. var ElTimeline = withInstall(Timeline, { TimelineItem: timeline_item_default });
  47696. var ElTimelineItem = withNoopInstall(timeline_item_default);
  47697. //#endregion
  47698. //#region node_modules/element-plus/es/components/transfer/src/transfer.mjs
  47699. var LEFT_CHECK_CHANGE_EVENT = "left-check-change";
  47700. var RIGHT_CHECK_CHANGE_EVENT = "right-check-change";
  47701. /**
  47702. * @deprecated Removed after 3.0.0, Use `TransferProps` instead.
  47703. */
  47704. var transferProps = buildProps({
  47705. data: {
  47706. type: definePropType(Array),
  47707. default: () => []
  47708. },
  47709. titles: {
  47710. type: definePropType(Array),
  47711. default: () => []
  47712. },
  47713. buttonTexts: {
  47714. type: definePropType(Array),
  47715. default: () => []
  47716. },
  47717. filterPlaceholder: String,
  47718. filterMethod: { type: definePropType(Function) },
  47719. leftDefaultChecked: {
  47720. type: definePropType(Array),
  47721. default: () => []
  47722. },
  47723. rightDefaultChecked: {
  47724. type: definePropType(Array),
  47725. default: () => []
  47726. },
  47727. renderContent: { type: definePropType(Function) },
  47728. modelValue: {
  47729. type: definePropType(Array),
  47730. default: () => []
  47731. },
  47732. format: {
  47733. type: definePropType(Object),
  47734. default: () => ({})
  47735. },
  47736. filterable: Boolean,
  47737. props: {
  47738. type: definePropType(Object),
  47739. default: () => mutable({
  47740. label: "label",
  47741. key: "key",
  47742. disabled: "disabled"
  47743. })
  47744. },
  47745. targetOrder: {
  47746. type: String,
  47747. values: [
  47748. "original",
  47749. "push",
  47750. "unshift"
  47751. ],
  47752. default: "original"
  47753. },
  47754. validateEvent: {
  47755. type: Boolean,
  47756. default: true
  47757. }
  47758. });
  47759. var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray$1) || isArray$1(value) && isNil(movedKeys);
  47760. var transferEmits = {
  47761. [CHANGE_EVENT]: (value, direction, movedKeys) => [value, movedKeys].every(isArray$1) && ["left", "right"].includes(direction),
  47762. [UPDATE_MODEL_EVENT]: (value) => isArray$1(value),
  47763. [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
  47764. [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
  47765. };
  47766. //#endregion
  47767. //#region node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs
  47768. var usePropsAlias = (props) => {
  47769. const initProps = {
  47770. label: "label",
  47771. key: "key",
  47772. disabled: "disabled"
  47773. };
  47774. return computed(() => ({
  47775. ...initProps,
  47776. ...props.props
  47777. }));
  47778. };
  47779. //#endregion
  47780. //#region node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs
  47781. var useCheckedChange = (checkedState, emit) => {
  47782. const onSourceCheckedChange = (val, movedKeys) => {
  47783. checkedState.leftChecked = val;
  47784. if (!movedKeys) return;
  47785. emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
  47786. };
  47787. const onTargetCheckedChange = (val, movedKeys) => {
  47788. checkedState.rightChecked = val;
  47789. if (!movedKeys) return;
  47790. emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
  47791. };
  47792. return {
  47793. onSourceCheckedChange,
  47794. onTargetCheckedChange
  47795. };
  47796. };
  47797. //#endregion
  47798. //#region node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs
  47799. var useComputedData = (props) => {
  47800. const propsAlias = usePropsAlias(props);
  47801. const dataObj = computed(() => props.data.reduce((o, cur) => (o[cur[propsAlias.value.key]] = cur) && o, {}));
  47802. return {
  47803. sourceData: computed(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key]))),
  47804. targetData: computed(() => {
  47805. if (props.targetOrder === "original") return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key]));
  47806. else return props.modelValue.reduce((arr, cur) => {
  47807. const val = dataObj.value[cur];
  47808. if (val) arr.push(val);
  47809. return arr;
  47810. }, []);
  47811. })
  47812. };
  47813. };
  47814. //#endregion
  47815. //#region node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs
  47816. var useMove = (props, checkedState, emit) => {
  47817. const propsAlias = usePropsAlias(props);
  47818. const _emit = (value, direction, movedKeys) => {
  47819. emit(UPDATE_MODEL_EVENT, value);
  47820. emit(CHANGE_EVENT, value, direction, movedKeys);
  47821. };
  47822. const addToLeft = () => {
  47823. const currentValue = props.modelValue.slice();
  47824. checkedState.rightChecked.forEach((item) => {
  47825. const index = currentValue.indexOf(item);
  47826. if (index > -1) currentValue.splice(index, 1);
  47827. });
  47828. _emit(currentValue, "left", checkedState.rightChecked);
  47829. };
  47830. const addToRight = () => {
  47831. let currentValue = props.modelValue.slice();
  47832. const itemsToBeMoved = props.data.filter((item) => {
  47833. const itemKey = item[propsAlias.value.key];
  47834. return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
  47835. }).map((item) => item[propsAlias.value.key]);
  47836. currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
  47837. if (props.targetOrder === "original") currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]);
  47838. _emit(currentValue, "right", checkedState.leftChecked);
  47839. };
  47840. return {
  47841. addToLeft,
  47842. addToRight
  47843. };
  47844. };
  47845. //#endregion
  47846. //#region node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs
  47847. var CHECKED_CHANGE_EVENT = "checked-change";
  47848. /**
  47849. * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.
  47850. */
  47851. var transferPanelProps = buildProps({
  47852. data: transferProps.data,
  47853. optionRender: { type: definePropType(Function) },
  47854. placeholder: String,
  47855. title: String,
  47856. filterable: Boolean,
  47857. format: transferProps.format,
  47858. filterMethod: transferProps.filterMethod,
  47859. defaultChecked: transferProps.leftDefaultChecked,
  47860. props: transferProps.props
  47861. });
  47862. var transferPanelEmits = { [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn };
  47863. //#endregion
  47864. //#region node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs
  47865. var useCheck$1 = (props, panelState, emit) => {
  47866. const propsAlias = usePropsAlias(props);
  47867. const filteredData = computed(() => {
  47868. return props.data.filter((item) => {
  47869. if (isFunction$1(props.filterMethod)) return props.filterMethod(panelState.query, item);
  47870. else return String(item[propsAlias.value.label] || item[propsAlias.value.key]).toLowerCase().includes(panelState.query.toLowerCase());
  47871. });
  47872. });
  47873. const checkableData = computed(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled]));
  47874. const checkedSummary = computed(() => {
  47875. const checkedLength = panelState.checked.length;
  47876. const dataLength = props.data.length;
  47877. const { noChecked, hasChecked } = props.format;
  47878. if (noChecked && hasChecked) return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString());
  47879. else return `${checkedLength}/${dataLength}`;
  47880. });
  47881. const isIndeterminate = computed(() => {
  47882. const checkedLength = panelState.checked.length;
  47883. return checkedLength > 0 && checkedLength < checkableData.value.length;
  47884. });
  47885. const updateAllChecked = () => {
  47886. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  47887. panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));
  47888. };
  47889. const handleAllCheckedChange = (value) => {
  47890. panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
  47891. };
  47892. watch(() => panelState.checked, (val, oldVal) => {
  47893. updateAllChecked();
  47894. if (panelState.checkChangeByUser) emit(CHECKED_CHANGE_EVENT, val, val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v)));
  47895. else {
  47896. emit(CHECKED_CHANGE_EVENT, val);
  47897. panelState.checkChangeByUser = true;
  47898. }
  47899. });
  47900. watch(checkableData, () => {
  47901. updateAllChecked();
  47902. });
  47903. watch(() => props.data, () => {
  47904. const checked = [];
  47905. const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]);
  47906. panelState.checked.forEach((item) => {
  47907. if (filteredDataKeys.includes(item)) checked.push(item);
  47908. });
  47909. panelState.checkChangeByUser = false;
  47910. panelState.checked = checked;
  47911. });
  47912. watch(() => props.defaultChecked, (val, oldVal) => {
  47913. if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item))) return;
  47914. const checked = [];
  47915. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  47916. val.forEach((item) => {
  47917. if (checkableDataKeys.includes(item)) checked.push(item);
  47918. });
  47919. panelState.checkChangeByUser = false;
  47920. panelState.checked = checked;
  47921. }, { immediate: true });
  47922. return {
  47923. filteredData,
  47924. checkableData,
  47925. checkedSummary,
  47926. isIndeterminate,
  47927. updateAllChecked,
  47928. handleAllCheckedChange
  47929. };
  47930. };
  47931. //#endregion
  47932. //#region node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs
  47933. var transfer_panel_default = /* @__PURE__ */ defineComponent({
  47934. name: "ElTransferPanel",
  47935. __name: "transfer-panel",
  47936. props: transferPanelProps,
  47937. emits: transferPanelEmits,
  47938. setup(__props, { expose: __expose, emit: __emit }) {
  47939. const props = __props;
  47940. const emit = __emit;
  47941. const slots = useSlots();
  47942. const OptionContent = ({ option }) => option;
  47943. const { t } = useLocale();
  47944. const ns = useNamespace("transfer");
  47945. const panelState = reactive({
  47946. checked: [],
  47947. allChecked: false,
  47948. query: "",
  47949. checkChangeByUser: true
  47950. });
  47951. const propsAlias = usePropsAlias(props);
  47952. const { filteredData, checkedSummary, isIndeterminate, handleAllCheckedChange } = useCheck$1(props, panelState, emit);
  47953. const hasNoMatch = computed(() => !isEmpty(panelState.query) && isEmpty(filteredData.value));
  47954. const hasFooter = computed(() => !isEmpty(slots.default()[0].children));
  47955. const { checked, allChecked, query } = toRefs(panelState);
  47956. __expose({ query });
  47957. return (_ctx, _cache) => {
  47958. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b("panel")) }, [
  47959. createBaseVNode("p", { class: normalizeClass(unref(ns).be("panel", "header")) }, [createVNode(unref(ElCheckbox), {
  47960. modelValue: unref(allChecked),
  47961. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null),
  47962. indeterminate: unref(isIndeterminate),
  47963. "validate-event": false,
  47964. onChange: unref(handleAllCheckedChange)
  47965. }, {
  47966. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-title")) }, toDisplayString(__props.title), 3), createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-count")) }, toDisplayString(unref(checkedSummary)), 3)]),
  47967. _: 1
  47968. }, 8, [
  47969. "modelValue",
  47970. "indeterminate",
  47971. "onChange"
  47972. ])], 2),
  47973. createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", hasFooter.value)]) }, [
  47974. __props.filterable ? (openBlock(), createBlock(unref(ElInput), {
  47975. key: 0,
  47976. modelValue: unref(query),
  47977. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null),
  47978. class: normalizeClass(unref(ns).be("panel", "filter")),
  47979. size: "default",
  47980. placeholder: __props.placeholder,
  47981. "prefix-icon": unref(search_default),
  47982. clearable: "",
  47983. "validate-event": false
  47984. }, null, 8, [
  47985. "modelValue",
  47986. "class",
  47987. "placeholder",
  47988. "prefix-icon"
  47989. ])) : createCommentVNode("v-if", true),
  47990. withDirectives(createVNode(unref(ElCheckboxGroup), {
  47991. modelValue: unref(checked),
  47992. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null),
  47993. "validate-event": false,
  47994. class: normalizeClass([unref(ns).is("filterable", __props.filterable), unref(ns).be("panel", "list")])
  47995. }, {
  47996. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
  47997. return openBlock(), createBlock(unref(ElCheckbox), {
  47998. key: item[unref(propsAlias).key],
  47999. class: normalizeClass(unref(ns).be("panel", "item")),
  48000. value: item[unref(propsAlias).key],
  48001. disabled: item[unref(propsAlias).disabled],
  48002. "validate-event": false
  48003. }, {
  48004. default: withCtx(() => [createVNode(OptionContent, { option: __props.optionRender?.(item) }, null, 8, ["option"])]),
  48005. _: 2
  48006. }, 1032, [
  48007. "class",
  48008. "value",
  48009. "disabled"
  48010. ]);
  48011. }), 128))]),
  48012. _: 1
  48013. }, 8, ["modelValue", "class"]), [[vShow, !hasNoMatch.value && !unref(isEmpty)(__props.data)]]),
  48014. withDirectives(createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(hasNoMatch.value ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 1)])], 2), [[vShow, hasNoMatch.value || unref(isEmpty)(__props.data)]])
  48015. ], 2),
  48016. hasFooter.value ? (openBlock(), createElementBlock("p", {
  48017. key: 0,
  48018. class: normalizeClass(unref(ns).be("panel", "footer"))
  48019. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  48020. ], 2);
  48021. };
  48022. }
  48023. });
  48024. //#endregion
  48025. //#region node_modules/element-plus/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs
  48026. var _hoisted_1$13 = { key: 0 };
  48027. var _hoisted_2$8 = { key: 0 };
  48028. //#endregion
  48029. //#region node_modules/element-plus/es/components/transfer/index.mjs
  48030. var ElTransfer = withInstall(/* @__PURE__ */ defineComponent({
  48031. name: "ElTransfer",
  48032. __name: "transfer",
  48033. props: transferProps,
  48034. emits: transferEmits,
  48035. setup(__props, { expose: __expose, emit: __emit }) {
  48036. const props = __props;
  48037. const emit = __emit;
  48038. const slots = useSlots();
  48039. const { t } = useLocale();
  48040. const ns = useNamespace("transfer");
  48041. const { formItem } = useFormItem();
  48042. const checkedState = reactive({
  48043. leftChecked: [],
  48044. rightChecked: []
  48045. });
  48046. const propsAlias = usePropsAlias(props);
  48047. const { sourceData, targetData } = useComputedData(props);
  48048. const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit);
  48049. const { addToLeft, addToRight } = useMove(props, checkedState, emit);
  48050. const leftPanel = ref();
  48051. const rightPanel = ref();
  48052. const clearQuery = (which) => {
  48053. switch (which) {
  48054. case "left":
  48055. leftPanel.value.query = "";
  48056. break;
  48057. case "right":
  48058. rightPanel.value.query = "";
  48059. break;
  48060. }
  48061. };
  48062. const hasButtonTexts = computed(() => props.buttonTexts.length === 2);
  48063. const leftPanelTitle = computed(() => props.titles[0] || t("el.transfer.titles.0"));
  48064. const rightPanelTitle = computed(() => props.titles[1] || t("el.transfer.titles.1"));
  48065. const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder"));
  48066. watch(() => props.modelValue, () => {
  48067. if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
  48068. });
  48069. const optionRender = computed(() => (option) => {
  48070. if (props.renderContent) return props.renderContent(h$1, option);
  48071. const defaultSlotVNodes = (slots.default?.({ option }) || []).filter((node) => node.type !== Comment);
  48072. if (defaultSlotVNodes.length) return defaultSlotVNodes;
  48073. return h$1("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
  48074. });
  48075. __expose({
  48076. clearQuery,
  48077. leftPanel,
  48078. rightPanel
  48079. });
  48080. return (_ctx, _cache) => {
  48081. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  48082. createVNode(transfer_panel_default, {
  48083. ref_key: "leftPanel",
  48084. ref: leftPanel,
  48085. data: unref(sourceData),
  48086. "option-render": optionRender.value,
  48087. placeholder: panelFilterPlaceholder.value,
  48088. title: leftPanelTitle.value,
  48089. filterable: __props.filterable,
  48090. format: __props.format,
  48091. "filter-method": __props.filterMethod,
  48092. "default-checked": __props.leftDefaultChecked,
  48093. props: props.props,
  48094. onCheckedChange: unref(onSourceCheckedChange)
  48095. }, {
  48096. empty: withCtx(() => [renderSlot(_ctx.$slots, "left-empty")]),
  48097. default: withCtx(() => [renderSlot(_ctx.$slots, "left-footer")]),
  48098. _: 3
  48099. }, 8, [
  48100. "data",
  48101. "option-render",
  48102. "placeholder",
  48103. "title",
  48104. "filterable",
  48105. "format",
  48106. "filter-method",
  48107. "default-checked",
  48108. "props",
  48109. "onCheckedChange"
  48110. ]),
  48111. createBaseVNode("div", { class: normalizeClass(unref(ns).e("buttons")) }, [createVNode(unref(ElButton), {
  48112. type: "primary",
  48113. class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
  48114. disabled: unref(isEmpty)(checkedState.rightChecked),
  48115. onClick: unref(addToLeft)
  48116. }, {
  48117. default: withCtx(() => [createVNode(unref(ElIcon), null, {
  48118. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  48119. _: 1
  48120. }), !unref(isUndefined)(__props.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_1$13, toDisplayString(__props.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)]),
  48121. _: 1
  48122. }, 8, [
  48123. "class",
  48124. "disabled",
  48125. "onClick"
  48126. ]), createVNode(unref(ElButton), {
  48127. type: "primary",
  48128. class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
  48129. disabled: unref(isEmpty)(checkedState.leftChecked),
  48130. onClick: unref(addToRight)
  48131. }, {
  48132. default: withCtx(() => [!unref(isUndefined)(__props.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(__props.buttonTexts[1]), 1)) : createCommentVNode("v-if", true), createVNode(unref(ElIcon), null, {
  48133. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  48134. _: 1
  48135. })]),
  48136. _: 1
  48137. }, 8, [
  48138. "class",
  48139. "disabled",
  48140. "onClick"
  48141. ])], 2),
  48142. createVNode(transfer_panel_default, {
  48143. ref_key: "rightPanel",
  48144. ref: rightPanel,
  48145. data: unref(targetData),
  48146. "option-render": optionRender.value,
  48147. placeholder: panelFilterPlaceholder.value,
  48148. filterable: __props.filterable,
  48149. format: __props.format,
  48150. "filter-method": __props.filterMethod,
  48151. title: rightPanelTitle.value,
  48152. "default-checked": __props.rightDefaultChecked,
  48153. props: props.props,
  48154. onCheckedChange: unref(onTargetCheckedChange)
  48155. }, {
  48156. empty: withCtx(() => [renderSlot(_ctx.$slots, "right-empty")]),
  48157. default: withCtx(() => [renderSlot(_ctx.$slots, "right-footer")]),
  48158. _: 3
  48159. }, 8, [
  48160. "data",
  48161. "option-render",
  48162. "placeholder",
  48163. "filterable",
  48164. "format",
  48165. "filter-method",
  48166. "title",
  48167. "default-checked",
  48168. "props",
  48169. "onCheckedChange"
  48170. ])
  48171. ], 2);
  48172. };
  48173. }
  48174. }));
  48175. //#endregion
  48176. //#region node_modules/element-plus/es/components/tree/src/tokens.mjs
  48177. var ROOT_TREE_INJECTION_KEY = "RootTree";
  48178. var NODE_INSTANCE_INJECTION_KEY = "NodeInstance";
  48179. var TREE_NODE_MAP_INJECTION_KEY = "TreeNodeMap";
  48180. //#endregion
  48181. //#region node_modules/element-plus/es/components/tree/src/tree.mjs
  48182. var treeProps = buildProps({
  48183. data: {
  48184. type: definePropType(Array),
  48185. default: () => []
  48186. },
  48187. emptyText: { type: String },
  48188. renderAfterExpand: {
  48189. type: Boolean,
  48190. default: true
  48191. },
  48192. nodeKey: String,
  48193. checkStrictly: Boolean,
  48194. defaultExpandAll: Boolean,
  48195. expandOnClickNode: {
  48196. type: Boolean,
  48197. default: true
  48198. },
  48199. checkOnClickNode: Boolean,
  48200. checkOnClickLeaf: {
  48201. type: Boolean,
  48202. default: true
  48203. },
  48204. checkDescendants: Boolean,
  48205. autoExpandParent: {
  48206. type: Boolean,
  48207. default: true
  48208. },
  48209. defaultCheckedKeys: { type: Array },
  48210. defaultExpandedKeys: { type: Array },
  48211. currentNodeKey: { type: [String, Number] },
  48212. renderContent: { type: definePropType(Function) },
  48213. showCheckbox: Boolean,
  48214. draggable: Boolean,
  48215. allowDrag: { type: definePropType(Function) },
  48216. allowDrop: { type: definePropType(Function) },
  48217. props: {
  48218. type: Object,
  48219. default: () => ({
  48220. children: "children",
  48221. label: "label",
  48222. disabled: "disabled"
  48223. })
  48224. },
  48225. lazy: Boolean,
  48226. highlightCurrent: Boolean,
  48227. load: { type: Function },
  48228. filterNodeMethod: { type: Function },
  48229. accordion: Boolean,
  48230. indent: {
  48231. type: Number,
  48232. default: 18
  48233. },
  48234. icon: { type: iconPropType }
  48235. });
  48236. var treeEmits = {
  48237. "check-change": (data, checked, indeterminate) => data && isBoolean(checked) && isBoolean(indeterminate),
  48238. "current-change": (data, node) => true,
  48239. "node-click": (data, node, nodeInstance, evt) => data && node && evt instanceof Event,
  48240. "node-contextmenu": (evt, data, node, nodeInstance) => evt instanceof Event && data && node,
  48241. "node-collapse": (data, node, nodeInstance) => data && node,
  48242. "node-expand": (data, node, nodeInstance) => data && node,
  48243. check: (data, checkedInfo) => data && checkedInfo,
  48244. "node-drag-start": (node, evt) => node && evt,
  48245. "node-drag-end": (draggingNode, dropNode, dropType, evt) => draggingNode && evt,
  48246. "node-drop": (draggingNode, dropNode, dropType, evt) => draggingNode && dropNode && evt,
  48247. "node-drag-leave": (draggingNode, oldDropNode, evt) => draggingNode && oldDropNode && evt,
  48248. "node-drag-enter": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt,
  48249. "node-drag-over": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt
  48250. };
  48251. //#endregion
  48252. //#region node_modules/element-plus/es/components/tree/src/model/util.mjs
  48253. var NODE_KEY = "$treeNodeId";
  48254. var markNodeData = function(node, data) {
  48255. if (!data || data["$treeNodeId"]) return;
  48256. Object.defineProperty(data, NODE_KEY, {
  48257. value: node.id,
  48258. enumerable: false,
  48259. configurable: false,
  48260. writable: false
  48261. });
  48262. };
  48263. var getNodeKey = (key, data) => data?.[key || "$treeNodeId"];
  48264. var handleCurrentChange = (store, emit, setCurrent) => {
  48265. const preCurrentNode = store.value.currentNode;
  48266. setCurrent();
  48267. const currentNode = store.value.currentNode;
  48268. if (preCurrentNode === currentNode) return;
  48269. emit("current-change", currentNode ? currentNode.data : null, currentNode);
  48270. };
  48271. //#endregion
  48272. //#region node_modules/element-plus/es/components/tree/src/model/node.mjs
  48273. var getChildState = (node) => {
  48274. let all = true;
  48275. let none = true;
  48276. let allWithoutDisable = true;
  48277. let isEffectivelyChecked = true;
  48278. for (let i = 0, j = node.length; i < j; i++) {
  48279. const n = node[i];
  48280. if (n.checked !== true || n.indeterminate) {
  48281. all = false;
  48282. if (!n.disabled) allWithoutDisable = false;
  48283. }
  48284. if (n.checked !== false || n.indeterminate) none = false;
  48285. if (!n.isEffectivelyChecked) isEffectivelyChecked = false;
  48286. }
  48287. return {
  48288. all,
  48289. none,
  48290. allWithoutDisable,
  48291. half: !all && !none,
  48292. isEffectivelyChecked
  48293. };
  48294. };
  48295. var reInitChecked = function(node) {
  48296. if (node.childNodes.length === 0 || node.loading) {
  48297. node.isEffectivelyChecked = node.disabled || node.checked;
  48298. return;
  48299. }
  48300. const { all, none, half, isEffectivelyChecked } = getChildState(node.childNodes);
  48301. node.isEffectivelyChecked = isEffectivelyChecked;
  48302. if (all) {
  48303. node.checked = true;
  48304. node.indeterminate = false;
  48305. } else if (half) {
  48306. node.checked = false;
  48307. node.indeterminate = true;
  48308. } else if (none) {
  48309. node.checked = false;
  48310. node.indeterminate = false;
  48311. }
  48312. const parent = node.parent;
  48313. if (!parent || parent.level === 0) return;
  48314. if (!node.store.checkStrictly) reInitChecked(parent);
  48315. };
  48316. var getPropertyFromData = function(node, prop) {
  48317. const props = node.store.props;
  48318. const data = node.data || {};
  48319. const config = props[prop];
  48320. if (isFunction$1(config)) return config(data, node);
  48321. else if (isString(config)) return data[config];
  48322. else if (isUndefined(config)) {
  48323. const dataProp = data[prop];
  48324. return isUndefined(dataProp) ? "" : dataProp;
  48325. }
  48326. };
  48327. var setCanFocus = function(childNodes, focus) {
  48328. childNodes.forEach((item) => {
  48329. item.canFocus = focus;
  48330. setCanFocus(item.childNodes, focus);
  48331. });
  48332. };
  48333. var nodeIdSeed = 0;
  48334. var Node$1 = class Node {
  48335. constructor(options) {
  48336. this.isLeafByUser = void 0;
  48337. this.isLeaf = void 0;
  48338. this.isEffectivelyChecked = false;
  48339. this.id = nodeIdSeed++;
  48340. this.text = null;
  48341. this.checked = false;
  48342. this.indeterminate = false;
  48343. this.data = null;
  48344. this.expanded = false;
  48345. this.parent = null;
  48346. this.visible = true;
  48347. this.isCurrent = false;
  48348. this.canFocus = false;
  48349. for (const name in options) if (hasOwn(options, name)) this[name] = options[name];
  48350. this.level = 0;
  48351. this.loaded = false;
  48352. this.childNodes = [];
  48353. this.loading = false;
  48354. if (this.parent) this.level = this.parent.level + 1;
  48355. }
  48356. initialize() {
  48357. const store = this.store;
  48358. if (!store) throw new Error("[Node]store is required!");
  48359. store.registerNode(this);
  48360. const props = store.props;
  48361. if (props && typeof props.isLeaf !== "undefined") {
  48362. const isLeaf = getPropertyFromData(this, "isLeaf");
  48363. if (isBoolean(isLeaf)) this.isLeafByUser = isLeaf;
  48364. }
  48365. if (store.lazy !== true && this.data) {
  48366. this.setData(this.data);
  48367. if (store.defaultExpandAll) {
  48368. this.expanded = true;
  48369. this.canFocus = true;
  48370. }
  48371. } else if (this.level > 0 && store.lazy && store.defaultExpandAll && !this.isLeafByUser) this.expand();
  48372. if (!isArray$1(this.data)) markNodeData(this, this.data);
  48373. if (!this.data) return;
  48374. const defaultExpandedKeys = store.defaultExpandedKeys;
  48375. const key = store.key;
  48376. if (key && !isNil(this.key) && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) this.expand(null, store.autoExpandParent);
  48377. if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
  48378. store.currentNode && (store.currentNode.isCurrent = false);
  48379. store.currentNode = this;
  48380. store.currentNode.isCurrent = true;
  48381. }
  48382. if (store.lazy) store._initDefaultCheckedNode(this);
  48383. this.updateLeafState();
  48384. if (this.level === 1 || this.parent?.expanded === true) this.canFocus = true;
  48385. }
  48386. setData(data) {
  48387. if (!isArray$1(data)) markNodeData(this, data);
  48388. this.data = data;
  48389. this.childNodes = [];
  48390. let children;
  48391. if (this.level === 0 && isArray$1(this.data)) children = this.data;
  48392. else children = getPropertyFromData(this, "children") || [];
  48393. for (let i = 0, j = children.length; i < j; i++) this.insertChild({ data: children[i] });
  48394. }
  48395. get label() {
  48396. return getPropertyFromData(this, "label");
  48397. }
  48398. get key() {
  48399. const nodeKey = this.store.key;
  48400. if (this.data) return this.data[nodeKey];
  48401. return null;
  48402. }
  48403. get disabled() {
  48404. return getPropertyFromData(this, "disabled");
  48405. }
  48406. get nextSibling() {
  48407. const parent = this.parent;
  48408. if (parent) {
  48409. const index = parent.childNodes.indexOf(this);
  48410. if (index > -1) return parent.childNodes[index + 1];
  48411. }
  48412. return null;
  48413. }
  48414. get previousSibling() {
  48415. const parent = this.parent;
  48416. if (parent) {
  48417. const index = parent.childNodes.indexOf(this);
  48418. if (index > -1) return index > 0 ? parent.childNodes[index - 1] : null;
  48419. }
  48420. return null;
  48421. }
  48422. contains(target, deep = true) {
  48423. return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));
  48424. }
  48425. remove() {
  48426. const parent = this.parent;
  48427. if (parent) parent.removeChild(this);
  48428. }
  48429. insertChild(child, index, batch) {
  48430. if (!child) throw new Error("InsertChild error: child is required.");
  48431. if (!(child instanceof Node)) {
  48432. if (!batch) {
  48433. const children = this.getChildren(true);
  48434. if (!children?.includes(child.data)) if (isUndefined(index) || index < 0) children?.push(child.data);
  48435. else children?.splice(index, 0, child.data);
  48436. }
  48437. Object.assign(child, {
  48438. parent: this,
  48439. store: this.store
  48440. });
  48441. child = reactive(new Node(child));
  48442. if (child instanceof Node) child.initialize();
  48443. }
  48444. child.level = this.level + 1;
  48445. if (isUndefined(index) || index < 0) this.childNodes.push(child);
  48446. else this.childNodes.splice(index, 0, child);
  48447. this.updateLeafState();
  48448. }
  48449. insertBefore(child, ref) {
  48450. let index;
  48451. if (ref) index = this.childNodes.indexOf(ref);
  48452. this.insertChild(child, index);
  48453. }
  48454. insertAfter(child, ref) {
  48455. let index;
  48456. if (ref) {
  48457. index = this.childNodes.indexOf(ref);
  48458. if (index !== -1) index += 1;
  48459. }
  48460. this.insertChild(child, index);
  48461. }
  48462. removeChild(child) {
  48463. const children = this.getChildren() || [];
  48464. const dataIndex = children.indexOf(child.data);
  48465. if (dataIndex > -1) children.splice(dataIndex, 1);
  48466. const index = this.childNodes.indexOf(child);
  48467. if (index > -1) {
  48468. this.store && this.store.deregisterNode(child);
  48469. child.parent = null;
  48470. this.childNodes.splice(index, 1);
  48471. }
  48472. this.updateLeafState();
  48473. }
  48474. removeChildByData(data) {
  48475. const targetNode = this.childNodes.find((child) => child.data === data);
  48476. if (targetNode) this.removeChild(targetNode);
  48477. }
  48478. expand(callback, expandParent) {
  48479. const done = () => {
  48480. if (expandParent) {
  48481. let parent = this.parent;
  48482. while (parent && parent.level > 0) {
  48483. parent.expanded = true;
  48484. parent = parent.parent;
  48485. }
  48486. }
  48487. this.expanded = true;
  48488. if (callback) callback();
  48489. setCanFocus(this.childNodes, true);
  48490. };
  48491. if (this.shouldLoadData()) this.loadData((data) => {
  48492. if (isArray$1(data)) {
  48493. if (this.checked) this.setChecked(true, true);
  48494. else if (!this.store.checkStrictly) reInitChecked(this);
  48495. done();
  48496. }
  48497. });
  48498. else done();
  48499. }
  48500. doCreateChildren(array, defaultProps = {}) {
  48501. array.forEach((item) => {
  48502. this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);
  48503. });
  48504. }
  48505. collapse() {
  48506. this.expanded = false;
  48507. setCanFocus(this.childNodes, false);
  48508. }
  48509. shouldLoadData() {
  48510. return Boolean(this.store.lazy === true && this.store.load && !this.loaded);
  48511. }
  48512. updateLeafState() {
  48513. if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
  48514. this.isLeaf = this.isLeafByUser;
  48515. this.isEffectivelyChecked = this.isLeaf && this.disabled;
  48516. return;
  48517. }
  48518. const childNodes = this.childNodes;
  48519. if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
  48520. this.isLeaf = !childNodes || childNodes.length === 0;
  48521. this.isEffectivelyChecked = this.isLeaf && this.disabled;
  48522. return;
  48523. }
  48524. this.isLeaf = false;
  48525. }
  48526. setChecked(value, deep, recursion, passValue) {
  48527. this.indeterminate = value === "half";
  48528. this.checked = value === true;
  48529. this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked);
  48530. if (this.store.checkStrictly) return;
  48531. if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
  48532. const handleDescendants = () => {
  48533. if (deep) {
  48534. const childNodes = this.childNodes;
  48535. for (let i = 0, j = childNodes.length; i < j; i++) {
  48536. const child = childNodes[i];
  48537. passValue = passValue || value !== false;
  48538. const isCheck = child.disabled && child.isLeaf ? child.checked : passValue;
  48539. child.setChecked(isCheck, deep, true, passValue);
  48540. }
  48541. const { half, all, isEffectivelyChecked } = getChildState(childNodes);
  48542. if (!all) {
  48543. this.checked = all;
  48544. this.indeterminate = half;
  48545. }
  48546. this.isEffectivelyChecked = !this.childNodes.length ? this.disabled || this.checked : isEffectivelyChecked;
  48547. }
  48548. };
  48549. if (this.shouldLoadData()) {
  48550. this.loadData(() => {
  48551. handleDescendants();
  48552. reInitChecked(this);
  48553. }, { checked: value !== false });
  48554. return;
  48555. } else handleDescendants();
  48556. }
  48557. const parent = this.parent;
  48558. if (!parent || parent.level === 0) return;
  48559. if (!recursion) reInitChecked(parent);
  48560. }
  48561. getChildren(forceInit = false) {
  48562. if (this.level === 0) return this.data;
  48563. const data = this.data;
  48564. if (!data) return null;
  48565. const props = this.store.props;
  48566. let children = "children";
  48567. if (props) children = props.children || "children";
  48568. if (isUndefined(data[children])) data[children] = null;
  48569. if (forceInit && !data[children]) data[children] = [];
  48570. return data[children];
  48571. }
  48572. updateChildren() {
  48573. const newData = this.getChildren() || [];
  48574. const oldData = this.childNodes.map((node) => node.data);
  48575. const newDataMap = {};
  48576. const newNodes = [];
  48577. newData.forEach((item, index) => {
  48578. const key = item[NODE_KEY];
  48579. if (!!key && oldData.some((data) => data?.["$treeNodeId"] === key)) newDataMap[key] = {
  48580. index,
  48581. data: item
  48582. };
  48583. else newNodes.push({
  48584. index,
  48585. data: item
  48586. });
  48587. });
  48588. if (!this.store.lazy) oldData.forEach((item) => {
  48589. if (!newDataMap[item?.["$treeNodeId"]]) this.removeChildByData(item);
  48590. });
  48591. newNodes.forEach(({ index, data }) => {
  48592. this.insertChild({ data }, index);
  48593. });
  48594. this.updateLeafState();
  48595. }
  48596. loadData(callback, defaultProps = {}) {
  48597. if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
  48598. this.loading = true;
  48599. const resolve = (children) => {
  48600. this.childNodes = [];
  48601. this.doCreateChildren(children, defaultProps);
  48602. this.loaded = true;
  48603. this.loading = false;
  48604. this.updateLeafState();
  48605. if (callback) callback.call(this, children);
  48606. };
  48607. const reject = () => {
  48608. this.loading = false;
  48609. };
  48610. this.store.load(this, resolve, reject);
  48611. } else if (callback) callback.call(this);
  48612. }
  48613. eachNode(callback) {
  48614. const arr = [this];
  48615. while (arr.length) {
  48616. const node = arr.shift();
  48617. arr.unshift(...node.childNodes);
  48618. callback(node);
  48619. }
  48620. }
  48621. reInitChecked() {
  48622. if (this.store.checkStrictly) return;
  48623. reInitChecked(this);
  48624. }
  48625. };
  48626. //#endregion
  48627. //#region node_modules/element-plus/es/components/tree/src/model/tree-store.mjs
  48628. var TreeStore = class {
  48629. constructor(options) {
  48630. this.lazy = false;
  48631. this.checkStrictly = false;
  48632. this.autoExpandParent = false;
  48633. this.defaultExpandAll = false;
  48634. this.checkDescendants = false;
  48635. this.currentNode = null;
  48636. this.currentNodeKey = null;
  48637. for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
  48638. this.nodesMap = {};
  48639. }
  48640. initialize() {
  48641. this.root = new Node$1({
  48642. data: this.data,
  48643. store: this
  48644. });
  48645. this.root.initialize();
  48646. if (this.lazy && this.load) {
  48647. const loadFn = this.load;
  48648. loadFn(this.root, (data) => {
  48649. this.root.doCreateChildren(data);
  48650. this._initDefaultCheckedNodes();
  48651. }, NOOP);
  48652. } else this._initDefaultCheckedNodes();
  48653. }
  48654. filter(value) {
  48655. const filterNodeMethod = this.filterNodeMethod;
  48656. const lazy = this.lazy;
  48657. const traverse = async function(node) {
  48658. const childNodes = node.root ? node.root.childNodes : node.childNodes;
  48659. for (const [index, child] of childNodes.entries()) {
  48660. child.visible = !!filterNodeMethod?.call(child, value, child.data, child);
  48661. if (index % 80 === 0 && index > 0) await nextTick();
  48662. await traverse(child);
  48663. }
  48664. if (!node.visible && childNodes.length) {
  48665. let allHidden = true;
  48666. allHidden = !childNodes.some((child) => child.visible);
  48667. if (node.root) node.root.visible = allHidden === false;
  48668. else node.visible = allHidden === false;
  48669. }
  48670. if (!value) return;
  48671. if (node.visible && !node.isLeaf) {
  48672. if (!lazy || node.loaded) node.expand();
  48673. }
  48674. };
  48675. traverse(this);
  48676. }
  48677. setData(newVal) {
  48678. if (newVal !== this.root.data) {
  48679. this.nodesMap = {};
  48680. this.root.setData(newVal);
  48681. this._initDefaultCheckedNodes();
  48682. this.setCurrentNodeKey(this.currentNodeKey);
  48683. } else this.root.updateChildren();
  48684. }
  48685. getNode(data) {
  48686. if (data instanceof Node$1) return data;
  48687. const key = isObject$2(data) ? getNodeKey(this.key, data) : data;
  48688. return this.nodesMap[key] || null;
  48689. }
  48690. insertBefore(data, refData) {
  48691. const refNode = this.getNode(refData);
  48692. refNode.parent?.insertBefore({ data }, refNode);
  48693. }
  48694. insertAfter(data, refData) {
  48695. const refNode = this.getNode(refData);
  48696. refNode.parent?.insertAfter({ data }, refNode);
  48697. }
  48698. remove(data) {
  48699. const node = this.getNode(data);
  48700. if (node && node.parent) {
  48701. if (node === this.currentNode) this.currentNode = null;
  48702. node.parent.removeChild(node);
  48703. }
  48704. }
  48705. append(data, parentData) {
  48706. const parentNode = !isPropAbsent(parentData) ? this.getNode(parentData) : this.root;
  48707. if (parentNode) parentNode.insertChild({ data });
  48708. }
  48709. _initDefaultCheckedNodes() {
  48710. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  48711. const nodesMap = this.nodesMap;
  48712. defaultCheckedKeys.forEach((checkedKey) => {
  48713. const node = nodesMap[checkedKey];
  48714. if (node) node.setChecked(true, !this.checkStrictly);
  48715. });
  48716. }
  48717. _initDefaultCheckedNode(node) {
  48718. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  48719. if (!isNil(node.key) && defaultCheckedKeys.includes(node.key)) node.setChecked(true, !this.checkStrictly);
  48720. }
  48721. setDefaultCheckedKey(newVal) {
  48722. if (newVal !== this.defaultCheckedKeys) {
  48723. this.defaultCheckedKeys = newVal;
  48724. this._initDefaultCheckedNodes();
  48725. }
  48726. }
  48727. registerNode(node) {
  48728. const key = this.key;
  48729. if (!node || !node.data) return;
  48730. if (!key) this.nodesMap[node.id] = node;
  48731. else {
  48732. const nodeKey = node.key;
  48733. if (!isNil(nodeKey)) this.nodesMap[nodeKey] = node;
  48734. }
  48735. }
  48736. deregisterNode(node) {
  48737. if (!this.key || !node || !node.data) return;
  48738. node.childNodes.forEach((child) => {
  48739. this.deregisterNode(child);
  48740. });
  48741. delete this.nodesMap[node.key];
  48742. }
  48743. getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
  48744. const checkedNodes = [];
  48745. const traverse = function(node) {
  48746. (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
  48747. if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) checkedNodes.push(child.data);
  48748. traverse(child);
  48749. });
  48750. };
  48751. traverse(this);
  48752. return checkedNodes;
  48753. }
  48754. getCheckedKeys(leafOnly = false) {
  48755. return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
  48756. }
  48757. getHalfCheckedNodes() {
  48758. const nodes = [];
  48759. const traverse = function(node) {
  48760. (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
  48761. if (child.indeterminate) nodes.push(child.data);
  48762. traverse(child);
  48763. });
  48764. };
  48765. traverse(this);
  48766. return nodes;
  48767. }
  48768. getHalfCheckedKeys() {
  48769. return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
  48770. }
  48771. _getAllNodes() {
  48772. const allNodes = [];
  48773. const nodesMap = this.nodesMap;
  48774. for (const nodeKey in nodesMap) if (hasOwn(nodesMap, nodeKey)) allNodes.push(nodesMap[nodeKey]);
  48775. return allNodes;
  48776. }
  48777. updateChildren(key, data) {
  48778. const node = this.nodesMap[key];
  48779. if (!node) return;
  48780. const childNodes = node.childNodes;
  48781. for (let i = childNodes.length - 1; i >= 0; i--) {
  48782. const child = childNodes[i];
  48783. this.remove(child.data);
  48784. }
  48785. for (let i = 0, j = data.length; i < j; i++) {
  48786. const child = data[i];
  48787. this.append(child, node.data);
  48788. }
  48789. }
  48790. _setCheckedKeys(key, leafOnly = false, checkedKeys) {
  48791. const allNodes = this._getAllNodes().sort((a, b) => a.level - b.level);
  48792. const cache = Object.create(null);
  48793. const keys = Object.keys(checkedKeys);
  48794. allNodes.forEach((node) => node.setChecked(false, false));
  48795. const cacheCheckedChild = (node) => {
  48796. node.childNodes.forEach((child) => {
  48797. cache[child.data[key]] = true;
  48798. if (child.childNodes?.length) cacheCheckedChild(child);
  48799. });
  48800. };
  48801. for (let i = 0, j = allNodes.length; i < j; i++) {
  48802. const node = allNodes[i];
  48803. const nodeKey = node.data[key].toString();
  48804. if (!keys.includes(nodeKey)) {
  48805. if (node.checked && !cache[nodeKey]) node.setChecked(false, false);
  48806. continue;
  48807. }
  48808. if (node.childNodes.length) cacheCheckedChild(node);
  48809. if (node.isLeaf || this.checkStrictly) {
  48810. node.setChecked(true, false);
  48811. continue;
  48812. }
  48813. node.setChecked(true, true);
  48814. if (leafOnly) {
  48815. node.setChecked(false, false, true);
  48816. const traverse = function(node) {
  48817. node.childNodes.forEach((child) => {
  48818. if (!child.isLeaf) child.setChecked(false, false, true);
  48819. traverse(child);
  48820. });
  48821. node.reInitChecked();
  48822. };
  48823. traverse(node);
  48824. }
  48825. }
  48826. }
  48827. setCheckedNodes(array, leafOnly = false) {
  48828. const key = this.key;
  48829. const checkedKeys = {};
  48830. array.forEach((item) => {
  48831. checkedKeys[(item || {})[key]] = true;
  48832. });
  48833. this._setCheckedKeys(key, leafOnly, checkedKeys);
  48834. }
  48835. setCheckedKeys(keys, leafOnly = false) {
  48836. this.defaultCheckedKeys = keys;
  48837. const key = this.key;
  48838. const checkedKeys = {};
  48839. keys.forEach((key) => {
  48840. checkedKeys[key] = true;
  48841. });
  48842. this._setCheckedKeys(key, leafOnly, checkedKeys);
  48843. }
  48844. setDefaultExpandedKeys(keys) {
  48845. keys = keys || [];
  48846. this.defaultExpandedKeys = keys;
  48847. keys.forEach((key) => {
  48848. const node = this.getNode(key);
  48849. if (node) node.expand(null, this.autoExpandParent);
  48850. });
  48851. }
  48852. setChecked(data, checked, deep) {
  48853. const node = this.getNode(data);
  48854. if (node) node.setChecked(!!checked, deep);
  48855. }
  48856. getCurrentNode() {
  48857. return this.currentNode;
  48858. }
  48859. setCurrentNode(currentNode) {
  48860. const prevCurrentNode = this.currentNode;
  48861. if (prevCurrentNode) prevCurrentNode.isCurrent = false;
  48862. this.currentNode = currentNode;
  48863. this.currentNode.isCurrent = true;
  48864. }
  48865. setUserCurrentNode(node, shouldAutoExpandParent = true) {
  48866. const key = node[this.key];
  48867. const currNode = this.nodesMap[key];
  48868. this.setCurrentNode(currNode);
  48869. if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
  48870. }
  48871. setCurrentNodeKey(key, shouldAutoExpandParent = true) {
  48872. this.currentNodeKey = key;
  48873. if (isPropAbsent(key)) {
  48874. this.currentNode && (this.currentNode.isCurrent = false);
  48875. this.currentNode = null;
  48876. return;
  48877. }
  48878. const node = this.getNode(key);
  48879. if (node) {
  48880. this.setCurrentNode(node);
  48881. if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
  48882. }
  48883. }
  48884. };
  48885. //#endregion
  48886. //#region node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs
  48887. function useNodeExpandEventBroadcast(props) {
  48888. const parentNodeMap = inject(TREE_NODE_MAP_INJECTION_KEY, null);
  48889. let currentNodeMap = {
  48890. treeNodeExpand: (node) => {
  48891. if (props.node !== node) props.node?.collapse();
  48892. },
  48893. children: /* @__PURE__ */ new Set()
  48894. };
  48895. if (parentNodeMap) parentNodeMap.children.add(currentNodeMap);
  48896. onBeforeUnmount(() => {
  48897. if (parentNodeMap) parentNodeMap.children.delete(currentNodeMap);
  48898. currentNodeMap = null;
  48899. });
  48900. provide(TREE_NODE_MAP_INJECTION_KEY, currentNodeMap);
  48901. return { broadcastExpanded: (node) => {
  48902. if (!props.accordion) return;
  48903. for (const childNode of currentNodeMap.children) childNode.treeNodeExpand(node);
  48904. } };
  48905. }
  48906. //#endregion
  48907. //#region node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs
  48908. var dragEventsKey = Symbol("dragEvents");
  48909. function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
  48910. const ns = useNamespace("tree");
  48911. const dragState = ref({
  48912. showDropIndicator: false,
  48913. draggingNode: null,
  48914. dropNode: null,
  48915. allowDrop: true,
  48916. dropType: null
  48917. });
  48918. const treeNodeDragStart = ({ event, treeNode }) => {
  48919. if (!event.dataTransfer) return;
  48920. if (isFunction$1(props.allowDrag) && !props.allowDrag(treeNode.node)) {
  48921. event.preventDefault();
  48922. return false;
  48923. }
  48924. event.dataTransfer.effectAllowed = "move";
  48925. try {
  48926. event.dataTransfer.setData("text/plain", "");
  48927. } catch {}
  48928. dragState.value.draggingNode = treeNode;
  48929. ctx.emit("node-drag-start", treeNode.node, event);
  48930. };
  48931. const treeNodeDragOver = ({ event, treeNode }) => {
  48932. if (!event.dataTransfer) return;
  48933. const dropNode = treeNode;
  48934. const oldDropNode = dragState.value.dropNode;
  48935. if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) removeClass(oldDropNode.$el, ns.is("drop-inner"));
  48936. const draggingNode = dragState.value.draggingNode;
  48937. if (!draggingNode || !dropNode) return;
  48938. let dropPrev = true;
  48939. let dropInner = true;
  48940. let dropNext = true;
  48941. let userAllowDropInner = true;
  48942. if (isFunction$1(props.allowDrop)) {
  48943. dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
  48944. userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
  48945. dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
  48946. }
  48947. event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
  48948. if ((dropPrev || dropInner || dropNext) && oldDropNode?.node.id !== dropNode.node.id) {
  48949. if (oldDropNode) ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
  48950. ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
  48951. }
  48952. if (dropPrev || dropInner || dropNext) dragState.value.dropNode = dropNode;
  48953. else dragState.value.dropNode = null;
  48954. if (dropNode.node.nextSibling === draggingNode.node) dropNext = false;
  48955. if (dropNode.node.previousSibling === draggingNode.node) dropPrev = false;
  48956. if (dropNode.node.contains(draggingNode.node, false)) dropInner = false;
  48957. if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
  48958. dropPrev = false;
  48959. dropInner = false;
  48960. dropNext = false;
  48961. }
  48962. const dropEl = dropNode.$el;
  48963. const targetPosition = dropEl.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect();
  48964. const treePosition = el$.value.getBoundingClientRect();
  48965. const treeScrollTop = el$.value.scrollTop;
  48966. let dropType;
  48967. const prevPercent = dropPrev ? dropInner ? .25 : dropNext ? .45 : 1 : Number.NEGATIVE_INFINITY;
  48968. const nextPercent = dropNext ? dropInner ? .75 : dropPrev ? .55 : 0 : Number.POSITIVE_INFINITY;
  48969. let indicatorTop = -9999;
  48970. const distance = event.clientY - targetPosition.top;
  48971. if (distance < targetPosition.height * prevPercent) dropType = "before";
  48972. else if (distance > targetPosition.height * nextPercent) dropType = "after";
  48973. else if (dropInner) dropType = "inner";
  48974. else dropType = "none";
  48975. const iconPosition = dropEl.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect();
  48976. const dropIndicator = dropIndicator$.value;
  48977. if (dropType === "before") indicatorTop = iconPosition.top - treePosition.top + treeScrollTop;
  48978. else if (dropType === "after") indicatorTop = iconPosition.bottom - treePosition.top + treeScrollTop;
  48979. dropIndicator.style.top = `${indicatorTop}px`;
  48980. dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
  48981. if (dropType === "inner") addClass(dropEl, ns.is("drop-inner"));
  48982. else removeClass(dropEl, ns.is("drop-inner"));
  48983. dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
  48984. dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
  48985. dragState.value.dropType = dropType;
  48986. ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
  48987. };
  48988. const treeNodeDragEnd = (event) => {
  48989. const { draggingNode, dropType, dropNode } = dragState.value;
  48990. event.preventDefault();
  48991. if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
  48992. if (draggingNode?.node.data && dropNode) {
  48993. const draggingNodeCopy = { data: draggingNode.node.data };
  48994. if (dropType !== "none") draggingNode.node.remove();
  48995. if (dropType === "before") dropNode.node.parent?.insertBefore(draggingNodeCopy, dropNode.node);
  48996. else if (dropType === "after") dropNode.node.parent?.insertAfter(draggingNodeCopy, dropNode.node);
  48997. else if (dropType === "inner") dropNode.node.insertChild(draggingNodeCopy);
  48998. if (dropType !== "none") {
  48999. store.value.registerNode(draggingNodeCopy);
  49000. if (store.value.key) draggingNode.node.eachNode((node) => {
  49001. store.value.nodesMap[node.data[store.value.key]]?.setChecked(node.checked, !store.value.checkStrictly);
  49002. });
  49003. }
  49004. removeClass(dropNode.$el, ns.is("drop-inner"));
  49005. ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
  49006. if (dropType !== "none") ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
  49007. }
  49008. if (draggingNode && !dropNode) ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
  49009. dragState.value.showDropIndicator = false;
  49010. dragState.value.draggingNode = null;
  49011. dragState.value.dropNode = null;
  49012. dragState.value.allowDrop = true;
  49013. };
  49014. provide(dragEventsKey, {
  49015. treeNodeDragStart,
  49016. treeNodeDragOver,
  49017. treeNodeDragEnd
  49018. });
  49019. return { dragState };
  49020. }
  49021. //#endregion
  49022. //#region node_modules/element-plus/es/components/tree/src/tree-node.vue_vue_type_script_lang.mjs
  49023. var tree_node_vue_vue_type_script_lang_default = defineComponent({
  49024. name: "ElTreeNode",
  49025. components: {
  49026. ElCollapseTransition,
  49027. ElCheckbox,
  49028. NodeContent: defineComponent({
  49029. name: "ElTreeNodeContent",
  49030. props: {
  49031. node: {
  49032. type: Object,
  49033. required: true
  49034. },
  49035. renderContent: Function
  49036. },
  49037. setup(props) {
  49038. const ns = useNamespace("tree");
  49039. const nodeInstance = inject(NODE_INSTANCE_INJECTION_KEY);
  49040. const tree = inject(ROOT_TREE_INJECTION_KEY);
  49041. return () => {
  49042. const node = props.node;
  49043. const { data, store } = node;
  49044. return props.renderContent ? props.renderContent(h$1, {
  49045. _self: nodeInstance,
  49046. node,
  49047. data,
  49048. store
  49049. }) : renderSlot(tree.ctx.slots, "default", {
  49050. node,
  49051. data
  49052. }, () => [h$1(ElText, {
  49053. tag: "span",
  49054. truncated: true,
  49055. class: ns.be("node", "label")
  49056. }, () => [node.label])]);
  49057. };
  49058. }
  49059. }),
  49060. ElIcon,
  49061. Loading: loading_default
  49062. },
  49063. props: {
  49064. node: {
  49065. type: Node$1,
  49066. default: () => ({})
  49067. },
  49068. props: {
  49069. type: Object,
  49070. default: () => ({})
  49071. },
  49072. accordion: Boolean,
  49073. renderContent: Function,
  49074. renderAfterExpand: Boolean,
  49075. showCheckbox: Boolean
  49076. },
  49077. emits: ["node-expand"],
  49078. setup(props, ctx) {
  49079. const ns = useNamespace("tree");
  49080. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  49081. const tree = inject(ROOT_TREE_INJECTION_KEY);
  49082. const expanded = ref(false);
  49083. const childNodeRendered = ref(false);
  49084. const oldChecked = ref();
  49085. const oldIndeterminate = ref();
  49086. const node$ = ref();
  49087. const dragEvents = inject(dragEventsKey);
  49088. const instance = getCurrentInstance();
  49089. provide(NODE_INSTANCE_INJECTION_KEY, instance);
  49090. if (!tree) debugWarn("Tree", "Can not find node's tree.");
  49091. if (props.node.expanded) {
  49092. expanded.value = true;
  49093. childNodeRendered.value = true;
  49094. }
  49095. const childrenKey = tree.props.props["children"] || "children";
  49096. watch(() => {
  49097. const children = props.node.data?.[childrenKey];
  49098. return children && [...children];
  49099. }, () => {
  49100. props.node.updateChildren();
  49101. });
  49102. watch(() => props.node.indeterminate, (val) => {
  49103. handleSelectChange(props.node.checked, val);
  49104. });
  49105. watch(() => props.node.checked, (val) => {
  49106. handleSelectChange(val, props.node.indeterminate);
  49107. });
  49108. watch(() => props.node.childNodes.length, () => props.node.reInitChecked());
  49109. watch(() => props.node.expanded, (val) => {
  49110. nextTick(() => expanded.value = val);
  49111. if (val) childNodeRendered.value = true;
  49112. });
  49113. const getNodeKey$1 = (node) => {
  49114. return tree.props.nodeKey ? getNodeKey(tree.props.nodeKey, node.data) : node.id;
  49115. };
  49116. const getNodeClass = (node) => {
  49117. const nodeClassFunc = props.props.class;
  49118. if (!nodeClassFunc) return {};
  49119. let className;
  49120. if (isFunction$1(nodeClassFunc)) {
  49121. const { data } = node;
  49122. className = nodeClassFunc(data, node);
  49123. } else className = nodeClassFunc;
  49124. if (isString(className)) return { [className]: true };
  49125. else return className;
  49126. };
  49127. const handleSelectChange = (checked, indeterminate) => {
  49128. if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) tree.ctx.emit("check-change", props.node.data, checked, indeterminate);
  49129. oldChecked.value = checked;
  49130. oldIndeterminate.value = indeterminate;
  49131. };
  49132. const handleClick = (e) => {
  49133. handleCurrentChange(tree.store, tree.ctx.emit, () => {
  49134. if (tree?.props?.nodeKey) {
  49135. const curNodeKey = getNodeKey$1(props.node);
  49136. tree.store.value.setCurrentNodeKey(curNodeKey);
  49137. } else tree.store.value.setCurrentNode(props.node);
  49138. });
  49139. tree.currentNode.value = props.node;
  49140. if (tree.props.expandOnClickNode) handleExpandIconClick();
  49141. if ((tree.props.checkOnClickNode || props.node.isLeaf && tree.props.checkOnClickLeaf && props.showCheckbox) && !props.node.disabled) handleCheckChange(!props.node.checked);
  49142. tree.ctx.emit("node-click", props.node.data, props.node, instance, e);
  49143. };
  49144. const handleContextMenu = (event) => {
  49145. if (tree.instance.vnode.props?.["onNodeContextmenu"]) {
  49146. event.stopPropagation();
  49147. event.preventDefault();
  49148. }
  49149. tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
  49150. };
  49151. const handleExpandIconClick = () => {
  49152. if (props.node.isLeaf) return;
  49153. if (expanded.value) {
  49154. tree.ctx.emit("node-collapse", props.node.data, props.node, instance);
  49155. props.node.collapse();
  49156. } else props.node.expand(() => {
  49157. ctx.emit("node-expand", props.node.data, props.node, instance);
  49158. });
  49159. };
  49160. const handleCheckChange = (value) => {
  49161. const checkStrictly = tree?.props.checkStrictly;
  49162. const childNodes = props.node.childNodes;
  49163. if (!checkStrictly && childNodes.length) value = childNodes.some((node) => !node.isEffectivelyChecked);
  49164. props.node.setChecked(value, !checkStrictly);
  49165. nextTick(() => {
  49166. const store = tree.store.value;
  49167. tree.ctx.emit("check", props.node.data, {
  49168. checkedNodes: store.getCheckedNodes(),
  49169. checkedKeys: store.getCheckedKeys(),
  49170. halfCheckedNodes: store.getHalfCheckedNodes(),
  49171. halfCheckedKeys: store.getHalfCheckedKeys()
  49172. });
  49173. });
  49174. };
  49175. const handleChildNodeExpand = (nodeData, node, instance) => {
  49176. broadcastExpanded(node);
  49177. tree.ctx.emit("node-expand", nodeData, node, instance);
  49178. };
  49179. const handleDragStart = (event) => {
  49180. if (!tree.props.draggable) return;
  49181. dragEvents.treeNodeDragStart({
  49182. event,
  49183. treeNode: props
  49184. });
  49185. };
  49186. const handleDragOver = (event) => {
  49187. event.preventDefault();
  49188. if (!tree.props.draggable) return;
  49189. dragEvents.treeNodeDragOver({
  49190. event,
  49191. treeNode: {
  49192. $el: node$.value,
  49193. node: props.node
  49194. }
  49195. });
  49196. };
  49197. const handleDrop = (event) => {
  49198. event.preventDefault();
  49199. };
  49200. const handleDragEnd = (event) => {
  49201. if (!tree.props.draggable) return;
  49202. dragEvents.treeNodeDragEnd(event);
  49203. };
  49204. return {
  49205. ns,
  49206. node$,
  49207. tree,
  49208. expanded,
  49209. childNodeRendered,
  49210. oldChecked,
  49211. oldIndeterminate,
  49212. getNodeKey: getNodeKey$1,
  49213. getNodeClass,
  49214. handleSelectChange,
  49215. handleClick,
  49216. handleContextMenu,
  49217. handleExpandIconClick,
  49218. handleCheckChange,
  49219. handleChildNodeExpand,
  49220. handleDragStart,
  49221. handleDragOver,
  49222. handleDrop,
  49223. handleDragEnd,
  49224. CaretRight: caret_right_default
  49225. };
  49226. }
  49227. });
  49228. //#endregion
  49229. //#region node_modules/element-plus/es/components/tree/src/tree-node.mjs
  49230. var _hoisted_1$12 = [
  49231. "aria-expanded",
  49232. "aria-disabled",
  49233. "aria-checked",
  49234. "draggable",
  49235. "data-key"
  49236. ];
  49237. var _hoisted_2$7 = ["aria-expanded"];
  49238. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  49239. const _component_el_icon = resolveComponent("el-icon");
  49240. const _component_el_checkbox = resolveComponent("el-checkbox");
  49241. const _component_loading = resolveComponent("loading");
  49242. const _component_node_content = resolveComponent("node-content");
  49243. const _component_el_tree_node = resolveComponent("el-tree-node");
  49244. const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
  49245. return withDirectives((openBlock(), createElementBlock("div", {
  49246. ref: "node$",
  49247. class: normalizeClass([
  49248. _ctx.ns.b("node"),
  49249. _ctx.ns.is("expanded", _ctx.expanded),
  49250. _ctx.ns.is("current", _ctx.node.isCurrent),
  49251. _ctx.ns.is("hidden", !_ctx.node.visible),
  49252. _ctx.ns.is("focusable", !_ctx.node.disabled),
  49253. _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
  49254. _ctx.getNodeClass(_ctx.node)
  49255. ]),
  49256. role: "treeitem",
  49257. tabindex: "-1",
  49258. "aria-expanded": _ctx.expanded,
  49259. "aria-disabled": _ctx.node.disabled,
  49260. "aria-checked": _ctx.node.checked,
  49261. draggable: _ctx.tree.props.draggable,
  49262. "data-key": _ctx.getNodeKey(_ctx.node),
  49263. onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
  49264. onContextmenu: _cache[3] || (_cache[3] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),
  49265. onDragstart: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])),
  49266. onDragover: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])),
  49267. onDragend: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])),
  49268. onDrop: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"]))
  49269. }, [createBaseVNode("div", {
  49270. class: normalizeClass(_ctx.ns.be("node", "content")),
  49271. style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
  49272. }, [
  49273. _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
  49274. key: 0,
  49275. class: normalizeClass([
  49276. _ctx.ns.be("node", "expand-icon"),
  49277. _ctx.ns.is("leaf", _ctx.node.isLeaf),
  49278. { expanded: !_ctx.node.isLeaf && _ctx.expanded }
  49279. ]),
  49280. onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
  49281. }, {
  49282. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))]),
  49283. _: 1
  49284. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  49285. _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
  49286. key: 1,
  49287. "model-value": _ctx.node.checked,
  49288. indeterminate: _ctx.node.indeterminate,
  49289. disabled: !!_ctx.node.disabled,
  49290. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
  49291. onChange: _ctx.handleCheckChange
  49292. }, null, 8, [
  49293. "model-value",
  49294. "indeterminate",
  49295. "disabled",
  49296. "onChange"
  49297. ])) : createCommentVNode("v-if", true),
  49298. _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
  49299. key: 2,
  49300. class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
  49301. }, {
  49302. default: withCtx(() => [createVNode(_component_loading)]),
  49303. _: 1
  49304. }, 8, ["class"])) : createCommentVNode("v-if", true),
  49305. createVNode(_component_node_content, {
  49306. node: _ctx.node,
  49307. "render-content": _ctx.renderContent
  49308. }, null, 8, ["node", "render-content"])
  49309. ], 6), createVNode(_component_el_collapse_transition, null, {
  49310. default: withCtx(() => [!_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
  49311. key: 0,
  49312. class: normalizeClass(_ctx.ns.be("node", "children")),
  49313. role: "group",
  49314. "aria-expanded": _ctx.expanded,
  49315. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  49316. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
  49317. return openBlock(), createBlock(_component_el_tree_node, {
  49318. key: _ctx.getNodeKey(child),
  49319. "render-content": _ctx.renderContent,
  49320. "render-after-expand": _ctx.renderAfterExpand,
  49321. "show-checkbox": _ctx.showCheckbox,
  49322. node: child,
  49323. accordion: _ctx.accordion,
  49324. props: _ctx.props,
  49325. onNodeExpand: _ctx.handleChildNodeExpand
  49326. }, null, 8, [
  49327. "render-content",
  49328. "render-after-expand",
  49329. "show-checkbox",
  49330. "node",
  49331. "accordion",
  49332. "props",
  49333. "onNodeExpand"
  49334. ]);
  49335. }), 128))], 10, _hoisted_2$7)), [[vShow, _ctx.expanded]]) : createCommentVNode("v-if", true)]),
  49336. _: 1
  49337. })], 42, _hoisted_1$12)), [[vShow, _ctx.node.visible]]);
  49338. }
  49339. var tree_node_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(tree_node_vue_vue_type_script_lang_default, [["render", _sfc_render$2]]);
  49340. //#endregion
  49341. //#region node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs
  49342. function useKeydown({ el$ }, store) {
  49343. const ns = useNamespace("tree");
  49344. onMounted(() => {
  49345. initTabIndex();
  49346. });
  49347. onUpdated(() => {
  49348. el$.value?.querySelectorAll("input[type=checkbox]").forEach((checkbox) => {
  49349. checkbox.setAttribute("tabindex", "-1");
  49350. });
  49351. });
  49352. function canNodeFocus(treeItems, nextIndex) {
  49353. const currentNode = store.value.getNode(treeItems[nextIndex].dataset.key);
  49354. return currentNode.canFocus && currentNode.visible && (currentNode.parent?.expanded || currentNode.parent?.level === 0);
  49355. }
  49356. const handleKeydown = (ev) => {
  49357. const currentItem = ev.target;
  49358. if (!currentItem.className.includes(ns.b("node"))) return;
  49359. const code = getEventCode(ev);
  49360. const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
  49361. const currentIndex = treeItems.indexOf(currentItem);
  49362. let nextIndex;
  49363. if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
  49364. ev.preventDefault();
  49365. if (code === EVENT_CODE.up) {
  49366. nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.length - 1;
  49367. const startIndex = nextIndex;
  49368. while (true) {
  49369. if (canNodeFocus(treeItems, nextIndex)) break;
  49370. nextIndex--;
  49371. if (nextIndex === startIndex) {
  49372. nextIndex = -1;
  49373. break;
  49374. }
  49375. if (nextIndex < 0) nextIndex = treeItems.length - 1;
  49376. }
  49377. } else {
  49378. nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.length - 1 ? currentIndex + 1 : 0;
  49379. const startIndex = nextIndex;
  49380. while (true) {
  49381. if (canNodeFocus(treeItems, nextIndex)) break;
  49382. nextIndex++;
  49383. if (nextIndex === startIndex) {
  49384. nextIndex = -1;
  49385. break;
  49386. }
  49387. if (nextIndex >= treeItems.length) nextIndex = 0;
  49388. }
  49389. }
  49390. nextIndex !== -1 && treeItems[nextIndex].focus();
  49391. }
  49392. if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
  49393. ev.preventDefault();
  49394. currentItem.click();
  49395. }
  49396. const hasInput = currentItem.querySelector("[type=\"checkbox\"]");
  49397. if ([
  49398. EVENT_CODE.enter,
  49399. EVENT_CODE.numpadEnter,
  49400. EVENT_CODE.space
  49401. ].includes(code) && hasInput) {
  49402. ev.preventDefault();
  49403. hasInput.click();
  49404. }
  49405. };
  49406. useEventListener(el$, "keydown", handleKeydown);
  49407. const initTabIndex = () => {
  49408. if (!el$.value) return;
  49409. const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
  49410. Array.from(el$.value.querySelectorAll("input[type=checkbox]")).forEach((checkbox) => {
  49411. checkbox.setAttribute("tabindex", "-1");
  49412. });
  49413. const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`);
  49414. if (checkedItem.length) {
  49415. checkedItem[0].setAttribute("tabindex", "0");
  49416. return;
  49417. }
  49418. treeItems[0]?.setAttribute("tabindex", "0");
  49419. };
  49420. }
  49421. //#endregion
  49422. //#region node_modules/element-plus/es/components/tree/src/tree.vue_vue_type_script_lang.mjs
  49423. var tree_vue_vue_type_script_lang_default = defineComponent({
  49424. name: "ElTree",
  49425. components: { ElTreeNode: tree_node_default$1 },
  49426. props: treeProps,
  49427. emits: treeEmits,
  49428. setup(props, ctx) {
  49429. const { t } = useLocale();
  49430. const ns = useNamespace("tree");
  49431. const store = ref(new TreeStore({
  49432. key: props.nodeKey,
  49433. data: props.data,
  49434. lazy: props.lazy,
  49435. props: props.props,
  49436. load: props.load,
  49437. currentNodeKey: props.currentNodeKey,
  49438. checkStrictly: props.checkStrictly,
  49439. checkDescendants: props.checkDescendants,
  49440. defaultCheckedKeys: props.defaultCheckedKeys,
  49441. defaultExpandedKeys: props.defaultExpandedKeys,
  49442. autoExpandParent: props.autoExpandParent,
  49443. defaultExpandAll: props.defaultExpandAll,
  49444. filterNodeMethod: props.filterNodeMethod
  49445. }));
  49446. store.value.initialize();
  49447. const root = ref(store.value.root);
  49448. const currentNode = ref(null);
  49449. const el$ = ref(null);
  49450. const dropIndicator$ = ref(null);
  49451. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  49452. const { dragState } = useDragNodeHandler({
  49453. props,
  49454. ctx,
  49455. el$,
  49456. dropIndicator$,
  49457. store
  49458. });
  49459. useKeydown({ el$ }, store);
  49460. const instance = getCurrentInstance();
  49461. const isSelectTree = computed(() => {
  49462. let parent = instance?.parent;
  49463. while (parent) {
  49464. if (parent.type.name === "ElTreeSelect") return true;
  49465. parent = parent.parent;
  49466. }
  49467. return false;
  49468. });
  49469. const isEmpty = computed(() => {
  49470. const { childNodes } = root.value;
  49471. return (!childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible)) && !isSelectTree.value;
  49472. });
  49473. watch(() => props.currentNodeKey, (newVal) => {
  49474. store.value.setCurrentNodeKey(newVal ?? null);
  49475. });
  49476. watch(() => props.defaultCheckedKeys, (newVal, oldVal) => {
  49477. if (isEqual$1(newVal, oldVal)) return;
  49478. store.value.setDefaultCheckedKey(newVal ?? []);
  49479. });
  49480. watch(() => props.defaultExpandedKeys, (newVal) => {
  49481. store.value.setDefaultExpandedKeys(newVal ?? []);
  49482. });
  49483. watch(() => props.data, (newVal) => {
  49484. store.value.setData(newVal);
  49485. }, { deep: true });
  49486. watch(() => props.checkStrictly, (newVal) => {
  49487. store.value.checkStrictly = newVal;
  49488. });
  49489. const filter = (value) => {
  49490. if (!props.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter");
  49491. store.value.filter(value);
  49492. };
  49493. const getNodeKey$1 = (node) => {
  49494. return props.nodeKey ? getNodeKey(props.nodeKey, node.data) : node.id;
  49495. };
  49496. const requireNodeKey = (methodName) => {
  49497. if (!props.nodeKey) throw new Error(`[Tree] nodeKey is required in ${methodName}`);
  49498. };
  49499. const getNodePath = (data) => {
  49500. requireNodeKey("getNodePath");
  49501. const node = store.value.getNode(data);
  49502. if (!node) return [];
  49503. const path = [node.data];
  49504. let parent = node.parent;
  49505. while (parent && parent !== root.value) {
  49506. path.push(parent.data);
  49507. parent = parent.parent;
  49508. }
  49509. return path.reverse();
  49510. };
  49511. const getCheckedNodes = (leafOnly, includeHalfChecked) => {
  49512. return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
  49513. };
  49514. const getCheckedKeys = (leafOnly) => {
  49515. return store.value.getCheckedKeys(leafOnly);
  49516. };
  49517. const getCurrentNode = () => {
  49518. const currentNode = store.value.getCurrentNode();
  49519. return currentNode ? currentNode.data : null;
  49520. };
  49521. const getCurrentKey = () => {
  49522. requireNodeKey("getCurrentKey");
  49523. const currentNode = getCurrentNode();
  49524. return currentNode ? currentNode[props.nodeKey] : null;
  49525. };
  49526. const setCheckedNodes = (nodes, leafOnly) => {
  49527. requireNodeKey("setCheckedNodes");
  49528. store.value.setCheckedNodes(nodes, leafOnly);
  49529. };
  49530. const setCheckedKeys = (keys, leafOnly) => {
  49531. requireNodeKey("setCheckedKeys");
  49532. store.value.setCheckedKeys(keys, leafOnly);
  49533. };
  49534. const setChecked = (data, checked, deep) => {
  49535. store.value.setChecked(data, checked, deep);
  49536. };
  49537. const getHalfCheckedNodes = () => {
  49538. return store.value.getHalfCheckedNodes();
  49539. };
  49540. const getHalfCheckedKeys = () => {
  49541. return store.value.getHalfCheckedKeys();
  49542. };
  49543. const setCurrentNode = (node, shouldAutoExpandParent = true) => {
  49544. requireNodeKey("setCurrentNode");
  49545. handleCurrentChange(store, ctx.emit, () => {
  49546. broadcastExpanded(node);
  49547. store.value.setUserCurrentNode(node, shouldAutoExpandParent);
  49548. });
  49549. };
  49550. const setCurrentKey = (key = null, shouldAutoExpandParent = true) => {
  49551. requireNodeKey("setCurrentKey");
  49552. handleCurrentChange(store, ctx.emit, () => {
  49553. broadcastExpanded();
  49554. store.value.setCurrentNodeKey(key, shouldAutoExpandParent);
  49555. });
  49556. };
  49557. const getNode = (data) => {
  49558. return store.value.getNode(data);
  49559. };
  49560. const remove = (data) => {
  49561. store.value.remove(data);
  49562. };
  49563. const append = (data, parentNode) => {
  49564. store.value.append(data, parentNode);
  49565. };
  49566. const insertBefore = (data, refNode) => {
  49567. store.value.insertBefore(data, refNode);
  49568. };
  49569. const insertAfter = (data, refNode) => {
  49570. store.value.insertAfter(data, refNode);
  49571. };
  49572. const handleNodeExpand = (nodeData, node, instance) => {
  49573. broadcastExpanded(node);
  49574. ctx.emit("node-expand", nodeData, node, instance);
  49575. };
  49576. const updateKeyChildren = (key, data) => {
  49577. requireNodeKey("updateKeyChildren");
  49578. store.value.updateChildren(key, data);
  49579. };
  49580. provide(ROOT_TREE_INJECTION_KEY, {
  49581. ctx,
  49582. props,
  49583. store,
  49584. root,
  49585. currentNode,
  49586. instance
  49587. });
  49588. provide(formItemContextKey, void 0);
  49589. return {
  49590. ns,
  49591. store,
  49592. root,
  49593. currentNode,
  49594. dragState,
  49595. el$,
  49596. dropIndicator$,
  49597. isEmpty,
  49598. filter,
  49599. getNodeKey: getNodeKey$1,
  49600. getNodePath,
  49601. getCheckedNodes,
  49602. getCheckedKeys,
  49603. getCurrentNode,
  49604. getCurrentKey,
  49605. setCheckedNodes,
  49606. setCheckedKeys,
  49607. setChecked,
  49608. getHalfCheckedNodes,
  49609. getHalfCheckedKeys,
  49610. setCurrentNode,
  49611. setCurrentKey,
  49612. t,
  49613. getNode,
  49614. remove,
  49615. append,
  49616. insertBefore,
  49617. insertAfter,
  49618. handleNodeExpand,
  49619. updateKeyChildren
  49620. };
  49621. }
  49622. });
  49623. //#endregion
  49624. //#region node_modules/element-plus/es/components/tree/src/tree2.mjs
  49625. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  49626. const _component_el_tree_node = resolveComponent("el-tree-node");
  49627. return openBlock(), createElementBlock("div", {
  49628. ref: "el$",
  49629. class: normalizeClass([
  49630. _ctx.ns.b(),
  49631. _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
  49632. _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
  49633. _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
  49634. { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
  49635. ]),
  49636. role: "tree"
  49637. }, [
  49638. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
  49639. return openBlock(), createBlock(_component_el_tree_node, {
  49640. key: _ctx.getNodeKey(child),
  49641. node: child,
  49642. props: _ctx.props,
  49643. accordion: _ctx.accordion,
  49644. "render-after-expand": _ctx.renderAfterExpand,
  49645. "show-checkbox": _ctx.showCheckbox,
  49646. "render-content": _ctx.renderContent,
  49647. onNodeExpand: _ctx.handleNodeExpand
  49648. }, null, 8, [
  49649. "node",
  49650. "props",
  49651. "accordion",
  49652. "render-after-expand",
  49653. "show-checkbox",
  49654. "render-content",
  49655. "onNodeExpand"
  49656. ]);
  49657. }), 128)),
  49658. _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  49659. key: 0,
  49660. class: normalizeClass(_ctx.ns.e("empty-block"))
  49661. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, toDisplayString(_ctx.emptyText ?? _ctx.t("el.tree.emptyText")), 3)])], 2)) : createCommentVNode("v-if", true),
  49662. withDirectives(createBaseVNode("div", {
  49663. ref: "dropIndicator$",
  49664. class: normalizeClass(_ctx.ns.e("drop-indicator"))
  49665. }, null, 2), [[vShow, _ctx.dragState.showDropIndicator]])
  49666. ], 2);
  49667. }
  49668. //#endregion
  49669. //#region node_modules/element-plus/es/components/tree/index.mjs
  49670. var ElTree = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(tree_vue_vue_type_script_lang_default, [["render", _sfc_render$1]]));
  49671. //#endregion
  49672. //#region node_modules/element-plus/es/components/tree-select/src/select.mjs
  49673. var useSelect = (props, { attrs, emit }, { select, tree, key }) => {
  49674. const ns = useNamespace("tree-select");
  49675. watch(() => props.data, () => {
  49676. if (props.filterable) nextTick(() => {
  49677. tree.value?.filter(select.value?.states.inputValue);
  49678. });
  49679. }, { flush: "post" });
  49680. const focusLastNode = (listNode) => {
  49681. const lastNode = listNode.at(-1);
  49682. if (lastNode.expanded && lastNode.childNodes.at(-1)) focusLastNode([lastNode.childNodes.at(-1)]);
  49683. else {
  49684. (tree.value.el$?.querySelector(`[data-key="${listNode.at(-1).key}"]`))?.focus({ preventScroll: true });
  49685. return;
  49686. }
  49687. };
  49688. onMounted(() => {
  49689. useEventListener(() => select.value?.$el, "keydown", async (evt) => {
  49690. const code = getEventCode(evt);
  49691. const { dropdownMenuVisible } = select.value;
  49692. if ([EVENT_CODE.down, EVENT_CODE.up].includes(code) && dropdownMenuVisible) {
  49693. await nextTick();
  49694. setTimeout(() => {
  49695. if (EVENT_CODE.up === code) {
  49696. const listNode = tree.value.store.root.childNodes;
  49697. focusLastNode(listNode);
  49698. return;
  49699. }
  49700. select.value.optionsArray[select.value.states.hoveringIndex].$el?.parentNode?.parentNode?.focus({ preventScroll: true });
  49701. });
  49702. }
  49703. }, { capture: true });
  49704. });
  49705. return {
  49706. ...pick(toRefs(props), Object.keys(ElSelect.props)),
  49707. ...attrs,
  49708. class: computed(() => attrs.class),
  49709. style: computed(() => attrs.style),
  49710. "onUpdate:modelValue": (value) => emit(UPDATE_MODEL_EVENT, value),
  49711. valueKey: key,
  49712. popperClass: computed(() => {
  49713. const classes = [ns.e("popper")];
  49714. if (props.popperClass) classes.push(props.popperClass);
  49715. return classes.join(" ");
  49716. }),
  49717. filterMethod: (keyword = "") => {
  49718. if (props.filterMethod) props.filterMethod(keyword);
  49719. else if (props.remoteMethod) props.remoteMethod(keyword);
  49720. else tree.value?.filter(keyword);
  49721. }
  49722. };
  49723. };
  49724. //#endregion
  49725. //#region node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs
  49726. var component = defineComponent({
  49727. extends: ElOption,
  49728. setup(props, ctx) {
  49729. const result = ElOption.setup(props, ctx);
  49730. delete result.selectOptionClick;
  49731. const vm = getCurrentInstance().proxy;
  49732. nextTick(() => {
  49733. if (!result.select.states.cachedOptions.get(vm.value)) result.select.onOptionCreate(vm);
  49734. });
  49735. watch(() => ctx.attrs.visible, (val) => {
  49736. nextTick(() => {
  49737. result.states.visible = val;
  49738. });
  49739. }, { immediate: true });
  49740. return result;
  49741. },
  49742. methods: { selectOptionClick() {
  49743. this.$el.parentElement.click();
  49744. } }
  49745. });
  49746. //#endregion
  49747. //#region node_modules/element-plus/es/components/tree-select/src/utils.mjs
  49748. function isValidValue(val) {
  49749. return val || val === 0;
  49750. }
  49751. function isValidArray(val) {
  49752. return isArray$1(val) && val.length;
  49753. }
  49754. function toValidArray(val) {
  49755. return isArray$1(val) ? val : isValidValue(val) ? [val] : [];
  49756. }
  49757. function treeFind(treeData, findCallback, getChildren, resultCallback, parent) {
  49758. for (let i = 0; i < treeData.length; i++) {
  49759. const data = treeData[i];
  49760. if (findCallback(data, i, treeData, parent)) return resultCallback ? resultCallback(data, i, treeData, parent) : data;
  49761. else {
  49762. const children = getChildren(data);
  49763. if (isValidArray(children)) {
  49764. const find = treeFind(children, findCallback, getChildren, resultCallback, data);
  49765. if (find) return find;
  49766. }
  49767. }
  49768. }
  49769. }
  49770. function treeEach(treeData, callback, getChildren, parent) {
  49771. for (let i = 0; i < treeData.length; i++) {
  49772. const data = treeData[i];
  49773. callback(data, i, treeData, parent);
  49774. const children = getChildren(data);
  49775. if (isValidArray(children)) treeEach(children, callback, getChildren, data);
  49776. }
  49777. }
  49778. //#endregion
  49779. //#region node_modules/element-plus/es/components/tree-select/src/tree.mjs
  49780. var useTree$1 = (props, { attrs, slots, emit }, { select, tree, key }) => {
  49781. watch([() => props.modelValue, tree], () => {
  49782. if (props.showCheckbox) nextTick(() => {
  49783. const treeInstance = tree.value;
  49784. if (treeInstance && !isEqual$1(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) treeInstance.setCheckedKeys(toValidArray(props.modelValue));
  49785. });
  49786. }, {
  49787. immediate: true,
  49788. deep: true
  49789. });
  49790. const propsMap = computed(() => ({
  49791. value: key.value,
  49792. label: "label",
  49793. children: "children",
  49794. disabled: "disabled",
  49795. isLeaf: "isLeaf",
  49796. ...props.props
  49797. }));
  49798. const getNodeValByProp = (prop, data) => {
  49799. const propVal = propsMap.value[prop];
  49800. if (isFunction$1(propVal)) return propVal(data, tree.value?.getNode(getNodeValByProp("value", data)));
  49801. else return data[propVal];
  49802. };
  49803. const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => {
  49804. return treeFind(props.data || [], (data) => getNodeValByProp("value", data) === value, (data) => getNodeValByProp("children", data), (data, index, array, parent) => parent && getNodeValByProp("value", parent));
  49805. }).filter((item) => isValidValue(item));
  49806. const cacheOptions = computed(() => {
  49807. if (!props.renderAfterExpand && !props.lazy) return [];
  49808. const options = [];
  49809. treeEach(props.data.concat(props.cacheData), (node) => {
  49810. const value = getNodeValByProp("value", node);
  49811. options.push({
  49812. value,
  49813. currentLabel: getNodeValByProp("label", node),
  49814. isDisabled: getNodeValByProp("disabled", node)
  49815. });
  49816. }, (data) => getNodeValByProp("children", data));
  49817. return options;
  49818. });
  49819. const getChildCheckedKeys = () => {
  49820. return tree.value?.getCheckedKeys().filter((checkedKey) => {
  49821. const node = tree.value?.getNode(checkedKey);
  49822. return !isNil(node) && isEmpty(node.childNodes);
  49823. });
  49824. };
  49825. const emitChange = (val) => {
  49826. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  49827. };
  49828. function update(val) {
  49829. emit(UPDATE_MODEL_EVENT, val);
  49830. emitChange(val);
  49831. }
  49832. return {
  49833. ...pick(toRefs(props), Object.keys(ElTree.props)),
  49834. ...attrs,
  49835. nodeKey: key,
  49836. expandOnClickNode: computed(() => {
  49837. return !props.checkStrictly && props.expandOnClickNode;
  49838. }),
  49839. defaultExpandedKeys: computed(() => {
  49840. return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys;
  49841. }),
  49842. renderContent: (h, { node, data, store }) => {
  49843. return h(component, {
  49844. value: getNodeValByProp("value", data),
  49845. label: getNodeValByProp("label", data),
  49846. disabled: getNodeValByProp("disabled", data),
  49847. visible: node.visible
  49848. }, props.renderContent ? () => props.renderContent(h, {
  49849. node,
  49850. data,
  49851. store
  49852. }) : slots.default ? () => slots.default({
  49853. node,
  49854. data,
  49855. store
  49856. }) : void 0);
  49857. },
  49858. filterNodeMethod: (value, data, node) => {
  49859. if (props.filterNodeMethod) return props.filterNodeMethod(value, data, node);
  49860. if (!value) return true;
  49861. return new RegExp(escapeStringRegexp(value), "i").test(getNodeValByProp("label", data) || "");
  49862. },
  49863. onNodeClick: (data, node, e) => {
  49864. attrs.onNodeClick?.(data, node, e);
  49865. if (props.showCheckbox && props.checkOnClickNode) return;
  49866. if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {
  49867. if (!getNodeValByProp("disabled", data)) {
  49868. const option = select.value?.states.options.get(getNodeValByProp("value", data));
  49869. select.value?.handleOptionSelect(option);
  49870. }
  49871. } else if (props.expandOnClickNode) e.proxy.handleExpandIconClick();
  49872. },
  49873. onCheck: (data, params) => {
  49874. if (!props.showCheckbox) return;
  49875. const dataValue = getNodeValByProp("value", data);
  49876. const dataMap = {};
  49877. treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
  49878. const uncachedCheckedKeys = params.checkedKeys;
  49879. const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item)) : [];
  49880. const checkedKeys = cachedKeys.concat(uncachedCheckedKeys);
  49881. if (props.checkStrictly) update(props.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0);
  49882. else if (props.multiple) {
  49883. const childKeys = getChildCheckedKeys();
  49884. update(cachedKeys.concat(childKeys));
  49885. } else {
  49886. const firstLeaf = treeFind([data], (data) => !isValidArray(getNodeValByProp("children", data)) && !getNodeValByProp("disabled", data), (data) => getNodeValByProp("children", data));
  49887. const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0;
  49888. const hasCheckedChild = isValidValue(props.modelValue) && !!treeFind([data], (data) => getNodeValByProp("value", data) === props.modelValue, (data) => getNodeValByProp("children", data));
  49889. update(firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey);
  49890. }
  49891. nextTick(() => {
  49892. const checkedKeys = toValidArray(props.modelValue);
  49893. tree.value.setCheckedKeys(checkedKeys);
  49894. attrs.onCheck?.(data, {
  49895. checkedKeys: tree.value.getCheckedKeys(),
  49896. checkedNodes: tree.value.getCheckedNodes(),
  49897. halfCheckedKeys: tree.value.getHalfCheckedKeys(),
  49898. halfCheckedNodes: tree.value.getHalfCheckedNodes()
  49899. });
  49900. });
  49901. select.value?.focus();
  49902. },
  49903. onNodeExpand: (data, node, e) => {
  49904. attrs.onNodeExpand?.(data, node, e);
  49905. nextTick(() => {
  49906. if (!props.checkStrictly && props.lazy && props.multiple && node.checked) {
  49907. const dataMap = {};
  49908. const uncachedCheckedKeys = tree.value.getCheckedKeys();
  49909. treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
  49910. const cachedKeys = toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item));
  49911. const childKeys = getChildCheckedKeys();
  49912. update(cachedKeys.concat(childKeys));
  49913. }
  49914. });
  49915. },
  49916. cacheOptions
  49917. };
  49918. };
  49919. //#endregion
  49920. //#region node_modules/element-plus/es/components/tree-select/src/cache-options.mjs
  49921. var cache_options_default = defineComponent({
  49922. props: { data: {
  49923. type: Array,
  49924. default: () => []
  49925. } },
  49926. setup(props) {
  49927. const select = inject(selectKey);
  49928. watch(() => props.data, () => {
  49929. props.data.forEach((item) => {
  49930. if (!select.states.cachedOptions.has(item.value)) select.states.cachedOptions.set(item.value, item);
  49931. });
  49932. const inputs = select.selectRef?.querySelectorAll("input") || [];
  49933. if (isClient && !Array.from(inputs).includes(document.activeElement)) select.setSelected();
  49934. }, {
  49935. flush: "post",
  49936. immediate: true
  49937. });
  49938. return () => void 0;
  49939. }
  49940. });
  49941. //#endregion
  49942. //#region node_modules/element-plus/es/components/tree-select/index.mjs
  49943. var ElTreeSelect = withInstall(defineComponent({
  49944. name: "ElTreeSelect",
  49945. inheritAttrs: false,
  49946. props: {
  49947. ...selectProps,
  49948. ...treeProps,
  49949. cacheData: {
  49950. type: Array,
  49951. default: () => []
  49952. }
  49953. },
  49954. setup(props, context) {
  49955. const { slots, expose, emit, attrs } = context;
  49956. const childAttrs = {
  49957. ...attrs,
  49958. onChange: void 0
  49959. };
  49960. const select = ref();
  49961. const tree = ref();
  49962. const key = computed(() => props.nodeKey || props.valueKey || "value");
  49963. const selectProps = useSelect(props, {
  49964. attrs,
  49965. emit
  49966. }, {
  49967. select,
  49968. tree,
  49969. key
  49970. });
  49971. const { cacheOptions, ...treeProps } = useTree$1(props, {
  49972. attrs: childAttrs,
  49973. slots,
  49974. emit
  49975. }, {
  49976. select,
  49977. tree,
  49978. key
  49979. });
  49980. const methods = reactive({});
  49981. expose(methods);
  49982. onMounted(() => {
  49983. Object.assign(methods, {
  49984. ...pick(tree.value, [
  49985. "filter",
  49986. "updateKeyChildren",
  49987. "getCheckedNodes",
  49988. "setCheckedNodes",
  49989. "getCheckedKeys",
  49990. "setCheckedKeys",
  49991. "setChecked",
  49992. "getHalfCheckedNodes",
  49993. "getHalfCheckedKeys",
  49994. "getCurrentKey",
  49995. "getCurrentNode",
  49996. "setCurrentKey",
  49997. "setCurrentNode",
  49998. "getNode",
  49999. "remove",
  50000. "append",
  50001. "insertBefore",
  50002. "insertAfter"
  50003. ]),
  50004. ...pick(select.value, [
  50005. "focus",
  50006. "blur",
  50007. "selectedLabel"
  50008. ]),
  50009. treeRef: tree.value,
  50010. selectRef: select.value
  50011. });
  50012. });
  50013. return () => h$1(
  50014. ElSelect,
  50015. /**
  50016. * 1. The `props` is processed into `Refs`, but `v-bind` and
  50017. * render function props cannot read `Refs`, so use `reactive`
  50018. * unwrap the `Refs` and keep reactive.
  50019. * 2. The keyword `ref` requires `Ref`, but `reactive` broke it,
  50020. * so use function.
  50021. */
  50022. reactive({
  50023. ...selectProps,
  50024. ref: (ref) => select.value = ref
  50025. }),
  50026. {
  50027. ...slots,
  50028. default: () => [h$1(cache_options_default, { data: cacheOptions.value }), h$1(ElTree, reactive({
  50029. ...treeProps,
  50030. ref: (ref) => tree.value = ref
  50031. }))]
  50032. }
  50033. );
  50034. }
  50035. }));
  50036. //#endregion
  50037. //#region node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs
  50038. var ROOT_TREE_INJECTION_KEY$1 = Symbol();
  50039. var EMPTY_NODE = {
  50040. key: -1,
  50041. level: -1,
  50042. data: {}
  50043. };
  50044. var TreeOptionsEnum = /* @__PURE__ */ function(TreeOptionsEnum) {
  50045. TreeOptionsEnum["KEY"] = "id";
  50046. TreeOptionsEnum["LABEL"] = "label";
  50047. TreeOptionsEnum["CHILDREN"] = "children";
  50048. TreeOptionsEnum["DISABLED"] = "disabled";
  50049. TreeOptionsEnum["CLASS"] = "";
  50050. return TreeOptionsEnum;
  50051. }({});
  50052. var SetOperationEnum = /* @__PURE__ */ function(SetOperationEnum) {
  50053. SetOperationEnum["ADD"] = "add";
  50054. SetOperationEnum["DELETE"] = "delete";
  50055. return SetOperationEnum;
  50056. }({});
  50057. var itemSize = {
  50058. type: Number,
  50059. default: 26
  50060. };
  50061. /**
  50062. * @deprecated Removed after 3.0.0, Use `TreeProps` instead.
  50063. */
  50064. var treeProps$1 = buildProps({
  50065. data: {
  50066. type: definePropType(Array),
  50067. default: () => mutable([])
  50068. },
  50069. emptyText: { type: String },
  50070. height: {
  50071. type: Number,
  50072. default: 200
  50073. },
  50074. props: {
  50075. type: definePropType(Object),
  50076. default: () => mutable({
  50077. children: TreeOptionsEnum.CHILDREN,
  50078. label: TreeOptionsEnum.LABEL,
  50079. disabled: TreeOptionsEnum.DISABLED,
  50080. value: TreeOptionsEnum.KEY,
  50081. class: TreeOptionsEnum.CLASS
  50082. })
  50083. },
  50084. highlightCurrent: Boolean,
  50085. showCheckbox: Boolean,
  50086. defaultCheckedKeys: {
  50087. type: definePropType(Array),
  50088. default: () => mutable([])
  50089. },
  50090. checkStrictly: Boolean,
  50091. defaultExpandedKeys: {
  50092. type: definePropType(Array),
  50093. default: () => mutable([])
  50094. },
  50095. indent: {
  50096. type: Number,
  50097. default: 16
  50098. },
  50099. itemSize,
  50100. icon: { type: iconPropType },
  50101. expandOnClickNode: {
  50102. type: Boolean,
  50103. default: true
  50104. },
  50105. checkOnClickNode: Boolean,
  50106. checkOnClickLeaf: {
  50107. type: Boolean,
  50108. default: true
  50109. },
  50110. currentNodeKey: { type: definePropType([String, Number]) },
  50111. accordion: Boolean,
  50112. filterMethod: { type: definePropType(Function) },
  50113. perfMode: {
  50114. type: Boolean,
  50115. default: true
  50116. },
  50117. scrollbarAlwaysOn: Boolean
  50118. });
  50119. /**
  50120. * @deprecated Removed after 3.0.0, Use `TreeNodeProps` instead.
  50121. */
  50122. var treeNodeProps = buildProps({
  50123. node: {
  50124. type: definePropType(Object),
  50125. default: () => mutable(EMPTY_NODE)
  50126. },
  50127. expanded: Boolean,
  50128. checked: Boolean,
  50129. indeterminate: Boolean,
  50130. showCheckbox: Boolean,
  50131. disabled: Boolean,
  50132. current: Boolean,
  50133. hiddenExpandIcon: Boolean,
  50134. itemSize
  50135. });
  50136. var treeNodeContentProps = buildProps({ node: {
  50137. type: definePropType(Object),
  50138. required: true
  50139. } });
  50140. var NODE_CLICK = "node-click";
  50141. var NODE_DROP = "node-drop";
  50142. var NODE_EXPAND = "node-expand";
  50143. var NODE_COLLAPSE = "node-collapse";
  50144. var CURRENT_CHANGE = "current-change";
  50145. var NODE_CHECK = "check";
  50146. var NODE_CHECK_CHANGE = "check-change";
  50147. var NODE_CONTEXTMENU = "node-contextmenu";
  50148. var treeEmits$1 = {
  50149. [NODE_CLICK]: (data, node, e) => data && node && e,
  50150. [NODE_DROP]: (data, node, e) => data && node && e,
  50151. [NODE_EXPAND]: (data, node) => data && node,
  50152. [NODE_COLLAPSE]: (data, node) => data && node,
  50153. [CURRENT_CHANGE]: (data, node) => data && node,
  50154. [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo,
  50155. [NODE_CHECK_CHANGE]: (data, checked) => data && isBoolean(checked),
  50156. [NODE_CONTEXTMENU]: (evt, data, node) => evt && data && node
  50157. };
  50158. var treeNodeEmits = {
  50159. click: (node, e) => !!(node && e),
  50160. drop: (node, e) => !!(node && e),
  50161. toggle: (node) => !!node,
  50162. check: (node, checked) => node && isBoolean(checked)
  50163. };
  50164. //#endregion
  50165. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs
  50166. function useCheck(props, tree) {
  50167. const checkedKeys = ref(/* @__PURE__ */ new Set());
  50168. const indeterminateKeys = ref(/* @__PURE__ */ new Set());
  50169. const { emit } = getCurrentInstance();
  50170. watch([() => tree.value, () => props.defaultCheckedKeys], () => {
  50171. return nextTick(() => {
  50172. _setCheckedKeys(props.defaultCheckedKeys);
  50173. });
  50174. }, { immediate: true });
  50175. const updateCheckedKeys = () => {
  50176. if (!tree.value || !props.showCheckbox || props.checkStrictly) return;
  50177. const { levelTreeNodeMap, maxLevel } = tree.value;
  50178. const checkedKeySet = checkedKeys.value;
  50179. const indeterminateKeySet = /* @__PURE__ */ new Set();
  50180. for (let level = maxLevel; level >= 1; --level) {
  50181. const nodes = levelTreeNodeMap.get(level);
  50182. if (!nodes) continue;
  50183. nodes.forEach((node) => {
  50184. const children = node.children;
  50185. let isEffectivelyChecked = !node.isLeaf || node.disabled || checkedKeySet.has(node.key);
  50186. if (children) {
  50187. let allChecked = true;
  50188. let hasChecked = false;
  50189. for (const childNode of children) {
  50190. const key = childNode.key;
  50191. if (!childNode.isEffectivelyChecked) isEffectivelyChecked = false;
  50192. if (checkedKeySet.has(key)) hasChecked = true;
  50193. else if (indeterminateKeySet.has(key)) {
  50194. allChecked = false;
  50195. hasChecked = true;
  50196. break;
  50197. } else allChecked = false;
  50198. }
  50199. if (allChecked) checkedKeySet.add(node.key);
  50200. else if (hasChecked) {
  50201. indeterminateKeySet.add(node.key);
  50202. checkedKeySet.delete(node.key);
  50203. } else {
  50204. checkedKeySet.delete(node.key);
  50205. indeterminateKeySet.delete(node.key);
  50206. }
  50207. }
  50208. node.isEffectivelyChecked = isEffectivelyChecked;
  50209. });
  50210. }
  50211. indeterminateKeys.value = indeterminateKeySet;
  50212. };
  50213. const isChecked = (node) => checkedKeys.value.has(node.key);
  50214. const isIndeterminate = (node) => indeterminateKeys.value.has(node.key);
  50215. const toggleCheckbox = (node, isChecked, nodeClick = true, immediateUpdate = true) => {
  50216. const checkedKeySet = checkedKeys.value;
  50217. const children = node.children;
  50218. if (!props.checkStrictly && nodeClick && children?.length) isChecked = children.some((node) => !node.isEffectivelyChecked);
  50219. const toggle = (node, checked) => {
  50220. checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE](node.key);
  50221. const children = node.children;
  50222. if (!props.checkStrictly && children) children.forEach((childNode) => {
  50223. if (!childNode.disabled || childNode.children) toggle(childNode, checked);
  50224. });
  50225. };
  50226. toggle(node, isChecked);
  50227. if (immediateUpdate) updateCheckedKeys();
  50228. if (nodeClick) afterNodeCheck(node, isChecked);
  50229. };
  50230. const afterNodeCheck = (node, checked) => {
  50231. const { checkedNodes, checkedKeys } = getChecked();
  50232. const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked();
  50233. emit(NODE_CHECK, node.data, {
  50234. checkedKeys,
  50235. checkedNodes,
  50236. halfCheckedKeys,
  50237. halfCheckedNodes
  50238. });
  50239. emit(NODE_CHECK_CHANGE, node.data, checked);
  50240. };
  50241. function getCheckedKeys(leafOnly = false) {
  50242. return getChecked(leafOnly).checkedKeys;
  50243. }
  50244. function getCheckedNodes(leafOnly = false) {
  50245. return getChecked(leafOnly).checkedNodes;
  50246. }
  50247. function getHalfCheckedKeys() {
  50248. return getHalfChecked().halfCheckedKeys;
  50249. }
  50250. function getHalfCheckedNodes() {
  50251. return getHalfChecked().halfCheckedNodes;
  50252. }
  50253. function getChecked(leafOnly = false) {
  50254. const checkedNodes = [];
  50255. const keys = [];
  50256. if (tree?.value && props.showCheckbox) {
  50257. const { treeNodeMap } = tree.value;
  50258. checkedKeys.value.forEach((key) => {
  50259. const node = treeNodeMap.get(key);
  50260. if (node && (!leafOnly || leafOnly && node.isLeaf)) {
  50261. keys.push(key);
  50262. checkedNodes.push(node.data);
  50263. }
  50264. });
  50265. }
  50266. return {
  50267. checkedKeys: keys,
  50268. checkedNodes
  50269. };
  50270. }
  50271. function getHalfChecked() {
  50272. const halfCheckedNodes = [];
  50273. const halfCheckedKeys = [];
  50274. if (tree?.value && props.showCheckbox) {
  50275. const { treeNodeMap } = tree.value;
  50276. indeterminateKeys.value.forEach((key) => {
  50277. const node = treeNodeMap.get(key);
  50278. if (node) {
  50279. halfCheckedKeys.push(key);
  50280. halfCheckedNodes.push(node.data);
  50281. }
  50282. });
  50283. }
  50284. return {
  50285. halfCheckedNodes,
  50286. halfCheckedKeys
  50287. };
  50288. }
  50289. function setCheckedKeys(keys) {
  50290. checkedKeys.value.clear();
  50291. indeterminateKeys.value.clear();
  50292. nextTick(() => {
  50293. _setCheckedKeys(keys);
  50294. });
  50295. }
  50296. function setChecked(key, isChecked) {
  50297. if (tree?.value && props.showCheckbox) {
  50298. const node = tree.value.treeNodeMap.get(key);
  50299. if (node) toggleCheckbox(node, isChecked, false);
  50300. }
  50301. }
  50302. function _setCheckedKeys(keys) {
  50303. if (tree?.value) {
  50304. const { treeNodeMap } = tree.value;
  50305. if (props.showCheckbox && treeNodeMap && keys?.length > 0) {
  50306. for (const key of keys) {
  50307. const node = treeNodeMap.get(key);
  50308. if (node && !isChecked(node)) toggleCheckbox(node, true, false, false);
  50309. }
  50310. updateCheckedKeys();
  50311. }
  50312. }
  50313. }
  50314. return {
  50315. updateCheckedKeys,
  50316. toggleCheckbox,
  50317. isChecked,
  50318. isIndeterminate,
  50319. getCheckedKeys,
  50320. getCheckedNodes,
  50321. getHalfCheckedKeys,
  50322. getHalfCheckedNodes,
  50323. setChecked,
  50324. setCheckedKeys
  50325. };
  50326. }
  50327. //#endregion
  50328. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs
  50329. function useFilter(props, tree) {
  50330. const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([]));
  50331. const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([]));
  50332. const filterable = computed(() => {
  50333. return isFunction$1(props.filterMethod);
  50334. });
  50335. function doFilter(query) {
  50336. if (!filterable.value) return;
  50337. const expandKeySet = /* @__PURE__ */ new Set();
  50338. const hiddenExpandIconKeys = hiddenExpandIconKeySet.value;
  50339. const hiddenKeys = hiddenNodeKeySet.value;
  50340. const family = [];
  50341. const nodes = tree.value?.treeNodes || [];
  50342. const filter = props.filterMethod;
  50343. hiddenKeys.clear();
  50344. function traverse(nodes) {
  50345. nodes.forEach((node) => {
  50346. family.push(node);
  50347. if (filter?.(query, node.data, node)) family.forEach((member) => {
  50348. expandKeySet.add(member.key);
  50349. member.expanded = true;
  50350. });
  50351. else {
  50352. node.expanded = false;
  50353. if (node.isLeaf) hiddenKeys.add(node.key);
  50354. }
  50355. const children = node.children;
  50356. if (children) traverse(children);
  50357. if (!node.isLeaf) {
  50358. if (!expandKeySet.has(node.key)) hiddenKeys.add(node.key);
  50359. else if (children) {
  50360. let allHidden = true;
  50361. for (const childNode of children) if (!hiddenKeys.has(childNode.key)) {
  50362. allHidden = false;
  50363. break;
  50364. }
  50365. if (allHidden) hiddenExpandIconKeys.add(node.key);
  50366. else hiddenExpandIconKeys.delete(node.key);
  50367. }
  50368. }
  50369. family.pop();
  50370. });
  50371. }
  50372. traverse(nodes);
  50373. return expandKeySet;
  50374. }
  50375. function isForceHiddenExpandIcon(node) {
  50376. return hiddenExpandIconKeySet.value.has(node.key);
  50377. }
  50378. return {
  50379. hiddenExpandIconKeySet,
  50380. hiddenNodeKeySet,
  50381. doFilter,
  50382. isForceHiddenExpandIcon
  50383. };
  50384. }
  50385. //#endregion
  50386. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs
  50387. function useTree(props, emit) {
  50388. const expandedKeySet = ref(/* @__PURE__ */ new Set());
  50389. const currentKey = ref();
  50390. const tree = shallowRef();
  50391. const listRef = ref();
  50392. const { isIndeterminate, isChecked, toggleCheckbox, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys } = useCheck(props, tree);
  50393. const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree);
  50394. const valueKey = computed(() => {
  50395. return props.props?.value || TreeOptionsEnum.KEY;
  50396. });
  50397. const childrenKey = computed(() => {
  50398. return props.props?.children || TreeOptionsEnum.CHILDREN;
  50399. });
  50400. const disabledKey = computed(() => {
  50401. return props.props?.disabled || TreeOptionsEnum.DISABLED;
  50402. });
  50403. const labelKey = computed(() => {
  50404. return props.props?.label || TreeOptionsEnum.LABEL;
  50405. });
  50406. const flattenTree = computed(() => {
  50407. const expandedKeys = expandedKeySet.value;
  50408. const hiddenKeys = hiddenNodeKeySet.value;
  50409. const flattenNodes = [];
  50410. const nodes = tree.value?.treeNodes || [];
  50411. const stack = [];
  50412. for (let i = nodes.length - 1; i >= 0; --i) stack.push(nodes[i]);
  50413. while (stack.length) {
  50414. const node = stack.pop();
  50415. if (hiddenKeys.has(node.key)) continue;
  50416. flattenNodes.push(node);
  50417. if (node.children && expandedKeys.has(node.key)) for (let i = node.children.length - 1; i >= 0; --i) stack.push(node.children[i]);
  50418. }
  50419. return flattenNodes;
  50420. });
  50421. const isNotEmpty = computed(() => {
  50422. return flattenTree.value.length > 0;
  50423. });
  50424. function createTree(data) {
  50425. const treeNodeMap = /* @__PURE__ */ new Map();
  50426. const levelTreeNodeMap = /* @__PURE__ */ new Map();
  50427. let maxLevel = 1;
  50428. function traverse(nodes, level = 1, parent = void 0) {
  50429. const siblings = [];
  50430. for (const rawNode of nodes) {
  50431. const value = getKey(rawNode);
  50432. const node = {
  50433. level,
  50434. key: value,
  50435. data: rawNode
  50436. };
  50437. node.label = getLabel(rawNode);
  50438. node.parent = parent;
  50439. const children = getChildren(rawNode);
  50440. node.disabled = getDisabled(rawNode);
  50441. node.isLeaf = !children || children.length === 0;
  50442. node.expanded = expandedKeySet.value.has(value);
  50443. if (children && children.length) node.children = traverse(children, level + 1, node);
  50444. siblings.push(node);
  50445. treeNodeMap.set(value, node);
  50446. if (!levelTreeNodeMap.has(level)) levelTreeNodeMap.set(level, []);
  50447. levelTreeNodeMap.get(level)?.push(node);
  50448. }
  50449. if (level > maxLevel) maxLevel = level;
  50450. return siblings;
  50451. }
  50452. const treeNodes = traverse(data);
  50453. return {
  50454. treeNodeMap,
  50455. levelTreeNodeMap,
  50456. maxLevel,
  50457. treeNodes
  50458. };
  50459. }
  50460. function filter(query) {
  50461. const keys = doFilter(query);
  50462. if (keys) expandedKeySet.value = keys;
  50463. }
  50464. function getChildren(node) {
  50465. return node[childrenKey.value];
  50466. }
  50467. function getKey(node) {
  50468. if (!node) return "";
  50469. return node[valueKey.value];
  50470. }
  50471. function getDisabled(node) {
  50472. return node[disabledKey.value];
  50473. }
  50474. function getLabel(node) {
  50475. return node[labelKey.value];
  50476. }
  50477. function toggleExpand(node) {
  50478. if (expandedKeySet.value.has(node.key)) collapseNode(node);
  50479. else expandNode(node);
  50480. }
  50481. function setExpandedKeys(keys) {
  50482. const expandedKeys = /* @__PURE__ */ new Set();
  50483. const nodeMap = tree.value.treeNodeMap;
  50484. expandedKeySet.value.forEach((key) => {
  50485. const node = nodeMap.get(key);
  50486. expandedKeySet.value.delete(node.key);
  50487. node.expanded = false;
  50488. });
  50489. keys.forEach((k) => {
  50490. let node = nodeMap.get(k);
  50491. while (node && !expandedKeys.has(node.key)) {
  50492. expandedKeys.add(node.key);
  50493. node.expanded = true;
  50494. node = node.parent;
  50495. }
  50496. });
  50497. expandedKeySet.value = expandedKeys;
  50498. }
  50499. function handleNodeClick(node, e) {
  50500. emit(NODE_CLICK, node.data, node, e);
  50501. handleCurrentChange(node);
  50502. if (props.expandOnClickNode) toggleExpand(node);
  50503. if (props.showCheckbox && (props.checkOnClickNode || node.isLeaf && props.checkOnClickLeaf) && !node.disabled) toggleCheckbox(node, !isChecked(node), true);
  50504. }
  50505. function handleNodeDrop(node, e) {
  50506. emit(NODE_DROP, node.data, node, e);
  50507. }
  50508. function handleCurrentChange(node) {
  50509. if (!isCurrent(node)) {
  50510. currentKey.value = node.key;
  50511. emit(CURRENT_CHANGE, node.data, node);
  50512. }
  50513. }
  50514. function handleNodeCheck(node, checked) {
  50515. toggleCheckbox(node, checked);
  50516. }
  50517. function expandNode(node) {
  50518. const keySet = expandedKeySet.value;
  50519. if (tree.value && props.accordion) {
  50520. const { treeNodeMap } = tree.value;
  50521. keySet.forEach((key) => {
  50522. const treeNode = treeNodeMap.get(key);
  50523. if (node && node.level === treeNode?.level) {
  50524. keySet.delete(key);
  50525. treeNode.expanded = false;
  50526. }
  50527. });
  50528. }
  50529. keySet.add(node.key);
  50530. const _node = getNode(node.key);
  50531. if (_node) {
  50532. _node.expanded = true;
  50533. emit(NODE_EXPAND, _node.data, _node);
  50534. }
  50535. }
  50536. function collapseNode(node) {
  50537. expandedKeySet.value.delete(node.key);
  50538. const _node = getNode(node.key);
  50539. if (_node) {
  50540. _node.expanded = false;
  50541. emit(NODE_COLLAPSE, _node.data, _node);
  50542. }
  50543. }
  50544. function isDisabled(node) {
  50545. return !!node.disabled;
  50546. }
  50547. function isCurrent(node) {
  50548. const current = currentKey.value;
  50549. return current !== void 0 && current === node.key;
  50550. }
  50551. function getCurrentNode() {
  50552. if (!currentKey.value) return void 0;
  50553. return tree.value?.treeNodeMap.get(currentKey.value)?.data;
  50554. }
  50555. function getCurrentKey() {
  50556. return currentKey.value;
  50557. }
  50558. function setCurrentKey(key) {
  50559. currentKey.value = key;
  50560. }
  50561. function setData(data) {
  50562. tree.value = createTree(data);
  50563. }
  50564. function getNode(data) {
  50565. const key = isObject$2(data) ? getKey(data) : data;
  50566. return tree.value?.treeNodeMap.get(key);
  50567. }
  50568. function scrollToNode(key, strategy = "auto") {
  50569. const node = getNode(key);
  50570. if (node && listRef.value) listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy);
  50571. }
  50572. function scrollTo(offset) {
  50573. listRef.value?.scrollTo(offset);
  50574. }
  50575. watch(() => props.currentNodeKey, (key) => {
  50576. currentKey.value = key;
  50577. }, { immediate: true });
  50578. watch(() => props.defaultExpandedKeys, (key) => {
  50579. expandedKeySet.value = new Set(key);
  50580. }, { immediate: true });
  50581. watch(() => props.data, (data) => {
  50582. setData(data);
  50583. }, { immediate: true });
  50584. return {
  50585. tree,
  50586. flattenTree,
  50587. isNotEmpty,
  50588. listRef,
  50589. getKey,
  50590. getChildren,
  50591. toggleExpand,
  50592. toggleCheckbox,
  50593. isChecked,
  50594. isIndeterminate,
  50595. isDisabled,
  50596. isCurrent,
  50597. isForceHiddenExpandIcon,
  50598. handleNodeClick,
  50599. handleNodeDrop,
  50600. handleNodeCheck,
  50601. getCurrentNode,
  50602. getCurrentKey,
  50603. setCurrentKey,
  50604. getCheckedKeys,
  50605. getCheckedNodes,
  50606. getHalfCheckedKeys,
  50607. getHalfCheckedNodes,
  50608. setChecked,
  50609. setCheckedKeys,
  50610. filter,
  50611. setData,
  50612. getNode,
  50613. expandNode,
  50614. collapseNode,
  50615. setExpandedKeys,
  50616. scrollToNode,
  50617. scrollTo
  50618. };
  50619. }
  50620. //#endregion
  50621. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs
  50622. var tree_node_content_default = defineComponent({
  50623. name: "ElTreeNodeContent",
  50624. props: treeNodeContentProps,
  50625. setup(props) {
  50626. const tree = inject(ROOT_TREE_INJECTION_KEY$1);
  50627. const ns = useNamespace("tree");
  50628. return () => {
  50629. const node = props.node;
  50630. const { data } = node;
  50631. return tree?.ctx.slots.default ? tree.ctx.slots.default({
  50632. node,
  50633. data
  50634. }) : h$1(ElText, {
  50635. tag: "span",
  50636. truncated: true,
  50637. class: ns.be("node", "label")
  50638. }, () => [node?.label]);
  50639. };
  50640. }
  50641. });
  50642. //#endregion
  50643. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.vue_vue_type_script_setup_true_lang.mjs
  50644. var _hoisted_1$11 = [
  50645. "aria-expanded",
  50646. "aria-disabled",
  50647. "aria-checked",
  50648. "data-key"
  50649. ];
  50650. //#endregion
  50651. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs
  50652. var tree_node_default = /* @__PURE__ */ defineComponent({
  50653. name: "ElTreeNode",
  50654. __name: "tree-node",
  50655. props: treeNodeProps,
  50656. emits: treeNodeEmits,
  50657. setup(__props, { emit: __emit }) {
  50658. const props = __props;
  50659. const emit = __emit;
  50660. const tree = inject(ROOT_TREE_INJECTION_KEY$1);
  50661. const ns = useNamespace("tree");
  50662. const indent = computed(() => tree?.props.indent ?? 16);
  50663. const icon = computed(() => tree?.props.icon ?? caret_right_default);
  50664. const getNodeClass = (node) => {
  50665. const nodeClassFunc = tree?.props.props?.class;
  50666. if (!nodeClassFunc) return {};
  50667. let className;
  50668. if (isFunction$1(nodeClassFunc)) {
  50669. const { data } = node;
  50670. className = nodeClassFunc(data, node);
  50671. } else className = nodeClassFunc;
  50672. return isString(className) ? { [className]: true } : className;
  50673. };
  50674. const handleClick = (e) => {
  50675. emit("click", props.node, e);
  50676. };
  50677. const handleDrop = (e) => {
  50678. emit("drop", props.node, e);
  50679. };
  50680. const handleExpandIconClick = () => {
  50681. emit("toggle", props.node);
  50682. };
  50683. const handleCheckChange = (value) => {
  50684. emit("check", props.node, value);
  50685. };
  50686. const handleContextMenu = (event) => {
  50687. if (tree?.instance?.vnode?.props?.["onNodeContextmenu"]) {
  50688. event.stopPropagation();
  50689. event.preventDefault();
  50690. }
  50691. tree?.ctx.emit(NODE_CONTEXTMENU, event, props.node?.data, props.node);
  50692. };
  50693. return (_ctx, _cache) => {
  50694. return openBlock(), createElementBlock("div", {
  50695. ref: "node$",
  50696. class: normalizeClass([
  50697. unref(ns).b("node"),
  50698. unref(ns).is("expanded", __props.expanded),
  50699. unref(ns).is("current", __props.current),
  50700. unref(ns).is("focusable", !__props.disabled),
  50701. unref(ns).is("checked", !__props.disabled && __props.checked),
  50702. getNodeClass(__props.node)
  50703. ]),
  50704. role: "treeitem",
  50705. tabindex: "-1",
  50706. "aria-expanded": __props.expanded,
  50707. "aria-disabled": __props.disabled,
  50708. "aria-checked": __props.checked,
  50709. "data-key": __props.node?.key,
  50710. onClick: withModifiers(handleClick, ["stop"]),
  50711. onContextmenu: handleContextMenu,
  50712. onDragover: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"])),
  50713. onDragenter: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
  50714. onDrop: withModifiers(handleDrop, ["stop"])
  50715. }, [createBaseVNode("div", {
  50716. class: normalizeClass(unref(ns).be("node", "content")),
  50717. style: normalizeStyle({
  50718. paddingLeft: `${(__props.node.level - 1) * indent.value}px`,
  50719. height: __props.itemSize + "px"
  50720. })
  50721. }, [
  50722. icon.value ? (openBlock(), createBlock(unref(ElIcon), {
  50723. key: 0,
  50724. class: normalizeClass([
  50725. unref(ns).is("leaf", !!__props.node?.isLeaf),
  50726. unref(ns).is("hidden", __props.hiddenExpandIcon),
  50727. { expanded: !__props.node?.isLeaf && __props.expanded },
  50728. unref(ns).be("node", "expand-icon")
  50729. ]),
  50730. onClick: withModifiers(handleExpandIconClick, ["stop"])
  50731. }, {
  50732. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(icon.value)))]),
  50733. _: 1
  50734. }, 8, ["class"])) : createCommentVNode("v-if", true),
  50735. __props.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), {
  50736. key: 1,
  50737. "model-value": __props.checked,
  50738. indeterminate: __props.indeterminate,
  50739. disabled: __props.disabled,
  50740. onChange: handleCheckChange,
  50741. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  50742. }, null, 8, [
  50743. "model-value",
  50744. "indeterminate",
  50745. "disabled"
  50746. ])) : createCommentVNode("v-if", true),
  50747. createVNode(unref(tree_node_content_default), { node: {
  50748. ...__props.node,
  50749. expanded: __props.expanded
  50750. } }, null, 8, ["node"])
  50751. ], 6)], 42, _hoisted_1$11);
  50752. };
  50753. }
  50754. });
  50755. //#endregion
  50756. //#region node_modules/element-plus/es/components/tree-v2/index.mjs
  50757. var ElTreeV2 = withInstall(/* @__PURE__ */ defineComponent({
  50758. name: "ElTreeV2",
  50759. __name: "tree",
  50760. props: treeProps$1,
  50761. emits: treeEmits$1,
  50762. setup(__props, { expose: __expose, emit: __emit }) {
  50763. const props = __props;
  50764. const emit = __emit;
  50765. const slots = useSlots();
  50766. const treeNodeSize = computed(() => props.itemSize);
  50767. provide(ROOT_TREE_INJECTION_KEY$1, {
  50768. ctx: {
  50769. emit,
  50770. slots
  50771. },
  50772. props,
  50773. instance: getCurrentInstance()
  50774. });
  50775. provide(formItemContextKey, void 0);
  50776. const { t } = useLocale();
  50777. const ns = useNamespace("tree");
  50778. const { flattenTree, isNotEmpty, listRef, toggleExpand, isIndeterminate, isChecked, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeDrop, handleNodeCheck, toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter, setData, getNode, expandNode, collapseNode, setExpandedKeys, scrollToNode, scrollTo } = useTree(props, emit);
  50779. __expose({
  50780. toggleCheckbox,
  50781. getCurrentNode,
  50782. getCurrentKey,
  50783. setCurrentKey,
  50784. getCheckedKeys,
  50785. getCheckedNodes,
  50786. getHalfCheckedKeys,
  50787. getHalfCheckedNodes,
  50788. setChecked,
  50789. setCheckedKeys,
  50790. filter,
  50791. setData,
  50792. getNode,
  50793. expandNode,
  50794. collapseNode,
  50795. setExpandedKeys,
  50796. scrollToNode,
  50797. scrollTo
  50798. });
  50799. return (_ctx, _cache) => {
  50800. return openBlock(), createElementBlock("div", {
  50801. class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: __props.highlightCurrent }]),
  50802. role: "tree"
  50803. }, [unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), {
  50804. key: 0,
  50805. ref_key: "listRef",
  50806. ref: listRef,
  50807. "class-name": unref(ns).b("virtual-list"),
  50808. data: unref(flattenTree),
  50809. total: unref(flattenTree).length,
  50810. height: __props.height,
  50811. "item-size": treeNodeSize.value,
  50812. "perf-mode": __props.perfMode,
  50813. "scrollbar-always-on": __props.scrollbarAlwaysOn
  50814. }, {
  50815. default: withCtx(({ data, index, style }) => [(openBlock(), createBlock(tree_node_default, {
  50816. key: data[index].key,
  50817. style: normalizeStyle(style),
  50818. node: data[index],
  50819. expanded: data[index].expanded,
  50820. "show-checkbox": __props.showCheckbox,
  50821. checked: unref(isChecked)(data[index]),
  50822. indeterminate: unref(isIndeterminate)(data[index]),
  50823. "item-size": treeNodeSize.value,
  50824. disabled: unref(isDisabled)(data[index]),
  50825. current: unref(isCurrent)(data[index]),
  50826. "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]),
  50827. onClick: unref(handleNodeClick),
  50828. onToggle: unref(toggleExpand),
  50829. onCheck: unref(handleNodeCheck),
  50830. onDrop: unref(handleNodeDrop)
  50831. }, null, 8, [
  50832. "style",
  50833. "node",
  50834. "expanded",
  50835. "show-checkbox",
  50836. "checked",
  50837. "indeterminate",
  50838. "item-size",
  50839. "disabled",
  50840. "current",
  50841. "hidden-expand-icon",
  50842. "onClick",
  50843. "onToggle",
  50844. "onCheck",
  50845. "onDrop"
  50846. ]))]),
  50847. _: 1
  50848. }, 8, [
  50849. "class-name",
  50850. "data",
  50851. "total",
  50852. "height",
  50853. "item-size",
  50854. "perf-mode",
  50855. "scrollbar-always-on"
  50856. ])) : (openBlock(), createElementBlock("div", {
  50857. key: 1,
  50858. class: normalizeClass(unref(ns).e("empty-block"))
  50859. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(ns).e("empty-text")) }, toDisplayString(__props.emptyText ?? unref(t)("el.tree.emptyText")), 3)])], 2))], 2);
  50860. };
  50861. }
  50862. }));
  50863. //#endregion
  50864. //#region node_modules/element-plus/es/components/upload/src/ajax.mjs
  50865. var SCOPE$3 = "ElUpload";
  50866. var UploadAjaxError = class extends Error {
  50867. constructor(message, status, method, url) {
  50868. super(message);
  50869. this.name = "UploadAjaxError";
  50870. this.status = status;
  50871. this.method = method;
  50872. this.url = url;
  50873. }
  50874. };
  50875. function getError(action, option, xhr) {
  50876. let msg;
  50877. if (xhr.response) msg = `${xhr.response.error || xhr.response}`;
  50878. else if (xhr.responseText) msg = `${xhr.responseText}`;
  50879. else msg = `fail to ${option.method} ${action} ${xhr.status}`;
  50880. return new UploadAjaxError(msg, xhr.status, option.method, action);
  50881. }
  50882. function getBody(xhr) {
  50883. const text = xhr.responseText || xhr.response;
  50884. if (!text) return text;
  50885. try {
  50886. return JSON.parse(text);
  50887. } catch {
  50888. return text;
  50889. }
  50890. }
  50891. var ajaxUpload = (option) => {
  50892. if (typeof XMLHttpRequest === "undefined") throwError(SCOPE$3, "XMLHttpRequest is undefined");
  50893. const xhr = new XMLHttpRequest();
  50894. const action = option.action;
  50895. if (xhr.upload) xhr.upload.addEventListener("progress", (evt) => {
  50896. const progressEvt = evt;
  50897. progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0;
  50898. option.onProgress(progressEvt);
  50899. });
  50900. const formData = new FormData();
  50901. if (option.data) for (const [key, value] of Object.entries(option.data)) if (isArray$1(value)) if (value.length === 2 && value[0] instanceof Blob && isString(value[1])) formData.append(key, value[0], value[1]);
  50902. else value.forEach((item) => {
  50903. formData.append(key, item);
  50904. });
  50905. else formData.append(key, value);
  50906. formData.append(option.filename, option.file, option.file.name);
  50907. xhr.addEventListener("error", () => {
  50908. option.onError(getError(action, option, xhr));
  50909. });
  50910. xhr.addEventListener("load", () => {
  50911. if (xhr.status < 200 || xhr.status >= 300) return option.onError(getError(action, option, xhr));
  50912. option.onSuccess(getBody(xhr));
  50913. });
  50914. xhr.open(option.method, action, true);
  50915. if (option.withCredentials && "withCredentials" in xhr) xhr.withCredentials = true;
  50916. const headers = option.headers || {};
  50917. if (headers instanceof Headers) headers.forEach((value, key) => xhr.setRequestHeader(key, value));
  50918. else for (const [key, value] of Object.entries(headers)) {
  50919. if (isNil(value)) continue;
  50920. xhr.setRequestHeader(key, String(value));
  50921. }
  50922. xhr.send(formData);
  50923. return xhr;
  50924. };
  50925. //#endregion
  50926. //#region node_modules/element-plus/es/components/upload/src/upload.mjs
  50927. /**
  50928. * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
  50929. */
  50930. var uploadListTypes = [
  50931. "text",
  50932. "picture",
  50933. "picture-card"
  50934. ];
  50935. var fileId = 1;
  50936. var genFileId = () => Date.now() + fileId++;
  50937. /**
  50938. * @deprecated Removed after 3.0.0, Use `UploadBaseProps` instead.
  50939. */
  50940. var uploadBaseProps = buildProps({
  50941. action: {
  50942. type: String,
  50943. default: "#"
  50944. },
  50945. headers: { type: definePropType(Object) },
  50946. method: {
  50947. type: String,
  50948. default: "post"
  50949. },
  50950. data: {
  50951. type: definePropType([
  50952. Object,
  50953. Function,
  50954. Promise
  50955. ]),
  50956. default: () => mutable({})
  50957. },
  50958. multiple: Boolean,
  50959. name: {
  50960. type: String,
  50961. default: "file"
  50962. },
  50963. drag: Boolean,
  50964. withCredentials: Boolean,
  50965. showFileList: {
  50966. type: Boolean,
  50967. default: true
  50968. },
  50969. accept: {
  50970. type: String,
  50971. default: ""
  50972. },
  50973. fileList: {
  50974. type: definePropType(Array),
  50975. default: () => mutable([])
  50976. },
  50977. autoUpload: {
  50978. type: Boolean,
  50979. default: true
  50980. },
  50981. listType: {
  50982. type: String,
  50983. values: uploadListTypes,
  50984. default: "text"
  50985. },
  50986. httpRequest: {
  50987. type: definePropType(Function),
  50988. default: ajaxUpload
  50989. },
  50990. disabled: {
  50991. type: Boolean,
  50992. default: void 0
  50993. },
  50994. limit: Number,
  50995. directory: Boolean
  50996. });
  50997. /**
  50998. * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
  50999. */
  51000. var uploadProps = buildProps({
  51001. ...uploadBaseProps,
  51002. beforeUpload: {
  51003. type: definePropType(Function),
  51004. default: NOOP
  51005. },
  51006. beforeRemove: { type: definePropType(Function) },
  51007. onRemove: {
  51008. type: definePropType(Function),
  51009. default: NOOP
  51010. },
  51011. onChange: {
  51012. type: definePropType(Function),
  51013. default: NOOP
  51014. },
  51015. onPreview: {
  51016. type: definePropType(Function),
  51017. default: NOOP
  51018. },
  51019. onSuccess: {
  51020. type: definePropType(Function),
  51021. default: NOOP
  51022. },
  51023. onProgress: {
  51024. type: definePropType(Function),
  51025. default: NOOP
  51026. },
  51027. onError: {
  51028. type: definePropType(Function),
  51029. default: NOOP
  51030. },
  51031. onExceed: {
  51032. type: definePropType(Function),
  51033. default: NOOP
  51034. },
  51035. crossorigin: { type: definePropType(String) }
  51036. });
  51037. var uploadBasePropsDefaults = {
  51038. action: "#",
  51039. method: "post",
  51040. data: () => mutable({}),
  51041. name: "file",
  51042. showFileList: true,
  51043. accept: "",
  51044. fileList: () => mutable([]),
  51045. autoUpload: true,
  51046. listType: "text",
  51047. httpRequest: ajaxUpload,
  51048. disabled: void 0
  51049. };
  51050. var uploadPropsDefaults = {
  51051. ...uploadBasePropsDefaults,
  51052. beforeUpload: NOOP,
  51053. onRemove: NOOP,
  51054. onChange: NOOP,
  51055. onPreview: NOOP,
  51056. onSuccess: NOOP,
  51057. onProgress: NOOP,
  51058. onError: NOOP,
  51059. onExceed: NOOP
  51060. };
  51061. //#endregion
  51062. //#region node_modules/element-plus/es/components/upload/src/constants.mjs
  51063. var uploadContextKey = Symbol("uploadContextKey");
  51064. //#endregion
  51065. //#region node_modules/element-plus/es/components/upload/src/upload-list.mjs
  51066. /**
  51067. * @deprecated Removed after 3.0.0, Use `UploadListProps` instead.
  51068. */
  51069. var uploadListProps = buildProps({
  51070. files: {
  51071. type: definePropType(Array),
  51072. default: () => mutable([])
  51073. },
  51074. disabled: {
  51075. type: Boolean,
  51076. default: void 0
  51077. },
  51078. handlePreview: {
  51079. type: definePropType(Function),
  51080. default: NOOP
  51081. },
  51082. listType: {
  51083. type: String,
  51084. values: uploadListTypes,
  51085. default: "text"
  51086. },
  51087. crossorigin: { type: definePropType(String) }
  51088. });
  51089. var uploadListEmits = { remove: (file) => !!file };
  51090. //#endregion
  51091. //#region node_modules/element-plus/es/components/upload/src/upload-content.mjs
  51092. /**
  51093. * @deprecated Removed after 3.0.0, Use `UploadContentProps` instead.
  51094. */
  51095. var uploadContentProps = buildProps({
  51096. ...uploadBaseProps,
  51097. beforeUpload: {
  51098. type: definePropType(Function),
  51099. default: NOOP
  51100. },
  51101. onRemove: {
  51102. type: definePropType(Function),
  51103. default: NOOP
  51104. },
  51105. onStart: {
  51106. type: definePropType(Function),
  51107. default: NOOP
  51108. },
  51109. onSuccess: {
  51110. type: definePropType(Function),
  51111. default: NOOP
  51112. },
  51113. onProgress: {
  51114. type: definePropType(Function),
  51115. default: NOOP
  51116. },
  51117. onError: {
  51118. type: definePropType(Function),
  51119. default: NOOP
  51120. },
  51121. onExceed: {
  51122. type: definePropType(Function),
  51123. default: NOOP
  51124. }
  51125. });
  51126. var uploadContentPropsDefaults = {
  51127. ...uploadBasePropsDefaults,
  51128. beforeUpload: NOOP,
  51129. onRemove: NOOP,
  51130. onStart: NOOP,
  51131. onSuccess: NOOP,
  51132. onProgress: NOOP,
  51133. onError: NOOP,
  51134. onExceed: NOOP
  51135. };
  51136. //#endregion
  51137. //#region node_modules/element-plus/es/components/upload/src/upload-dragger.mjs
  51138. /**
  51139. * @deprecated Removed after 3.0.0, Use `UploadDraggerProps` instead.
  51140. */
  51141. var uploadDraggerProps = buildProps({
  51142. disabled: {
  51143. type: Boolean,
  51144. default: void 0
  51145. },
  51146. directory: Boolean
  51147. });
  51148. var uploadDraggerEmits = { file: (file) => isArray$1(file) };
  51149. //#endregion
  51150. //#region node_modules/element-plus/es/components/upload/src/upload-list.vue_vue_type_script_setup_true_lang.mjs
  51151. var _hoisted_1$10 = [
  51152. "tabindex",
  51153. "aria-disabled",
  51154. "onKeydown"
  51155. ];
  51156. var _hoisted_2$6 = ["src", "crossorigin"];
  51157. var _hoisted_3$2 = ["onClick"];
  51158. var _hoisted_4$1 = ["title"];
  51159. var _hoisted_5 = ["onClick"];
  51160. var _hoisted_6 = ["onClick"];
  51161. //#endregion
  51162. //#region node_modules/element-plus/es/components/upload/src/upload-list2.mjs
  51163. var upload_list_default = /* @__PURE__ */ defineComponent({
  51164. name: "ElUploadList",
  51165. __name: "upload-list",
  51166. props: uploadListProps,
  51167. emits: uploadListEmits,
  51168. setup(__props, { emit: __emit }) {
  51169. const props = __props;
  51170. const emit = __emit;
  51171. const { t } = useLocale();
  51172. const nsUpload = useNamespace("upload");
  51173. const nsIcon = useNamespace("icon");
  51174. const nsList = useNamespace("list");
  51175. const disabled = useFormDisabled();
  51176. const focusing = ref(false);
  51177. const containerKls = computed(() => [
  51178. nsUpload.b("list"),
  51179. nsUpload.bm("list", props.listType),
  51180. nsUpload.is("disabled", disabled.value)
  51181. ]);
  51182. const handleRemove = (file) => {
  51183. emit("remove", file);
  51184. };
  51185. return (_ctx, _cache) => {
  51186. return openBlock(), createBlock(TransitionGroup, {
  51187. tag: "ul",
  51188. class: normalizeClass(containerKls.value),
  51189. name: unref(nsList).b()
  51190. }, {
  51191. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.files, (file, index) => {
  51192. return openBlock(), createElementBlock("li", {
  51193. key: file.uid || file.name,
  51194. class: normalizeClass([
  51195. unref(nsUpload).be("list", "item"),
  51196. unref(nsUpload).is(file.status),
  51197. { focusing: focusing.value }
  51198. ]),
  51199. tabindex: unref(disabled) ? void 0 : 0,
  51200. "aria-disabled": unref(disabled),
  51201. role: "button",
  51202. onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]),
  51203. onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true),
  51204. onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false),
  51205. onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false)
  51206. }, [renderSlot(_ctx.$slots, "default", {
  51207. file,
  51208. index
  51209. }, () => [
  51210. __props.listType === "picture" || file.status !== "uploading" && __props.listType === "picture-card" ? (openBlock(), createElementBlock("img", {
  51211. key: 0,
  51212. class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")),
  51213. src: file.url,
  51214. crossorigin: __props.crossorigin,
  51215. alt: ""
  51216. }, null, 10, _hoisted_2$6)) : createCommentVNode("v-if", true),
  51217. file.status === "uploading" || __props.listType !== "picture-card" ? (openBlock(), createElementBlock("div", {
  51218. key: 1,
  51219. class: normalizeClass(unref(nsUpload).be("list", "item-info"))
  51220. }, [createBaseVNode("a", {
  51221. class: normalizeClass(unref(nsUpload).be("list", "item-name")),
  51222. onClick: withModifiers(($event) => __props.handlePreview(file), ["prevent"])
  51223. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("document")) }, {
  51224. default: withCtx(() => [createVNode(unref(document_default))]),
  51225. _: 1
  51226. }, 8, ["class"]), createBaseVNode("span", {
  51227. class: normalizeClass(unref(nsUpload).be("list", "item-file-name")),
  51228. title: file.name
  51229. }, toDisplayString(file.name), 11, _hoisted_4$1)], 10, _hoisted_3$2), file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
  51230. key: 0,
  51231. type: __props.listType === "picture-card" ? "circle" : "line",
  51232. "stroke-width": __props.listType === "picture-card" ? 6 : 2,
  51233. percentage: Number(file.percentage),
  51234. style: normalizeStyle(__props.listType === "picture-card" ? "" : "margin-top: 0.5rem")
  51235. }, null, 8, [
  51236. "type",
  51237. "stroke-width",
  51238. "percentage",
  51239. "style"
  51240. ])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  51241. createBaseVNode("label", { class: normalizeClass(unref(nsUpload).be("list", "item-status-label")) }, [__props.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), {
  51242. key: 0,
  51243. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")])
  51244. }, {
  51245. default: withCtx(() => [createVNode(unref(circle_check_default))]),
  51246. _: 1
  51247. }, 8, ["class"])) : ["picture-card", "picture"].includes(__props.listType) ? (openBlock(), createBlock(unref(ElIcon), {
  51248. key: 1,
  51249. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")])
  51250. }, {
  51251. default: withCtx(() => [createVNode(unref(check_default))]),
  51252. _: 1
  51253. }, 8, ["class"])) : createCommentVNode("v-if", true)], 2),
  51254. !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), {
  51255. key: 2,
  51256. class: normalizeClass(unref(nsIcon).m("close")),
  51257. "aria-label": unref(t)("el.upload.delete"),
  51258. role: "button",
  51259. tabindex: "0",
  51260. onClick: ($event) => handleRemove(file),
  51261. onKeydown: withKeys(withModifiers(($event) => handleRemove(file), ["prevent"]), ["enter", "space"])
  51262. }, {
  51263. default: withCtx(() => [createVNode(unref(close_default))]),
  51264. _: 1
  51265. }, 8, [
  51266. "class",
  51267. "aria-label",
  51268. "onClick",
  51269. "onKeydown"
  51270. ])) : createCommentVNode("v-if", true),
  51271. !unref(disabled) ? (openBlock(), createElementBlock("i", {
  51272. key: 3,
  51273. class: normalizeClass(unref(nsIcon).m("close-tip"))
  51274. }, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true),
  51275. __props.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
  51276. key: 4,
  51277. class: normalizeClass(unref(nsUpload).be("list", "item-actions"))
  51278. }, [createBaseVNode("span", {
  51279. class: normalizeClass(unref(nsUpload).be("list", "item-preview")),
  51280. onClick: ($event) => __props.handlePreview(file)
  51281. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("zoom-in")) }, {
  51282. default: withCtx(() => [createVNode(unref(zoom_in_default))]),
  51283. _: 1
  51284. }, 8, ["class"])], 10, _hoisted_5), !unref(disabled) ? (openBlock(), createElementBlock("span", {
  51285. key: 0,
  51286. class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
  51287. onClick: ($event) => handleRemove(file)
  51288. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("delete")) }, {
  51289. default: withCtx(() => [createVNode(unref(delete_default))]),
  51290. _: 1
  51291. }, 8, ["class"])], 10, _hoisted_6)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
  51292. ])], 42, _hoisted_1$10);
  51293. }), 128)), renderSlot(_ctx.$slots, "append")]),
  51294. _: 3
  51295. }, 8, ["class", "name"]);
  51296. };
  51297. }
  51298. });
  51299. //#endregion
  51300. //#region node_modules/element-plus/es/components/upload/src/upload-dragger.vue_vue_type_script_setup_true_lang.mjs
  51301. var COMPONENT_NAME$1 = "ElUploadDrag";
  51302. //#endregion
  51303. //#region node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs
  51304. var upload_dragger_default = /* @__PURE__ */ defineComponent({
  51305. name: COMPONENT_NAME$1,
  51306. __name: "upload-dragger",
  51307. props: uploadDraggerProps,
  51308. emits: uploadDraggerEmits,
  51309. setup(__props, { emit: __emit }) {
  51310. const props = __props;
  51311. const emit = __emit;
  51312. if (!inject(uploadContextKey)) throwError(COMPONENT_NAME$1, "usage: <el-upload><el-upload-dragger /></el-upload>");
  51313. const ns = useNamespace("upload");
  51314. const dragover = ref(false);
  51315. const disabled = useFormDisabled();
  51316. const getFile = (entry) => {
  51317. return new Promise((resolve, reject) => entry.file(resolve, reject));
  51318. };
  51319. const getAllFiles = async (entry) => {
  51320. try {
  51321. if (entry.isFile) {
  51322. const file = await getFile(entry);
  51323. file.isDirectory = false;
  51324. return [file];
  51325. }
  51326. if (entry.isDirectory) {
  51327. const dirReader = entry.createReader();
  51328. const getEntries = () => {
  51329. return new Promise((resolve, reject) => dirReader.readEntries(resolve, reject));
  51330. };
  51331. const entries = [];
  51332. let readEntries = await getEntries();
  51333. /**
  51334. * In Chromium-based browsers, readEntries() will only return the first 100 FileSystemEntry instances.
  51335. * https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries#:~:text=In%20Chromium%2Dbased%20browsers%2C%20readEntries()%20will%20only%20return%20the%20first%20100%20FileSystemEntry%20instances.%20In%20order%20to%20obtain%20all%20of%20the%20instances%2C%20readEntries()%20must%20be%20called%20multiple%20times.
  51336. */
  51337. while (readEntries.length > 0) {
  51338. entries.push(...readEntries);
  51339. readEntries = await getEntries();
  51340. }
  51341. const filePromises = entries.map((entry) => getAllFiles(entry).catch(() => []));
  51342. return flatten(await Promise.all(filePromises));
  51343. }
  51344. } catch {
  51345. return [];
  51346. }
  51347. return [];
  51348. };
  51349. const onDrop = async (e) => {
  51350. if (disabled.value) return;
  51351. dragover.value = false;
  51352. e.stopPropagation();
  51353. const files = Array.from(e.dataTransfer.files);
  51354. const items = e.dataTransfer.items || [];
  51355. if (props.directory) {
  51356. const entries = Array.from(items).map((item) => item?.webkitGetAsEntry?.()).filter((entry) => entry);
  51357. emit("file", flatten(await Promise.all(entries.map(getAllFiles))));
  51358. return;
  51359. }
  51360. files.forEach((file, index) => {
  51361. const entry = items[index]?.webkitGetAsEntry?.();
  51362. if (entry) file.isDirectory = entry.isDirectory;
  51363. });
  51364. emit("file", files);
  51365. };
  51366. const onDragover = () => {
  51367. if (!disabled.value) dragover.value = true;
  51368. };
  51369. const onDragleave = (e) => {
  51370. if (!e.currentTarget.contains(e.relatedTarget)) dragover.value = false;
  51371. };
  51372. return (_ctx, _cache) => {
  51373. return openBlock(), createElementBlock("div", {
  51374. class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)]),
  51375. onDrop: withModifiers(onDrop, ["prevent"]),
  51376. onDragover: withModifiers(onDragover, ["prevent"]),
  51377. onDragleave: withModifiers(onDragleave, ["prevent"])
  51378. }, [renderSlot(_ctx.$slots, "default")], 34);
  51379. };
  51380. }
  51381. });
  51382. //#endregion
  51383. //#region node_modules/element-plus/es/components/upload/src/upload-content.vue_vue_type_script_setup_true_lang.mjs
  51384. var _hoisted_1$9 = [
  51385. "tabindex",
  51386. "aria-disabled",
  51387. "onKeydown"
  51388. ];
  51389. var _hoisted_2$5 = [
  51390. "name",
  51391. "disabled",
  51392. "multiple",
  51393. "accept",
  51394. "webkitdirectory"
  51395. ];
  51396. //#endregion
  51397. //#region node_modules/element-plus/es/components/upload/src/upload-content2.mjs
  51398. var upload_content_default = /* @__PURE__ */ defineComponent({
  51399. name: "ElUploadContent",
  51400. inheritAttrs: false,
  51401. __name: "upload-content",
  51402. props: uploadContentProps,
  51403. setup(__props, { expose: __expose }) {
  51404. const props = __props;
  51405. const ns = useNamespace("upload");
  51406. const disabled = useFormDisabled();
  51407. const requests = shallowRef({});
  51408. const inputRef = shallowRef();
  51409. const uploadFiles = (files) => {
  51410. if (files.length === 0) return;
  51411. const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props;
  51412. if (limit && fileList.length + files.length > limit) {
  51413. onExceed(files, fileList);
  51414. return;
  51415. }
  51416. if (!multiple) files = files.slice(0, 1);
  51417. for (const file of files) {
  51418. const rawFile = file;
  51419. rawFile.uid = genFileId();
  51420. onStart(rawFile);
  51421. if (autoUpload) upload(rawFile);
  51422. }
  51423. };
  51424. const upload = async (rawFile) => {
  51425. inputRef.value.value = "";
  51426. if (!props.beforeUpload) return doUpload(rawFile);
  51427. let hookResult;
  51428. let beforeData = {};
  51429. try {
  51430. const originData = props.data;
  51431. const beforeUploadPromise = props.beforeUpload(rawFile);
  51432. beforeData = isPlainObject$1(props.data) ? cloneDeep(props.data) : props.data;
  51433. hookResult = await beforeUploadPromise;
  51434. if (isPlainObject$1(props.data) && isEqual$1(originData, beforeData)) beforeData = cloneDeep(props.data);
  51435. } catch {
  51436. hookResult = false;
  51437. }
  51438. if (hookResult === false) {
  51439. props.onRemove(rawFile);
  51440. return;
  51441. }
  51442. let file = rawFile;
  51443. if (hookResult instanceof Blob) if (hookResult instanceof File) file = hookResult;
  51444. else file = new File([hookResult], rawFile.name, { type: rawFile.type });
  51445. doUpload(Object.assign(file, { uid: rawFile.uid }), beforeData);
  51446. };
  51447. const resolveData = async (data, rawFile) => {
  51448. if (isFunction$1(data)) return data(rawFile);
  51449. return data;
  51450. };
  51451. const doUpload = async (rawFile, beforeData) => {
  51452. const { headers, data, method, withCredentials, name: filename, action, onProgress, onSuccess, onError, httpRequest } = props;
  51453. try {
  51454. beforeData = await resolveData(beforeData ?? data, rawFile);
  51455. } catch {
  51456. props.onRemove(rawFile);
  51457. return;
  51458. }
  51459. const { uid } = rawFile;
  51460. const options = {
  51461. headers: headers || {},
  51462. withCredentials,
  51463. file: rawFile,
  51464. data: beforeData,
  51465. method,
  51466. filename,
  51467. action,
  51468. onProgress: (evt) => {
  51469. onProgress(evt, rawFile);
  51470. },
  51471. onSuccess: (res) => {
  51472. onSuccess(res, rawFile);
  51473. delete requests.value[uid];
  51474. },
  51475. onError: (err) => {
  51476. onError(err, rawFile);
  51477. delete requests.value[uid];
  51478. }
  51479. };
  51480. const request = httpRequest(options);
  51481. requests.value[uid] = request;
  51482. if (request instanceof Promise) request.then(options.onSuccess, options.onError);
  51483. };
  51484. const handleChange = (e) => {
  51485. const files = e.target.files;
  51486. if (!files) return;
  51487. uploadFiles(Array.from(files));
  51488. };
  51489. const handleClick = () => {
  51490. if (!disabled.value) {
  51491. inputRef.value.value = "";
  51492. inputRef.value.click();
  51493. }
  51494. };
  51495. const handleKeydown = () => {
  51496. handleClick();
  51497. };
  51498. const abort = (file) => {
  51499. entriesOf(requests.value).filter(file ? ([uid]) => String(file.uid) === uid : () => true).forEach(([uid, req]) => {
  51500. if (req instanceof XMLHttpRequest) req.abort();
  51501. delete requests.value[uid];
  51502. });
  51503. };
  51504. __expose({
  51505. abort,
  51506. upload
  51507. });
  51508. return (_ctx, _cache) => {
  51509. return openBlock(), createElementBlock("div", {
  51510. class: normalizeClass([
  51511. unref(ns).b(),
  51512. unref(ns).m(__props.listType),
  51513. unref(ns).is("drag", __props.drag),
  51514. unref(ns).is("disabled", unref(disabled))
  51515. ]),
  51516. tabindex: unref(disabled) ? void 0 : 0,
  51517. "aria-disabled": unref(disabled),
  51518. role: "button",
  51519. onClick: handleClick,
  51520. onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
  51521. }, [__props.drag ? (openBlock(), createBlock(upload_dragger_default, {
  51522. key: 0,
  51523. disabled: unref(disabled),
  51524. directory: __props.directory,
  51525. onFile: uploadFiles
  51526. }, {
  51527. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  51528. _: 3
  51529. }, 8, ["disabled", "directory"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), createBaseVNode("input", {
  51530. ref_key: "inputRef",
  51531. ref: inputRef,
  51532. class: normalizeClass(unref(ns).e("input")),
  51533. name: __props.name,
  51534. disabled: unref(disabled),
  51535. multiple: __props.multiple,
  51536. accept: __props.accept,
  51537. webkitdirectory: __props.directory || void 0,
  51538. type: "file",
  51539. onChange: handleChange,
  51540. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  51541. }, null, 42, _hoisted_2$5)], 42, _hoisted_1$9);
  51542. };
  51543. }
  51544. });
  51545. //#endregion
  51546. //#region node_modules/element-plus/es/components/upload/src/use-handlers.mjs
  51547. var SCOPE$2 = "ElUpload";
  51548. var revokeFileObjectURL = (file) => {
  51549. if (file.url?.startsWith("blob:")) URL.revokeObjectURL(file.url);
  51550. };
  51551. var useHandlers = (props, uploadRef) => {
  51552. const uploadFiles = useVModel(props, "fileList", void 0, { passive: true });
  51553. const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid);
  51554. function abort(file) {
  51555. uploadRef.value?.abort(file);
  51556. }
  51557. function clearFiles(states = [
  51558. "ready",
  51559. "uploading",
  51560. "success",
  51561. "fail"
  51562. ]) {
  51563. uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status));
  51564. }
  51565. function removeFile(file) {
  51566. uploadFiles.value = uploadFiles.value.filter((uploadFile) => uploadFile.uid !== file.uid);
  51567. }
  51568. const emitChange = (file) => {
  51569. nextTick(() => props.onChange(file, uploadFiles.value));
  51570. };
  51571. const handleError = (err, rawFile) => {
  51572. const file = getFile(rawFile);
  51573. if (!file) return;
  51574. console.error(err);
  51575. file.status = "fail";
  51576. removeFile(file);
  51577. props.onError(err, file, uploadFiles.value);
  51578. emitChange(file);
  51579. };
  51580. const handleProgress = (evt, rawFile) => {
  51581. const file = getFile(rawFile);
  51582. if (!file) return;
  51583. props.onProgress(evt, file, uploadFiles.value);
  51584. file.status = "uploading";
  51585. file.percentage = Math.round(evt.percent);
  51586. };
  51587. const handleSuccess = (response, rawFile) => {
  51588. const file = getFile(rawFile);
  51589. if (!file) return;
  51590. file.status = "success";
  51591. file.response = response;
  51592. props.onSuccess(response, file, uploadFiles.value);
  51593. emitChange(file);
  51594. };
  51595. const handleStart = (file) => {
  51596. if (isNil(file.uid)) file.uid = genFileId();
  51597. const uploadFile = {
  51598. name: file.name,
  51599. percentage: 0,
  51600. status: "ready",
  51601. size: file.size,
  51602. raw: file,
  51603. uid: file.uid
  51604. };
  51605. if (props.listType === "picture-card" || props.listType === "picture") try {
  51606. uploadFile.url = URL.createObjectURL(file);
  51607. } catch (err) {
  51608. debugWarn(SCOPE$2, err.message);
  51609. props.onError(err, uploadFile, uploadFiles.value);
  51610. }
  51611. uploadFiles.value = [...uploadFiles.value, uploadFile];
  51612. emitChange(uploadFile);
  51613. };
  51614. const handleRemove = async (file) => {
  51615. const uploadFile = file instanceof File ? getFile(file) : file;
  51616. if (!uploadFile) throwError(SCOPE$2, "file to be removed not found");
  51617. const doRemove = (file) => {
  51618. abort(file);
  51619. removeFile(file);
  51620. props.onRemove(file, uploadFiles.value);
  51621. revokeFileObjectURL(file);
  51622. };
  51623. if (props.beforeRemove) {
  51624. if (await props.beforeRemove(uploadFile, uploadFiles.value) !== false) doRemove(uploadFile);
  51625. } else doRemove(uploadFile);
  51626. };
  51627. function submit() {
  51628. uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => raw && uploadRef.value?.upload(raw));
  51629. }
  51630. watch(() => props.listType, (val) => {
  51631. if (val !== "picture-card" && val !== "picture") return;
  51632. uploadFiles.value = uploadFiles.value.map((file) => {
  51633. const { raw, url } = file;
  51634. if (!url && raw) try {
  51635. file.url = URL.createObjectURL(raw);
  51636. } catch (err) {
  51637. props.onError(err, file, uploadFiles.value);
  51638. }
  51639. return file;
  51640. });
  51641. });
  51642. watch(uploadFiles, (files) => {
  51643. for (const file of files) {
  51644. file.uid ||= genFileId();
  51645. file.status ||= "success";
  51646. }
  51647. }, {
  51648. immediate: true,
  51649. deep: true
  51650. });
  51651. return {
  51652. uploadFiles,
  51653. abort,
  51654. clearFiles,
  51655. handleError,
  51656. handleProgress,
  51657. handleStart,
  51658. handleSuccess,
  51659. handleRemove,
  51660. submit,
  51661. revokeFileObjectURL
  51662. };
  51663. };
  51664. //#endregion
  51665. //#region node_modules/element-plus/es/components/upload/index.mjs
  51666. var ElUpload = withInstall(/* @__PURE__ */ defineComponent({
  51667. name: "ElUpload",
  51668. __name: "upload",
  51669. props: uploadProps,
  51670. setup(__props, { expose: __expose }) {
  51671. const props = __props;
  51672. const disabled = useFormDisabled();
  51673. const uploadRef = shallowRef();
  51674. const { abort, submit, clearFiles, uploadFiles, handleStart, handleError, handleRemove, handleSuccess, handleProgress, revokeFileObjectURL } = useHandlers(props, uploadRef);
  51675. const isPictureCard = computed(() => props.listType === "picture-card");
  51676. const uploadContentProps = computed(() => ({
  51677. ...props,
  51678. fileList: uploadFiles.value,
  51679. onStart: handleStart,
  51680. onProgress: handleProgress,
  51681. onSuccess: handleSuccess,
  51682. onError: handleError,
  51683. onRemove: handleRemove
  51684. }));
  51685. onBeforeUnmount(() => {
  51686. uploadFiles.value.forEach(revokeFileObjectURL);
  51687. });
  51688. provide(uploadContextKey, { accept: toRef(props, "accept") });
  51689. __expose({
  51690. abort,
  51691. submit,
  51692. clearFiles,
  51693. handleStart,
  51694. handleRemove
  51695. });
  51696. return (_ctx, _cache) => {
  51697. return openBlock(), createElementBlock("div", null, [
  51698. isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
  51699. key: 0,
  51700. disabled: unref(disabled),
  51701. "list-type": __props.listType,
  51702. files: unref(uploadFiles),
  51703. crossorigin: __props.crossorigin,
  51704. "handle-preview": __props.onPreview,
  51705. onRemove: unref(handleRemove)
  51706. }, createSlots({
  51707. append: withCtx(() => [createVNode(upload_content_default, mergeProps({
  51708. ref_key: "uploadRef",
  51709. ref: uploadRef
  51710. }, uploadContentProps.value), {
  51711. default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
  51712. _: 3
  51713. }, 16)]),
  51714. _: 2
  51715. }, [_ctx.$slots.file ? {
  51716. name: "default",
  51717. fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
  51718. file,
  51719. index
  51720. })]),
  51721. key: "0"
  51722. } : void 0]), 1032, [
  51723. "disabled",
  51724. "list-type",
  51725. "files",
  51726. "crossorigin",
  51727. "handle-preview",
  51728. "onRemove"
  51729. ])) : createCommentVNode("v-if", true),
  51730. !isPictureCard.value || isPictureCard.value && !__props.showFileList ? (openBlock(), createBlock(upload_content_default, mergeProps({
  51731. key: 1,
  51732. ref_key: "uploadRef",
  51733. ref: uploadRef
  51734. }, uploadContentProps.value), {
  51735. default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
  51736. _: 3
  51737. }, 16)) : createCommentVNode("v-if", true),
  51738. _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
  51739. renderSlot(_ctx.$slots, "tip"),
  51740. !isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
  51741. key: 3,
  51742. disabled: unref(disabled),
  51743. "list-type": __props.listType,
  51744. files: unref(uploadFiles),
  51745. crossorigin: __props.crossorigin,
  51746. "handle-preview": __props.onPreview,
  51747. onRemove: unref(handleRemove)
  51748. }, createSlots({ _: 2 }, [_ctx.$slots.file ? {
  51749. name: "default",
  51750. fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
  51751. file,
  51752. index
  51753. })]),
  51754. key: "0"
  51755. } : void 0]), 1032, [
  51756. "disabled",
  51757. "list-type",
  51758. "files",
  51759. "crossorigin",
  51760. "handle-preview",
  51761. "onRemove"
  51762. ])) : createCommentVNode("v-if", true)
  51763. ]);
  51764. };
  51765. }
  51766. }));
  51767. //#endregion
  51768. //#region node_modules/element-plus/es/components/watermark/src/watermark.mjs
  51769. /**
  51770. * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead.
  51771. */
  51772. var watermarkProps = buildProps({
  51773. zIndex: {
  51774. type: Number,
  51775. default: 9
  51776. },
  51777. rotate: {
  51778. type: Number,
  51779. default: -22
  51780. },
  51781. width: Number,
  51782. height: Number,
  51783. image: String,
  51784. content: {
  51785. type: definePropType([String, Array]),
  51786. default: "Element Plus"
  51787. },
  51788. font: { type: definePropType(Object) },
  51789. gap: {
  51790. type: definePropType(Array),
  51791. default: () => [100, 100]
  51792. },
  51793. offset: { type: definePropType(Array) }
  51794. });
  51795. //#endregion
  51796. //#region node_modules/element-plus/es/components/watermark/src/utils.mjs
  51797. /** converting camel-cased strings to be lowercase and link it with Separator */
  51798. function toLowercaseSeparator(key) {
  51799. return key.replace(/([A-Z])/g, "-$1").toLowerCase();
  51800. }
  51801. function getStyleStr(style) {
  51802. return Object.keys(style).map((key) => `${toLowercaseSeparator(key)}: ${style[key]};`).join(" ");
  51803. }
  51804. /** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
  51805. function getPixelRatio() {
  51806. return window.devicePixelRatio || 1;
  51807. }
  51808. /** Whether to re-render the watermark */
  51809. var reRendering = (mutation, watermarkElement) => {
  51810. let flag = false;
  51811. if (mutation.removedNodes.length && watermarkElement) flag = Array.from(mutation.removedNodes).includes(watermarkElement);
  51812. if (mutation.type === "attributes" && mutation.target === watermarkElement) flag = true;
  51813. return flag;
  51814. };
  51815. //#endregion
  51816. //#region node_modules/element-plus/es/components/watermark/src/useClips.mjs
  51817. var TEXT_ALIGN_RATIO_MAP = {
  51818. left: [0, .5],
  51819. start: [0, .5],
  51820. center: [.5, 0],
  51821. right: [1, -.5],
  51822. end: [1, -.5]
  51823. };
  51824. function prepareCanvas(width, height, ratio = 1) {
  51825. const canvas = document.createElement("canvas");
  51826. const ctx = canvas.getContext("2d");
  51827. const realWidth = width * ratio;
  51828. const realHeight = height * ratio;
  51829. canvas.setAttribute("width", `${realWidth}px`);
  51830. canvas.setAttribute("height", `${realHeight}px`);
  51831. ctx.save();
  51832. return [
  51833. ctx,
  51834. canvas,
  51835. realWidth,
  51836. realHeight
  51837. ];
  51838. }
  51839. /**
  51840. * Get the clips of text content.
  51841. * This is a lazy hook function since SSR no need this
  51842. */
  51843. function useClips() {
  51844. function getClips(content, rotate, ratio, width, height, font, gapX, gapY, space) {
  51845. const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
  51846. let baselineOffset = 0;
  51847. if (content instanceof HTMLImageElement) ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
  51848. else {
  51849. const { color, fontSize, fontStyle, fontWeight, fontFamily, textAlign, textBaseline } = font;
  51850. const mergedFontSize = Number(fontSize) * ratio;
  51851. ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
  51852. ctx.fillStyle = color;
  51853. ctx.textAlign = textAlign;
  51854. ctx.textBaseline = textBaseline;
  51855. const contents = isArray$1(content) ? content : [content];
  51856. if (textBaseline !== "top" && contents[0]) {
  51857. const argumentMetrics = ctx.measureText(contents[0]);
  51858. ctx.textBaseline = "top";
  51859. const topMetrics = ctx.measureText(contents[0]);
  51860. baselineOffset = argumentMetrics.actualBoundingBoxAscent - topMetrics.actualBoundingBoxAscent;
  51861. }
  51862. contents?.forEach((item, index) => {
  51863. const [alignRatio, spaceRatio] = TEXT_ALIGN_RATIO_MAP[textAlign];
  51864. ctx.fillText(item ?? "", contentWidth * alignRatio + space * spaceRatio, index * (mergedFontSize + font.fontGap * ratio));
  51865. });
  51866. }
  51867. const angle = Math.PI / 180 * Number(rotate);
  51868. const maxSize = Math.max(width, height);
  51869. const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
  51870. rCtx.translate(realMaxSize / 2, realMaxSize / 2);
  51871. rCtx.rotate(angle);
  51872. if (contentWidth > 0 && contentHeight > 0) rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
  51873. function getRotatePos(x, y) {
  51874. return [x * Math.cos(angle) - y * Math.sin(angle), x * Math.sin(angle) + y * Math.cos(angle)];
  51875. }
  51876. let left = 0;
  51877. let right = 0;
  51878. let top = 0;
  51879. let bottom = 0;
  51880. const halfWidth = contentWidth / 2;
  51881. const halfHeight = contentHeight / 2;
  51882. [
  51883. [0 - halfWidth, 0 - halfHeight],
  51884. [0 + halfWidth, 0 - halfHeight],
  51885. [0 + halfWidth, 0 + halfHeight],
  51886. [0 - halfWidth, 0 + halfHeight]
  51887. ].forEach(([x, y]) => {
  51888. const [targetX, targetY] = getRotatePos(x, y);
  51889. left = Math.min(left, targetX);
  51890. right = Math.max(right, targetX);
  51891. top = Math.min(top, targetY);
  51892. bottom = Math.max(bottom, targetY);
  51893. });
  51894. const cutLeft = left + realMaxSize / 2;
  51895. const cutTop = top + realMaxSize / 2;
  51896. const cutWidth = right - left;
  51897. const cutHeight = bottom - top;
  51898. const realGapX = gapX * ratio;
  51899. const realGapY = gapY * ratio;
  51900. const filledWidth = (cutWidth + realGapX) * 2;
  51901. const filledHeight = cutHeight + realGapY;
  51902. const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
  51903. function drawImg(targetX = 0, targetY = 0) {
  51904. fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY + baselineOffset, cutWidth, cutHeight);
  51905. }
  51906. drawImg();
  51907. drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
  51908. drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
  51909. return [
  51910. fCanvas.toDataURL(),
  51911. filledWidth / ratio,
  51912. filledHeight / ratio
  51913. ];
  51914. }
  51915. return getClips;
  51916. }
  51917. //#endregion
  51918. //#region node_modules/element-plus/es/components/watermark/index.mjs
  51919. var ElWatermark = withInstall(/* @__PURE__ */ defineComponent({
  51920. name: "ElWatermark",
  51921. __name: "watermark",
  51922. props: watermarkProps,
  51923. setup(__props) {
  51924. const style = { position: "relative" };
  51925. const props = __props;
  51926. const fontGap = computed(() => props.font?.fontGap ?? 3);
  51927. const color = computed(() => props.font?.color ?? "rgba(0,0,0,.15)");
  51928. const fontSize = computed(() => props.font?.fontSize ?? 16);
  51929. const fontWeight = computed(() => props.font?.fontWeight ?? "normal");
  51930. const fontStyle = computed(() => props.font?.fontStyle ?? "normal");
  51931. const fontFamily = computed(() => props.font?.fontFamily ?? "sans-serif");
  51932. const textAlign = computed(() => props.font?.textAlign ?? "center");
  51933. const textBaseline = computed(() => props.font?.textBaseline ?? "hanging");
  51934. const gapX = computed(() => props.gap[0]);
  51935. const gapY = computed(() => props.gap[1]);
  51936. const gapXCenter = computed(() => gapX.value / 2);
  51937. const gapYCenter = computed(() => gapY.value / 2);
  51938. const offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value);
  51939. const offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value);
  51940. const getMarkStyle = () => {
  51941. const markStyle = {
  51942. zIndex: props.zIndex,
  51943. position: "absolute",
  51944. left: 0,
  51945. top: 0,
  51946. width: "100%",
  51947. height: "100%",
  51948. pointerEvents: "none",
  51949. backgroundRepeat: "repeat"
  51950. };
  51951. /** Calculate the style of the offset */
  51952. let positionLeft = offsetLeft.value - gapXCenter.value;
  51953. let positionTop = offsetTop.value - gapYCenter.value;
  51954. if (positionLeft > 0) {
  51955. markStyle.left = `${positionLeft}px`;
  51956. markStyle.width = `calc(100% - ${positionLeft}px)`;
  51957. positionLeft = 0;
  51958. }
  51959. if (positionTop > 0) {
  51960. markStyle.top = `${positionTop}px`;
  51961. markStyle.height = `calc(100% - ${positionTop}px)`;
  51962. positionTop = 0;
  51963. }
  51964. markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
  51965. return markStyle;
  51966. };
  51967. const containerRef = shallowRef(null);
  51968. const watermarkRef = shallowRef();
  51969. const stopObservation = ref(false);
  51970. const destroyWatermark = () => {
  51971. if (watermarkRef.value) {
  51972. watermarkRef.value.remove();
  51973. watermarkRef.value = void 0;
  51974. }
  51975. };
  51976. const appendWatermark = (base64Url, markWidth) => {
  51977. if (containerRef.value && watermarkRef.value) {
  51978. stopObservation.value = true;
  51979. watermarkRef.value.setAttribute("style", getStyleStr({
  51980. ...getMarkStyle(),
  51981. backgroundImage: `url('${base64Url}')`,
  51982. backgroundSize: `${Math.floor(markWidth)}px`
  51983. }));
  51984. containerRef.value?.append(watermarkRef.value);
  51985. setTimeout(() => {
  51986. stopObservation.value = false;
  51987. });
  51988. }
  51989. };
  51990. /**
  51991. * Get the width and height of the watermark. The default values are as follows
  51992. * Image: [120, 64]; Content: It's calculated by content;
  51993. */
  51994. const getMarkSize = (ctx) => {
  51995. let defaultWidth = 120;
  51996. let defaultHeight = 64;
  51997. let space = 0;
  51998. const { image, content, width, height, rotate } = props;
  51999. if (!image && ctx.measureText) {
  52000. ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
  52001. const contents = isArray$1(content) ? content : [content];
  52002. let maxWidth = 0;
  52003. let maxHeight = 0;
  52004. contents.forEach((item) => {
  52005. const { width, fontBoundingBoxAscent, fontBoundingBoxDescent, actualBoundingBoxAscent, actualBoundingBoxDescent } = ctx.measureText(item);
  52006. const height = isUndefined(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent;
  52007. if (width > maxWidth) maxWidth = Math.ceil(width);
  52008. if (height > maxHeight) maxHeight = Math.ceil(height);
  52009. });
  52010. defaultWidth = maxWidth;
  52011. defaultHeight = maxHeight * contents.length + (contents.length - 1) * fontGap.value;
  52012. const angle = Math.PI / 180 * Number(rotate);
  52013. space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2);
  52014. defaultWidth += space;
  52015. }
  52016. return [
  52017. width ?? defaultWidth,
  52018. height ?? defaultHeight,
  52019. space
  52020. ];
  52021. };
  52022. const getClips = useClips();
  52023. const renderWatermark = () => {
  52024. const ctx = document.createElement("canvas").getContext("2d");
  52025. const image = props.image;
  52026. const content = props.content;
  52027. const rotate = props.rotate;
  52028. if (ctx) {
  52029. if (!watermarkRef.value) watermarkRef.value = document.createElement("div");
  52030. const ratio = getPixelRatio();
  52031. const [markWidth, markHeight, space] = getMarkSize(ctx);
  52032. const drawCanvas = (drawContent) => {
  52033. const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
  52034. color: color.value,
  52035. fontSize: fontSize.value,
  52036. fontStyle: fontStyle.value,
  52037. fontWeight: fontWeight.value,
  52038. fontFamily: fontFamily.value,
  52039. fontGap: fontGap.value,
  52040. textAlign: textAlign.value,
  52041. textBaseline: textBaseline.value
  52042. }, gapX.value, gapY.value, space);
  52043. appendWatermark(textClips, clipWidth);
  52044. };
  52045. if (image) {
  52046. const img = new Image();
  52047. img.onload = () => {
  52048. drawCanvas(img);
  52049. };
  52050. img.onerror = () => {
  52051. drawCanvas(content);
  52052. };
  52053. img.crossOrigin = "anonymous";
  52054. img.referrerPolicy = "no-referrer";
  52055. img.src = image;
  52056. } else drawCanvas(content);
  52057. }
  52058. };
  52059. onMounted(() => {
  52060. renderWatermark();
  52061. });
  52062. watch(() => props, () => {
  52063. renderWatermark();
  52064. }, {
  52065. deep: true,
  52066. flush: "post"
  52067. });
  52068. onBeforeUnmount(() => {
  52069. destroyWatermark();
  52070. });
  52071. const onMutate = (mutations) => {
  52072. if (stopObservation.value) return;
  52073. mutations.forEach((mutation) => {
  52074. if (reRendering(mutation, watermarkRef.value)) {
  52075. destroyWatermark();
  52076. renderWatermark();
  52077. }
  52078. });
  52079. };
  52080. useMutationObserver(containerRef, onMutate, {
  52081. attributes: true,
  52082. subtree: true,
  52083. childList: true
  52084. });
  52085. return (_ctx, _cache) => {
  52086. return openBlock(), createElementBlock("div", {
  52087. ref_key: "containerRef",
  52088. ref: containerRef,
  52089. style: normalizeStyle([style])
  52090. }, [renderSlot(_ctx.$slots, "default")], 4);
  52091. };
  52092. }
  52093. }));
  52094. //#endregion
  52095. //#region node_modules/element-plus/es/components/tour/src/content.mjs
  52096. var tourStrategies = ["absolute", "fixed"];
  52097. var tourPlacements = [
  52098. "top-start",
  52099. "top-end",
  52100. "top",
  52101. "bottom-start",
  52102. "bottom-end",
  52103. "bottom",
  52104. "left-start",
  52105. "left-end",
  52106. "left",
  52107. "right-start",
  52108. "right-end",
  52109. "right"
  52110. ];
  52111. /**
  52112. * @deprecated Removed after 3.0.0, Use `TourContentProps` instead.
  52113. */
  52114. var tourContentProps = buildProps({
  52115. placement: {
  52116. type: definePropType(String),
  52117. values: tourPlacements,
  52118. default: "bottom"
  52119. },
  52120. reference: {
  52121. type: definePropType(Object),
  52122. default: null
  52123. },
  52124. strategy: {
  52125. type: definePropType(String),
  52126. values: tourStrategies,
  52127. default: "absolute"
  52128. },
  52129. offset: {
  52130. type: Number,
  52131. default: 10
  52132. },
  52133. showArrow: Boolean,
  52134. zIndex: {
  52135. type: Number,
  52136. default: 2001
  52137. }
  52138. });
  52139. var tourContentEmits = { close: () => true };
  52140. //#endregion
  52141. //#region node_modules/element-plus/es/components/tour/src/tour.mjs
  52142. /**
  52143. * @deprecated Removed after 3.0.0, Use `TourProps` instead.
  52144. */
  52145. var tourProps = buildProps({
  52146. modelValue: Boolean,
  52147. current: {
  52148. type: Number,
  52149. default: 0
  52150. },
  52151. showArrow: {
  52152. type: Boolean,
  52153. default: true
  52154. },
  52155. showClose: {
  52156. type: Boolean,
  52157. default: true
  52158. },
  52159. closeIcon: { type: iconPropType },
  52160. placement: tourContentProps.placement,
  52161. contentStyle: { type: definePropType([Object]) },
  52162. mask: {
  52163. type: definePropType([Boolean, Object]),
  52164. default: true
  52165. },
  52166. gap: {
  52167. type: definePropType(Object),
  52168. default: () => ({
  52169. offset: 6,
  52170. radius: 2
  52171. })
  52172. },
  52173. zIndex: { type: Number },
  52174. scrollIntoViewOptions: {
  52175. type: definePropType([Boolean, Object]),
  52176. default: () => ({ block: "center" })
  52177. },
  52178. type: { type: definePropType(String) },
  52179. appendTo: {
  52180. type: teleportProps.to.type,
  52181. default: "body"
  52182. },
  52183. closeOnPressEscape: {
  52184. type: Boolean,
  52185. default: true
  52186. },
  52187. targetAreaClickable: {
  52188. type: Boolean,
  52189. default: true
  52190. }
  52191. });
  52192. var tourEmits = {
  52193. [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
  52194. ["update:current"]: (current) => isNumber(current),
  52195. close: (current) => isNumber(current),
  52196. finish: () => true,
  52197. change: (current) => isNumber(current)
  52198. };
  52199. //#endregion
  52200. //#region node_modules/element-plus/es/components/tour/src/step.mjs
  52201. /**
  52202. * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
  52203. */
  52204. var tourStepProps = buildProps({
  52205. target: { type: definePropType([
  52206. String,
  52207. Object,
  52208. Function
  52209. ]) },
  52210. title: String,
  52211. description: String,
  52212. showClose: {
  52213. type: Boolean,
  52214. default: void 0
  52215. },
  52216. closeIcon: { type: iconPropType },
  52217. showArrow: {
  52218. type: Boolean,
  52219. default: void 0
  52220. },
  52221. placement: tourContentProps.placement,
  52222. mask: {
  52223. type: definePropType([Boolean, Object]),
  52224. default: void 0
  52225. },
  52226. contentStyle: { type: definePropType([Object]) },
  52227. prevButtonProps: { type: definePropType(Object) },
  52228. nextButtonProps: { type: definePropType(Object) },
  52229. scrollIntoViewOptions: {
  52230. type: definePropType([Boolean, Object]),
  52231. default: void 0
  52232. },
  52233. type: { type: definePropType(String) }
  52234. });
  52235. var tourStepEmits = { close: () => true };
  52236. //#endregion
  52237. //#region node_modules/element-plus/es/components/tour/src/helper.mjs
  52238. var useTarget = (target, open, gap, mergedMask, scrollIntoViewOptions) => {
  52239. const posInfo = ref(null);
  52240. const getTargetEl = () => {
  52241. let targetEl;
  52242. if (isString(target.value)) targetEl = document.querySelector(target.value);
  52243. else if (isFunction$1(target.value)) targetEl = target.value();
  52244. else targetEl = target.value;
  52245. return targetEl;
  52246. };
  52247. const updatePosInfo = () => {
  52248. const targetEl = getTargetEl();
  52249. if (!targetEl || !open.value) {
  52250. posInfo.value = null;
  52251. return;
  52252. }
  52253. if (!isInViewPort(targetEl)) targetEl.scrollIntoView(scrollIntoViewOptions.value);
  52254. const { left, top, width, height } = targetEl.getBoundingClientRect();
  52255. posInfo.value = {
  52256. left,
  52257. top,
  52258. width,
  52259. height,
  52260. radius: 0
  52261. };
  52262. };
  52263. onMounted(() => {
  52264. watch([open, target], () => {
  52265. updatePosInfo();
  52266. }, { immediate: true });
  52267. window.addEventListener("resize", updatePosInfo);
  52268. });
  52269. onBeforeUnmount(() => {
  52270. window.removeEventListener("resize", updatePosInfo);
  52271. });
  52272. const getGapOffset = (index) => (isArray$1(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ?? 6;
  52273. const mergedPosInfo = computed(() => {
  52274. if (!posInfo.value) return posInfo.value;
  52275. const gapOffsetX = getGapOffset(0);
  52276. const gapOffsetY = getGapOffset(1);
  52277. const gapRadius = gap.value?.radius || 2;
  52278. return {
  52279. left: posInfo.value.left - gapOffsetX,
  52280. top: posInfo.value.top - gapOffsetY,
  52281. width: posInfo.value.width + gapOffsetX * 2,
  52282. height: posInfo.value.height + gapOffsetY * 2,
  52283. radius: gapRadius
  52284. };
  52285. });
  52286. return {
  52287. mergedPosInfo,
  52288. triggerTarget: computed(() => {
  52289. const targetEl = getTargetEl();
  52290. if (!mergedMask.value || !targetEl || !window.DOMRect) return targetEl || void 0;
  52291. return { getBoundingClientRect() {
  52292. return window.DOMRect.fromRect({
  52293. width: mergedPosInfo.value?.width || 0,
  52294. height: mergedPosInfo.value?.height || 0,
  52295. x: mergedPosInfo.value?.left || 0,
  52296. y: mergedPosInfo.value?.top || 0
  52297. });
  52298. } };
  52299. })
  52300. };
  52301. };
  52302. var tourKey = Symbol("ElTour");
  52303. function isInViewPort(element) {
  52304. const viewWidth = window.innerWidth || document.documentElement.clientWidth;
  52305. const viewHeight = window.innerHeight || document.documentElement.clientHeight;
  52306. const { top, right, bottom, left } = element.getBoundingClientRect();
  52307. return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
  52308. }
  52309. var useFloating$1 = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
  52310. const x = ref();
  52311. const y = ref();
  52312. const middlewareData = ref({});
  52313. const states = {
  52314. x,
  52315. y,
  52316. placement,
  52317. strategy,
  52318. middlewareData
  52319. };
  52320. const middleware = computed(() => {
  52321. const _middleware = [
  52322. offset(unref(offset$1)),
  52323. flip(),
  52324. shift(),
  52325. overflowMiddleware()
  52326. ];
  52327. if (unref(showArrow) && unref(arrowRef)) _middleware.push(arrow({ element: unref(arrowRef) }));
  52328. return _middleware;
  52329. });
  52330. const update = async () => {
  52331. if (!isClient) return;
  52332. const referenceEl = unref(referenceRef);
  52333. const contentEl = unref(contentRef);
  52334. if (!referenceEl || !contentEl) return;
  52335. const data = await computePosition(referenceEl, contentEl, {
  52336. placement: unref(placement),
  52337. strategy: unref(strategy),
  52338. middleware: unref(middleware)
  52339. });
  52340. keysOf(states).forEach((key) => {
  52341. states[key].value = data[key];
  52342. });
  52343. };
  52344. const contentStyle = computed(() => {
  52345. if (!unref(referenceRef)) return {
  52346. position: "fixed",
  52347. top: "50%",
  52348. left: "50%",
  52349. transform: "translate3d(-50%, -50%, 0)",
  52350. maxWidth: "100vw",
  52351. zIndex: unref(zIndex)
  52352. };
  52353. const { overflow } = unref(middlewareData);
  52354. return {
  52355. position: unref(strategy),
  52356. zIndex: unref(zIndex),
  52357. top: unref(y) != null ? `${unref(y)}px` : "",
  52358. left: unref(x) != null ? `${unref(x)}px` : "",
  52359. maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : ""
  52360. };
  52361. });
  52362. const arrowStyle = computed(() => {
  52363. if (!unref(showArrow)) return {};
  52364. const { arrow } = unref(middlewareData);
  52365. return {
  52366. left: arrow?.x != null ? `${arrow?.x}px` : "",
  52367. top: arrow?.y != null ? `${arrow?.y}px` : ""
  52368. };
  52369. });
  52370. let cleanup;
  52371. onMounted(() => {
  52372. const referenceEl = unref(referenceRef);
  52373. const contentEl = unref(contentRef);
  52374. if (referenceEl && contentEl) cleanup = autoUpdate(referenceEl, contentEl, update);
  52375. watchEffect(() => {
  52376. update();
  52377. });
  52378. });
  52379. onBeforeUnmount(() => {
  52380. cleanup && cleanup();
  52381. });
  52382. return {
  52383. update,
  52384. contentStyle,
  52385. arrowStyle
  52386. };
  52387. };
  52388. var overflowMiddleware = () => {
  52389. return {
  52390. name: "overflow",
  52391. async fn(state) {
  52392. const overflow = await detectOverflow(state);
  52393. let overWidth = 0;
  52394. if (overflow.left > 0) overWidth = overflow.left;
  52395. if (overflow.right > 0) overWidth = overflow.right;
  52396. return { data: { maxWidth: state.rects.floating.width - overWidth } };
  52397. }
  52398. };
  52399. };
  52400. //#endregion
  52401. //#region node_modules/element-plus/es/components/tour/src/mask.mjs
  52402. /**
  52403. * @deprecated Removed after 3.0.0, Use `MaskProps` instead.
  52404. */
  52405. var maskProps = buildProps({
  52406. zIndex: {
  52407. type: Number,
  52408. default: 1001
  52409. },
  52410. visible: Boolean,
  52411. fill: {
  52412. type: String,
  52413. default: "rgba(0,0,0,0.5)"
  52414. },
  52415. pos: { type: definePropType(Object) },
  52416. targetAreaClickable: {
  52417. type: Boolean,
  52418. default: true
  52419. }
  52420. });
  52421. //#endregion
  52422. //#region node_modules/element-plus/es/components/tour/src/mask.vue_vue_type_script_setup_true_lang.mjs
  52423. var _hoisted_1$8 = { style: {
  52424. width: "100%",
  52425. height: "100%"
  52426. } };
  52427. var _hoisted_2$4 = ["d"];
  52428. //#endregion
  52429. //#region node_modules/element-plus/es/components/tour/src/mask2.mjs
  52430. var mask_default = /* @__PURE__ */ defineComponent({
  52431. name: "ElTourMask",
  52432. inheritAttrs: false,
  52433. __name: "mask",
  52434. props: maskProps,
  52435. setup(__props) {
  52436. const props = __props;
  52437. const { ns } = inject(tourKey);
  52438. const radius = computed(() => props.pos?.radius ?? 2);
  52439. const roundInfo = computed(() => {
  52440. const v = radius.value;
  52441. const baseInfo = `a${v},${v} 0 0 1`;
  52442. return {
  52443. topRight: `${baseInfo} ${v},${v}`,
  52444. bottomRight: `${baseInfo} ${-v},${v}`,
  52445. bottomLeft: `${baseInfo} ${-v},${-v}`,
  52446. topLeft: `${baseInfo} ${v},${-v}`
  52447. };
  52448. });
  52449. const { width: windowWidth, height: windowHeight } = useWindowSize();
  52450. const path = computed(() => {
  52451. const width = windowWidth.value;
  52452. const height = windowHeight.value;
  52453. const info = roundInfo.value;
  52454. const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
  52455. const _radius = radius.value;
  52456. return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
  52457. });
  52458. const maskStyle = computed(() => ({
  52459. position: "fixed",
  52460. left: 0,
  52461. right: 0,
  52462. top: 0,
  52463. bottom: 0,
  52464. zIndex: props.zIndex,
  52465. pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
  52466. }));
  52467. const pathStyle = computed(() => ({
  52468. fill: props.fill,
  52469. pointerEvents: "auto",
  52470. cursor: "auto"
  52471. }));
  52472. useLockscreen(toRef(props, "visible"), { ns });
  52473. return (_ctx, _cache) => {
  52474. return __props.visible ? (openBlock(), createElementBlock("div", mergeProps({
  52475. key: 0,
  52476. class: unref(ns).e("mask"),
  52477. style: maskStyle.value
  52478. }, _ctx.$attrs), [(openBlock(), createElementBlock("svg", _hoisted_1$8, [createBaseVNode("path", {
  52479. class: normalizeClass(unref(ns).e("hollow")),
  52480. style: normalizeStyle(pathStyle.value),
  52481. d: path.value
  52482. }, null, 14, _hoisted_2$4)]))], 16)) : createCommentVNode("v-if", true);
  52483. };
  52484. }
  52485. });
  52486. //#endregion
  52487. //#region node_modules/element-plus/es/components/tour/src/content.vue_vue_type_script_setup_true_lang.mjs
  52488. var _hoisted_1$7 = ["data-side"];
  52489. //#endregion
  52490. //#region node_modules/element-plus/es/components/tour/src/content2.mjs
  52491. var content_default$1 = /* @__PURE__ */ defineComponent({
  52492. name: "ElTourContent",
  52493. __name: "content",
  52494. props: tourContentProps,
  52495. emits: tourContentEmits,
  52496. setup(__props, { emit: __emit }) {
  52497. const props = __props;
  52498. const emit = __emit;
  52499. const placement = ref(props.placement);
  52500. const strategy = ref(props.strategy);
  52501. const contentRef = ref(null);
  52502. const arrowRef = ref(null);
  52503. watch(() => props.placement, () => {
  52504. placement.value = props.placement;
  52505. });
  52506. const { contentStyle, arrowStyle } = useFloating$1(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
  52507. const side = computed(() => {
  52508. return placement.value.split("-")[0];
  52509. });
  52510. const { ns } = inject(tourKey);
  52511. const onCloseRequested = () => {
  52512. emit("close");
  52513. };
  52514. const onFocusoutPrevented = (event) => {
  52515. if (event.detail.focusReason === "pointer") event.preventDefault();
  52516. };
  52517. return (_ctx, _cache) => {
  52518. return openBlock(), createElementBlock("div", {
  52519. ref_key: "contentRef",
  52520. ref: contentRef,
  52521. style: normalizeStyle(unref(contentStyle)),
  52522. class: normalizeClass(unref(ns).e("content")),
  52523. "data-side": side.value,
  52524. tabindex: "-1"
  52525. }, [createVNode(unref(focus_trap_default$1), {
  52526. loop: "",
  52527. trapped: "",
  52528. "focus-start-el": "container",
  52529. "focus-trap-el": contentRef.value || void 0,
  52530. onReleaseRequested: onCloseRequested,
  52531. onFocusoutPrevented
  52532. }, {
  52533. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  52534. _: 3
  52535. }, 8, ["focus-trap-el"]), __props.showArrow ? (openBlock(), createElementBlock("span", {
  52536. key: 0,
  52537. ref_key: "arrowRef",
  52538. ref: arrowRef,
  52539. style: normalizeStyle(unref(arrowStyle)),
  52540. class: normalizeClass(unref(ns).e("arrow"))
  52541. }, null, 6)) : createCommentVNode("v-if", true)], 14, _hoisted_1$7);
  52542. };
  52543. }
  52544. });
  52545. //#endregion
  52546. //#region node_modules/element-plus/es/components/tour/src/steps.mjs
  52547. var steps_default = defineComponent({
  52548. name: "ElTourSteps",
  52549. props: { current: {
  52550. type: Number,
  52551. default: 0
  52552. } },
  52553. emits: ["update-total"],
  52554. setup(props, { slots, emit }) {
  52555. let cacheTotal = 0;
  52556. return () => {
  52557. const children = slots.default?.();
  52558. const result = [];
  52559. let total = 0;
  52560. function filterSteps(children) {
  52561. if (!isArray$1(children)) return;
  52562. children.forEach((item) => {
  52563. if ((item?.type || {})?.name === "ElTourStep") {
  52564. result.push(item);
  52565. total += 1;
  52566. }
  52567. });
  52568. }
  52569. if (children.length) filterSteps(flattedChildren(children[0]?.children));
  52570. if (cacheTotal !== total) {
  52571. cacheTotal = total;
  52572. emit("update-total", total);
  52573. }
  52574. if (result.length) return result[props.current];
  52575. return null;
  52576. };
  52577. }
  52578. });
  52579. //#endregion
  52580. //#region node_modules/element-plus/es/components/tour/src/tour2.mjs
  52581. var tour_default = /* @__PURE__ */ defineComponent({
  52582. name: "ElTour",
  52583. inheritAttrs: false,
  52584. __name: "tour",
  52585. props: tourProps,
  52586. emits: tourEmits,
  52587. setup(__props, { emit: __emit }) {
  52588. const props = __props;
  52589. const emit = __emit;
  52590. const ns = useNamespace("tour");
  52591. const total = ref(0);
  52592. const currentStep = ref();
  52593. const current = useVModel(props, "current", emit, { passive: true });
  52594. const currentTarget = computed(() => currentStep.value?.target);
  52595. const kls = computed(() => [ns.b(), mergedType.value === "primary" ? ns.m("primary") : ""]);
  52596. const mergedPlacement = computed(() => currentStep.value?.placement || props.placement);
  52597. const mergedContentStyle = computed(() => currentStep.value?.contentStyle ?? props.contentStyle);
  52598. const mergedMask = computed(() => currentStep.value?.mask ?? props.mask);
  52599. const mergedShowMask = computed(() => !!mergedMask.value && props.modelValue);
  52600. const mergedMaskStyle = computed(() => isBoolean(mergedMask.value) ? void 0 : mergedMask.value);
  52601. const mergedShowArrow = computed(() => !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow));
  52602. const mergedScrollIntoViewOptions = computed(() => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions);
  52603. const mergedType = computed(() => currentStep.value?.type ?? props.type);
  52604. const { nextZIndex } = useZIndex();
  52605. const nowZIndex = nextZIndex();
  52606. const mergedZIndex = computed(() => props.zIndex ?? nowZIndex);
  52607. const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
  52608. watch(() => props.modelValue, (val) => {
  52609. if (!val) current.value = 0;
  52610. });
  52611. const onEscClose = () => {
  52612. if (props.closeOnPressEscape) {
  52613. emit(UPDATE_MODEL_EVENT, false);
  52614. emit("close", current.value);
  52615. }
  52616. };
  52617. const onUpdateTotal = (val) => {
  52618. total.value = val;
  52619. };
  52620. const slots = useSlots();
  52621. provide(tourKey, {
  52622. currentStep,
  52623. current,
  52624. total,
  52625. showClose: toRef(props, "showClose"),
  52626. closeIcon: toRef(props, "closeIcon"),
  52627. mergedType,
  52628. ns,
  52629. slots,
  52630. updateModelValue(modelValue) {
  52631. emit(UPDATE_MODEL_EVENT, modelValue);
  52632. },
  52633. onClose() {
  52634. emit("close", current.value);
  52635. },
  52636. onFinish() {
  52637. emit("finish");
  52638. },
  52639. onChange() {
  52640. emit(CHANGE_EVENT, current.value);
  52641. }
  52642. });
  52643. return (_ctx, _cache) => {
  52644. return openBlock(), createElementBlock(Fragment, null, [
  52645. createVNode(unref(ElTeleport), { to: __props.appendTo }, {
  52646. default: withCtx(() => [createBaseVNode("div", mergeProps({ class: kls.value }, _ctx.$attrs), [createVNode(mask_default, {
  52647. visible: mergedShowMask.value,
  52648. fill: mergedMaskStyle.value?.color,
  52649. style: normalizeStyle(mergedMaskStyle.value?.style),
  52650. pos: unref(pos),
  52651. "z-index": mergedZIndex.value,
  52652. "target-area-clickable": __props.targetAreaClickable
  52653. }, null, 8, [
  52654. "visible",
  52655. "fill",
  52656. "style",
  52657. "pos",
  52658. "z-index",
  52659. "target-area-clickable"
  52660. ]), __props.modelValue ? (openBlock(), createBlock(content_default$1, {
  52661. key: unref(current),
  52662. reference: unref(triggerTarget),
  52663. placement: mergedPlacement.value,
  52664. "show-arrow": mergedShowArrow.value,
  52665. "z-index": mergedZIndex.value,
  52666. style: normalizeStyle(mergedContentStyle.value),
  52667. onClose: onEscClose
  52668. }, {
  52669. default: withCtx(() => [createVNode(unref(steps_default), {
  52670. current: unref(current),
  52671. onUpdateTotal
  52672. }, {
  52673. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  52674. _: 3
  52675. }, 8, ["current"])]),
  52676. _: 3
  52677. }, 8, [
  52678. "reference",
  52679. "placement",
  52680. "show-arrow",
  52681. "z-index",
  52682. "style"
  52683. ])) : createCommentVNode("v-if", true)], 16)]),
  52684. _: 3
  52685. }, 8, ["to"]),
  52686. createCommentVNode(" just for IDE "),
  52687. createCommentVNode("v-if", true)
  52688. ], 64);
  52689. };
  52690. }
  52691. });
  52692. //#endregion
  52693. //#region node_modules/element-plus/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs
  52694. var _hoisted_1$6 = ["aria-label"];
  52695. //#endregion
  52696. //#region node_modules/element-plus/es/components/tour/src/step2.mjs
  52697. var step_default = /* @__PURE__ */ defineComponent({
  52698. name: "ElTourStep",
  52699. __name: "step",
  52700. props: tourStepProps,
  52701. emits: tourStepEmits,
  52702. setup(__props, { emit: __emit }) {
  52703. const props = __props;
  52704. const emit = __emit;
  52705. const { Close } = CloseComponents;
  52706. const { t } = useLocale();
  52707. const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish, onChange } = inject(tourKey);
  52708. watch(props, (val) => {
  52709. currentStep.value = val;
  52710. }, { immediate: true });
  52711. const mergedShowClose = computed(() => props.showClose ?? showClose.value);
  52712. const mergedCloseIcon = computed(() => props.closeIcon ?? closeIcon.value ?? Close);
  52713. const filterButtonProps = (btnProps) => {
  52714. if (!btnProps) return;
  52715. return omit(btnProps, ["children", "onClick"]);
  52716. };
  52717. const onPrev = () => {
  52718. current.value -= 1;
  52719. if (props.prevButtonProps?.onClick) props.prevButtonProps?.onClick();
  52720. onChange();
  52721. };
  52722. const onNext = () => {
  52723. if (current.value >= total.value - 1) onFinish();
  52724. else current.value += 1;
  52725. if (props.nextButtonProps?.onClick) props.nextButtonProps.onClick();
  52726. onChange();
  52727. };
  52728. const onFinish = () => {
  52729. onClose();
  52730. tourOnFinish();
  52731. };
  52732. const onClose = () => {
  52733. updateModelValue(false);
  52734. tourOnClose();
  52735. emit("close");
  52736. };
  52737. const handleKeydown = (e) => {
  52738. if (e.target?.isContentEditable) return;
  52739. switch (getEventCode(e)) {
  52740. case EVENT_CODE.left:
  52741. e.preventDefault();
  52742. current.value > 0 && onPrev();
  52743. break;
  52744. case EVENT_CODE.right:
  52745. e.preventDefault();
  52746. onNext();
  52747. break;
  52748. }
  52749. };
  52750. onMounted(() => {
  52751. window.addEventListener("keydown", handleKeydown);
  52752. });
  52753. onBeforeUnmount(() => {
  52754. window.removeEventListener("keydown", handleKeydown);
  52755. });
  52756. return (_ctx, _cache) => {
  52757. return openBlock(), createElementBlock(Fragment, null, [
  52758. mergedShowClose.value ? (openBlock(), createElementBlock("button", {
  52759. key: 0,
  52760. "aria-label": unref(t)("el.tour.close"),
  52761. class: normalizeClass(unref(ns).e("closebtn")),
  52762. type: "button",
  52763. onClick: onClose
  52764. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  52765. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mergedCloseIcon.value)))]),
  52766. _: 1
  52767. }, 8, ["class"])], 10, _hoisted_1$6)) : createCommentVNode("v-if", true),
  52768. createBaseVNode("header", { class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }]) }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
  52769. role: "heading",
  52770. class: normalizeClass(unref(ns).e("title"))
  52771. }, toDisplayString(__props.title), 3)])], 2),
  52772. createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(__props.description), 1)])], 2),
  52773. createBaseVNode("footer", { class: normalizeClass(unref(ns).e("footer")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).b("indicators")) }, [unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), {
  52774. key: 0,
  52775. current: unref(current),
  52776. total: unref(total)
  52777. }, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(total), (item, index) => {
  52778. return openBlock(), createElementBlock("span", {
  52779. key: item,
  52780. class: normalizeClass([unref(ns).b("indicator"), unref(ns).is("active", index === unref(current))])
  52781. }, null, 2);
  52782. }), 128))], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).b("buttons")) }, [unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
  52783. key: 0,
  52784. size: "small",
  52785. type: unref(mergedType)
  52786. }, filterButtonProps(__props.prevButtonProps), { onClick: onPrev }), {
  52787. default: withCtx(() => [createTextVNode(toDisplayString(__props.prevButtonProps?.children ?? unref(t)("el.tour.previous")), 1)]),
  52788. _: 1
  52789. }, 16, ["type"])) : createCommentVNode("v-if", true), unref(current) <= unref(total) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
  52790. key: 1,
  52791. size: "small",
  52792. type: unref(mergedType) === "primary" ? "default" : "primary"
  52793. }, filterButtonProps(__props.nextButtonProps), { onClick: onNext }), {
  52794. default: withCtx(() => [createTextVNode(toDisplayString(__props.nextButtonProps?.children ?? (unref(current) === unref(total) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next"))), 1)]),
  52795. _: 1
  52796. }, 16, ["type"])) : createCommentVNode("v-if", true)], 2)], 2)
  52797. ], 64);
  52798. };
  52799. }
  52800. });
  52801. //#endregion
  52802. //#region node_modules/element-plus/es/components/tour/index.mjs
  52803. var ElTour = withInstall(tour_default, { TourStep: step_default });
  52804. var ElTourStep = withNoopInstall(step_default);
  52805. //#endregion
  52806. //#region node_modules/element-plus/es/components/anchor/src/anchor.mjs
  52807. /**
  52808. * @deprecated Removed after 3.0.0, Use `AnchorProps` instead.
  52809. */
  52810. var anchorProps = buildProps({
  52811. container: { type: definePropType([String, Object]) },
  52812. offset: {
  52813. type: Number,
  52814. default: 0
  52815. },
  52816. bound: {
  52817. type: Number,
  52818. default: 15
  52819. },
  52820. duration: {
  52821. type: Number,
  52822. default: 300
  52823. },
  52824. marker: {
  52825. type: Boolean,
  52826. default: true
  52827. },
  52828. type: {
  52829. type: definePropType(String),
  52830. default: "default"
  52831. },
  52832. direction: {
  52833. type: definePropType(String),
  52834. default: "vertical"
  52835. },
  52836. selectScrollTop: Boolean
  52837. });
  52838. var anchorEmits = {
  52839. change: (href) => isString(href),
  52840. click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined(href))
  52841. };
  52842. //#endregion
  52843. //#region node_modules/element-plus/es/utils/dom/element.mjs
  52844. var getElement = ((target) => {
  52845. if (!isClient || target === "") return null;
  52846. if (isString(target)) try {
  52847. return document.querySelector(target);
  52848. } catch {
  52849. return null;
  52850. }
  52851. return target;
  52852. });
  52853. //#endregion
  52854. //#region node_modules/element-plus/es/utils/throttleByRaf.mjs
  52855. function throttleByRaf(cb) {
  52856. let timer = 0;
  52857. const throttle = (...args) => {
  52858. if (timer) cAF(timer);
  52859. timer = rAF(() => {
  52860. cb(...args);
  52861. timer = 0;
  52862. });
  52863. };
  52864. throttle.cancel = () => {
  52865. cAF(timer);
  52866. timer = 0;
  52867. };
  52868. return throttle;
  52869. }
  52870. //#endregion
  52871. //#region node_modules/element-plus/es/components/anchor/src/constants.mjs
  52872. var anchorKey = Symbol("anchor");
  52873. //#endregion
  52874. //#region node_modules/element-plus/es/components/anchor/src/anchor2.mjs
  52875. var anchor_default = /* @__PURE__ */ defineComponent({
  52876. name: "ElAnchor",
  52877. __name: "anchor",
  52878. props: anchorProps,
  52879. emits: anchorEmits,
  52880. setup(__props, { expose: __expose, emit: __emit }) {
  52881. const props = __props;
  52882. const emit = __emit;
  52883. const slots = useSlots();
  52884. const currentAnchor = ref("");
  52885. const markerStyle = ref({});
  52886. const anchorRef = ref(null);
  52887. const markerRef = ref(null);
  52888. const containerEl = ref();
  52889. const links = {};
  52890. let isScrolling = false;
  52891. let currentScrollTop = 0;
  52892. const ns = useNamespace("anchor");
  52893. const cls = computed(() => [
  52894. ns.b(),
  52895. props.type === "underline" ? ns.m("underline") : "",
  52896. ns.m(props.direction)
  52897. ]);
  52898. const addLink = (state) => {
  52899. links[state.href] = state.el;
  52900. };
  52901. const removeLink = (href) => {
  52902. delete links[href];
  52903. };
  52904. const setCurrentAnchor = (href) => {
  52905. if (currentAnchor.value !== href) {
  52906. currentAnchor.value = href;
  52907. emit(CHANGE_EVENT, href);
  52908. }
  52909. };
  52910. let clearAnimate = null;
  52911. let currentTargetHref = "";
  52912. const scrollToAnchor = (href) => {
  52913. if (!containerEl.value) return;
  52914. const target = getElement(href);
  52915. if (!target) return;
  52916. if (clearAnimate) {
  52917. if (currentTargetHref === href) return;
  52918. clearAnimate();
  52919. }
  52920. currentTargetHref = href;
  52921. isScrolling = true;
  52922. const scrollEle = getScrollElement(target, containerEl.value);
  52923. const distance = getOffsetTopDistance(target, scrollEle);
  52924. const max = scrollEle.scrollHeight - scrollEle.clientHeight;
  52925. const to = Math.min(distance - props.offset, max);
  52926. clearAnimate = animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
  52927. setTimeout(() => {
  52928. isScrolling = false;
  52929. currentTargetHref = "";
  52930. }, 20);
  52931. });
  52932. };
  52933. const scrollTo = (href) => {
  52934. if (href) {
  52935. setCurrentAnchor(href);
  52936. scrollToAnchor(href);
  52937. }
  52938. };
  52939. const handleClick = (e, href) => {
  52940. emit("click", e, href);
  52941. scrollTo(href);
  52942. };
  52943. const handleScroll = throttleByRaf(() => {
  52944. if (containerEl.value) currentScrollTop = getScrollTop(containerEl.value);
  52945. const currentHref = getCurrentHref();
  52946. if (isScrolling || isUndefined(currentHref)) return;
  52947. setCurrentAnchor(currentHref);
  52948. });
  52949. const getCurrentHref = () => {
  52950. if (!containerEl.value) return;
  52951. const scrollTop = getScrollTop(containerEl.value);
  52952. const anchorTopList = [];
  52953. for (const href of Object.keys(links)) {
  52954. const target = getElement(href);
  52955. if (!target) continue;
  52956. const distance = getOffsetTopDistance(target, getScrollElement(target, containerEl.value));
  52957. anchorTopList.push({
  52958. top: distance - props.offset - props.bound,
  52959. href
  52960. });
  52961. }
  52962. anchorTopList.sort((prev, next) => prev.top - next.top);
  52963. for (let i = 0; i < anchorTopList.length; i++) {
  52964. const item = anchorTopList[i];
  52965. const next = anchorTopList[i + 1];
  52966. if (i === 0 && scrollTop === 0) return props.selectScrollTop ? item.href : "";
  52967. if (item.top <= scrollTop && (!next || next.top > scrollTop)) return item.href;
  52968. }
  52969. };
  52970. const getContainer = () => {
  52971. const el = getElement(props.container);
  52972. if (!el || isWindow(el)) containerEl.value = window;
  52973. else containerEl.value = el;
  52974. };
  52975. useEventListener(containerEl, "scroll", handleScroll);
  52976. const updateMarkerStyle = () => {
  52977. nextTick(() => {
  52978. if (!anchorRef.value || !markerRef.value || !currentAnchor.value) {
  52979. markerStyle.value = {};
  52980. return;
  52981. }
  52982. const currentLinkEl = links[currentAnchor.value];
  52983. if (!currentLinkEl) {
  52984. markerStyle.value = {};
  52985. return;
  52986. }
  52987. const anchorRect = anchorRef.value.getBoundingClientRect();
  52988. const markerRect = markerRef.value.getBoundingClientRect();
  52989. const linkRect = currentLinkEl.getBoundingClientRect();
  52990. if (props.direction === "horizontal") markerStyle.value = {
  52991. left: `${linkRect.left - anchorRect.left}px`,
  52992. width: `${linkRect.width}px`,
  52993. opacity: 1
  52994. };
  52995. else markerStyle.value = {
  52996. top: `${linkRect.top - anchorRect.top + (linkRect.height - markerRect.height) / 2}px`,
  52997. opacity: 1
  52998. };
  52999. });
  53000. };
  53001. watch(currentAnchor, updateMarkerStyle);
  53002. watch(() => slots.default?.(), updateMarkerStyle);
  53003. onMounted(() => {
  53004. getContainer();
  53005. const hash = decodeURIComponent(window.location.hash);
  53006. if (getElement(hash)) scrollTo(hash);
  53007. else handleScroll();
  53008. });
  53009. watch(() => props.container, () => {
  53010. getContainer();
  53011. });
  53012. provide(anchorKey, {
  53013. ns,
  53014. direction: props.direction,
  53015. currentAnchor,
  53016. addLink,
  53017. removeLink,
  53018. handleClick
  53019. });
  53020. __expose({ scrollTo });
  53021. return (_ctx, _cache) => {
  53022. return openBlock(), createElementBlock("div", {
  53023. ref_key: "anchorRef",
  53024. ref: anchorRef,
  53025. class: normalizeClass(cls.value)
  53026. }, [__props.marker ? (openBlock(), createElementBlock("div", {
  53027. key: 0,
  53028. ref_key: "markerRef",
  53029. ref: markerRef,
  53030. class: normalizeClass(unref(ns).e("marker")),
  53031. style: normalizeStyle(markerStyle.value)
  53032. }, null, 6)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("list")) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
  53033. };
  53034. }
  53035. });
  53036. //#endregion
  53037. //#region node_modules/element-plus/es/components/anchor/src/anchor-link.mjs
  53038. /**
  53039. * @deprecated Removed after 3.0.0, Use `AnchorLinkProps` instead.
  53040. */
  53041. var anchorLinkProps = buildProps({
  53042. title: String,
  53043. href: String
  53044. });
  53045. //#endregion
  53046. //#region node_modules/element-plus/es/components/anchor/src/anchor-link.vue_vue_type_script_setup_true_lang.mjs
  53047. var _hoisted_1$5 = ["href"];
  53048. //#endregion
  53049. //#region node_modules/element-plus/es/components/anchor/src/anchor-link2.mjs
  53050. var anchor_link_default = /* @__PURE__ */ defineComponent({
  53051. name: "ElAnchorLink",
  53052. __name: "anchor-link",
  53053. props: anchorLinkProps,
  53054. setup(__props) {
  53055. const props = __props;
  53056. const linkRef = ref(null);
  53057. const { ns, direction, currentAnchor, addLink, removeLink, handleClick: contextHandleClick } = inject(anchorKey);
  53058. const cls = computed(() => [ns.e("link"), ns.is("active", currentAnchor.value === props.href)]);
  53059. const handleClick = (e) => {
  53060. contextHandleClick(e, props.href);
  53061. };
  53062. watch(() => props.href, (val, oldVal) => {
  53063. nextTick(() => {
  53064. if (oldVal) removeLink(oldVal);
  53065. if (val) addLink({
  53066. href: val,
  53067. el: linkRef.value
  53068. });
  53069. });
  53070. });
  53071. onMounted(() => {
  53072. const { href } = props;
  53073. if (href) addLink({
  53074. href,
  53075. el: linkRef.value
  53076. });
  53077. });
  53078. onBeforeUnmount(() => {
  53079. const { href } = props;
  53080. if (href) removeLink(href);
  53081. });
  53082. return (_ctx, _cache) => {
  53083. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("a", {
  53084. ref_key: "linkRef",
  53085. ref: linkRef,
  53086. class: normalizeClass(cls.value),
  53087. href: __props.href,
  53088. onClick: handleClick
  53089. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 10, _hoisted_1$5), _ctx.$slots["sub-link"] && unref(direction) === "vertical" ? (openBlock(), createElementBlock("div", {
  53090. key: 0,
  53091. class: normalizeClass(unref(ns).e("list"))
  53092. }, [renderSlot(_ctx.$slots, "sub-link")], 2)) : createCommentVNode("v-if", true)], 2);
  53093. };
  53094. }
  53095. });
  53096. //#endregion
  53097. //#region node_modules/element-plus/es/components/anchor/index.mjs
  53098. var ElAnchor = withInstall(anchor_default, { AnchorLink: anchor_link_default });
  53099. var ElAnchorLink = withNoopInstall(anchor_link_default);
  53100. //#endregion
  53101. //#region node_modules/element-plus/es/components/segmented/src/segmented.mjs
  53102. var defaultProps = {
  53103. label: "label",
  53104. value: "value",
  53105. disabled: "disabled"
  53106. };
  53107. /**
  53108. * @deprecated Removed after 3.0.0, Use `SegmentedProps` instead.
  53109. */
  53110. var segmentedProps = buildProps({
  53111. direction: {
  53112. type: definePropType(String),
  53113. default: "horizontal"
  53114. },
  53115. options: {
  53116. type: definePropType(Array),
  53117. default: () => []
  53118. },
  53119. modelValue: {
  53120. type: [
  53121. String,
  53122. Number,
  53123. Boolean
  53124. ],
  53125. default: void 0
  53126. },
  53127. props: {
  53128. type: definePropType(Object),
  53129. default: () => defaultProps
  53130. },
  53131. block: Boolean,
  53132. size: useSizeProp,
  53133. disabled: {
  53134. type: Boolean,
  53135. default: void 0
  53136. },
  53137. validateEvent: {
  53138. type: Boolean,
  53139. default: true
  53140. },
  53141. id: String,
  53142. name: String,
  53143. ...useAriaProps(["ariaLabel"])
  53144. });
  53145. var segmentedEmits = {
  53146. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  53147. [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
  53148. };
  53149. //#endregion
  53150. //#region node_modules/element-plus/es/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.mjs
  53151. var _hoisted_1$4 = [
  53152. "id",
  53153. "aria-label",
  53154. "aria-labelledby"
  53155. ];
  53156. var _hoisted_2$3 = [
  53157. "name",
  53158. "disabled",
  53159. "checked",
  53160. "onChange"
  53161. ];
  53162. //#endregion
  53163. //#region node_modules/element-plus/es/components/segmented/index.mjs
  53164. var ElSegmented = withInstall(/* @__PURE__ */ defineComponent({
  53165. name: "ElSegmented",
  53166. __name: "segmented",
  53167. props: segmentedProps,
  53168. emits: segmentedEmits,
  53169. setup(__props, { emit: __emit }) {
  53170. const props = __props;
  53171. const emit = __emit;
  53172. const ns = useNamespace("segmented");
  53173. const segmentedId = useId();
  53174. const segmentedSize = useFormSize();
  53175. const _disabled = useFormDisabled();
  53176. const { formItem } = useFormItem();
  53177. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  53178. const segmentedRef = ref(null);
  53179. const activeElement = useActiveElement();
  53180. const state = reactive({
  53181. isInit: false,
  53182. width: 0,
  53183. height: 0,
  53184. translateX: 0,
  53185. translateY: 0,
  53186. focusVisible: false
  53187. });
  53188. const handleChange = (evt, item) => {
  53189. const value = getValue(item);
  53190. emit(UPDATE_MODEL_EVENT, value);
  53191. emit(CHANGE_EVENT, value);
  53192. evt.target.checked = value === props.modelValue;
  53193. };
  53194. const aliasProps = computed(() => ({
  53195. ...defaultProps,
  53196. ...props.props
  53197. }));
  53198. const intoAny = (item) => item;
  53199. const getValue = (item) => {
  53200. return isObject$2(item) ? item[aliasProps.value.value] : item;
  53201. };
  53202. const getLabel = (item) => {
  53203. return isObject$2(item) ? item[aliasProps.value.label] : item;
  53204. };
  53205. const getDisabled = (item) => {
  53206. return !!(_disabled.value || (isObject$2(item) ? item[aliasProps.value.disabled] : false));
  53207. };
  53208. const getSelected = (item) => {
  53209. return props.modelValue === getValue(item);
  53210. };
  53211. const getOption = (value) => {
  53212. return props.options.find((item) => getValue(item) === value);
  53213. };
  53214. const getItemCls = (item) => {
  53215. return [
  53216. ns.e("item"),
  53217. ns.is("selected", getSelected(item)),
  53218. ns.is("disabled", getDisabled(item))
  53219. ];
  53220. };
  53221. const updateSelect = () => {
  53222. if (!segmentedRef.value) return;
  53223. const selectedItem = segmentedRef.value.querySelector(".is-selected");
  53224. const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
  53225. if (!selectedItem || !selectedItemInput) {
  53226. state.width = 0;
  53227. state.height = 0;
  53228. state.translateX = 0;
  53229. state.translateY = 0;
  53230. state.focusVisible = false;
  53231. return;
  53232. }
  53233. state.isInit = true;
  53234. if (props.direction === "vertical") {
  53235. state.height = selectedItem.offsetHeight;
  53236. state.translateY = selectedItem.offsetTop;
  53237. } else {
  53238. state.width = selectedItem.offsetWidth;
  53239. state.translateX = selectedItem.offsetLeft;
  53240. }
  53241. try {
  53242. state.focusVisible = selectedItemInput.matches(":focus-visible");
  53243. } catch {}
  53244. };
  53245. const segmentedCls = computed(() => [
  53246. ns.b(),
  53247. ns.m(segmentedSize.value),
  53248. ns.is("block", props.block)
  53249. ]);
  53250. const selectedStyle = computed(() => ({
  53251. width: props.direction === "vertical" ? "100%" : `${state.width}px`,
  53252. height: props.direction === "vertical" ? `${state.height}px` : "100%",
  53253. transform: props.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`,
  53254. display: state.isInit ? "block" : "none"
  53255. }));
  53256. const selectedCls = computed(() => [
  53257. ns.e("item-selected"),
  53258. ns.is("disabled", getDisabled(getOption(props.modelValue))),
  53259. ns.is("focus-visible", state.focusVisible)
  53260. ]);
  53261. const name = computed(() => {
  53262. return props.name || segmentedId.value;
  53263. });
  53264. useResizeObserver(segmentedRef, updateSelect);
  53265. watch(activeElement, updateSelect);
  53266. watch(() => props.modelValue, () => {
  53267. updateSelect();
  53268. if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
  53269. }, { flush: "post" });
  53270. return (_ctx, _cache) => {
  53271. return __props.options.length ? (openBlock(), createElementBlock("div", {
  53272. key: 0,
  53273. id: unref(inputId),
  53274. ref_key: "segmentedRef",
  53275. ref: segmentedRef,
  53276. class: normalizeClass(segmentedCls.value),
  53277. role: "radiogroup",
  53278. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "segmented" : void 0,
  53279. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
  53280. }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("group"), unref(ns).m(__props.direction)]) }, [createBaseVNode("div", {
  53281. style: normalizeStyle(selectedStyle.value),
  53282. class: normalizeClass(selectedCls.value)
  53283. }, null, 6), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  53284. return openBlock(), createElementBlock("label", {
  53285. key: index,
  53286. class: normalizeClass(getItemCls(item))
  53287. }, [createBaseVNode("input", {
  53288. class: normalizeClass(unref(ns).e("item-input")),
  53289. type: "radio",
  53290. name: name.value,
  53291. disabled: getDisabled(item),
  53292. checked: getSelected(item),
  53293. onChange: ($event) => handleChange($event, item)
  53294. }, null, 42, _hoisted_2$3), createBaseVNode("div", { class: normalizeClass(unref(ns).e("item-label")) }, [renderSlot(_ctx.$slots, "default", { item: intoAny(item) }, () => [createTextVNode(toDisplayString(getLabel(item)), 1)])], 2)], 2);
  53295. }), 128))], 2)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
  53296. };
  53297. }
  53298. }));
  53299. //#endregion
  53300. //#region node_modules/element-plus/es/components/mention/src/helper.mjs
  53301. var filterOption = (pattern, option) => {
  53302. const lowerCase = pattern.toLowerCase();
  53303. return (option.label || option.value || "").toLowerCase().includes(lowerCase);
  53304. };
  53305. var getMentionCtx = (inputEl, prefix, split) => {
  53306. const { selectionEnd } = inputEl;
  53307. if (selectionEnd === null) return;
  53308. const inputValue = inputEl.value;
  53309. const prefixArray = castArray$1(prefix);
  53310. let splitIndex = -1;
  53311. let mentionCtx;
  53312. for (let i = selectionEnd - 1; i >= 0; --i) {
  53313. const char = inputValue[i];
  53314. if (char === split || char === "\n" || char === "\r") {
  53315. splitIndex = i;
  53316. continue;
  53317. }
  53318. if (prefixArray.includes(char)) {
  53319. const end = splitIndex === -1 ? selectionEnd : splitIndex;
  53320. mentionCtx = {
  53321. pattern: inputValue.slice(i + 1, end),
  53322. start: i + 1,
  53323. end,
  53324. prefix: char,
  53325. prefixIndex: i,
  53326. splitIndex,
  53327. selectionEnd
  53328. };
  53329. break;
  53330. }
  53331. }
  53332. return mentionCtx;
  53333. };
  53334. /**
  53335. * fork from textarea-caret-position
  53336. * https://github.com/component/textarea-caret-position
  53337. * The MIT License (MIT)
  53338. * Copyright (c) 2015 Jonathan Ong me@jongleberry.com
  53339. * Permission is hereby granted, free of charge, to any person obtaining a copy
  53340. * of this software and associated documentation files (the "Software"), to deal
  53341. * in the Software without restriction, including without limitation the rights
  53342. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  53343. * copies of the Software, and to permit persons to whom the Software is
  53344. * furnished to do so, subject to the following conditions:
  53345. * The above copyright notice and this permission notice shall be included in all
  53346. * copies or substantial portions of the Software.
  53347. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  53348. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  53349. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  53350. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  53351. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  53352. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  53353. * SOFTWARE.
  53354. */
  53355. var getCursorPosition = (element, options = {
  53356. debug: false,
  53357. useSelectionEnd: false
  53358. }) => {
  53359. const selectionStart = element.selectionStart !== null ? element.selectionStart : 0;
  53360. const selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0;
  53361. const position = options.useSelectionEnd ? selectionEnd : selectionStart;
  53362. const properties = [
  53363. "direction",
  53364. "boxSizing",
  53365. "width",
  53366. "height",
  53367. "overflowX",
  53368. "overflowY",
  53369. "borderTopWidth",
  53370. "borderRightWidth",
  53371. "borderBottomWidth",
  53372. "borderLeftWidth",
  53373. "borderStyle",
  53374. "paddingTop",
  53375. "paddingRight",
  53376. "paddingBottom",
  53377. "paddingLeft",
  53378. "fontStyle",
  53379. "fontVariant",
  53380. "fontWeight",
  53381. "fontStretch",
  53382. "fontSize",
  53383. "fontSizeAdjust",
  53384. "lineHeight",
  53385. "fontFamily",
  53386. "textAlign",
  53387. "textTransform",
  53388. "textIndent",
  53389. "textDecoration",
  53390. "letterSpacing",
  53391. "wordSpacing",
  53392. "tabSize",
  53393. "MozTabSize"
  53394. ];
  53395. if (options.debug) {
  53396. const el = document.querySelector("#input-textarea-caret-position-mirror-div");
  53397. if (el?.parentNode) el.parentNode.removeChild(el);
  53398. }
  53399. const div = document.createElement("div");
  53400. div.id = "input-textarea-caret-position-mirror-div";
  53401. document.body.appendChild(div);
  53402. const style = div.style;
  53403. const computed = window.getComputedStyle(element);
  53404. const isInput = element.nodeName === "INPUT";
  53405. style.whiteSpace = isInput ? "nowrap" : "pre-wrap";
  53406. if (!isInput) style.wordWrap = "break-word";
  53407. style.position = "absolute";
  53408. if (!options.debug) style.visibility = "hidden";
  53409. properties.forEach((prop) => {
  53410. if (isInput && prop === "lineHeight") if (computed.boxSizing === "border-box") {
  53411. const height = Number.parseInt(computed.height);
  53412. const outerHeight = Number.parseInt(computed.paddingTop) + Number.parseInt(computed.paddingBottom) + Number.parseInt(computed.borderTopWidth) + Number.parseInt(computed.borderBottomWidth);
  53413. const targetHeight = outerHeight + Number.parseInt(computed.lineHeight);
  53414. if (height > targetHeight) style.lineHeight = `${height - outerHeight}px`;
  53415. else if (height === targetHeight) style.lineHeight = computed.lineHeight;
  53416. else style.lineHeight = "0";
  53417. } else style.lineHeight = computed.height;
  53418. else style[prop] = computed[prop];
  53419. });
  53420. if (isFirefox()) {
  53421. if (element.scrollHeight > Number.parseInt(computed.height)) style.overflowY = "scroll";
  53422. } else style.overflow = "hidden";
  53423. div.textContent = element.value.slice(0, Math.max(0, position));
  53424. if (isInput && div.textContent) div.textContent = div.textContent.replace(/\s/g, "\xA0");
  53425. const span = document.createElement("span");
  53426. span.textContent = element.value.slice(Math.max(0, position)) || ".";
  53427. span.style.position = "relative";
  53428. span.style.left = `${-element.scrollLeft}px`;
  53429. span.style.top = `${-element.scrollTop}px`;
  53430. div.appendChild(span);
  53431. const relativePosition = {
  53432. top: span.offsetTop + Number.parseInt(computed.borderTopWidth),
  53433. left: span.offsetLeft + Number.parseInt(computed.borderLeftWidth),
  53434. height: Number.parseInt(computed.fontSize) * 1.5
  53435. };
  53436. if (options.debug) span.style.backgroundColor = "#aaa";
  53437. else document.body.removeChild(div);
  53438. if (relativePosition.left >= element.clientWidth) relativePosition.left = element.clientWidth;
  53439. return relativePosition;
  53440. };
  53441. //#endregion
  53442. //#region node_modules/element-plus/es/components/mention/src/mention.mjs
  53443. /**
  53444. * @deprecated Removed after 3.0.0, Use `MentionProps` instead.
  53445. */
  53446. var mentionProps = buildProps({
  53447. ...inputProps,
  53448. options: {
  53449. type: definePropType(Array),
  53450. default: () => []
  53451. },
  53452. prefix: {
  53453. type: definePropType([String, Array]),
  53454. default: "@",
  53455. validator: (val) => {
  53456. if (isString(val)) return val.length === 1;
  53457. return val.every((v) => isString(v) && v.length === 1);
  53458. }
  53459. },
  53460. split: {
  53461. type: String,
  53462. default: " ",
  53463. validator: (val) => val.length === 1
  53464. },
  53465. filterOption: {
  53466. type: definePropType([Boolean, Function]),
  53467. default: () => filterOption,
  53468. validator: (val) => {
  53469. if (val === false) return true;
  53470. return isFunction$1(val);
  53471. }
  53472. },
  53473. placement: {
  53474. type: definePropType(String),
  53475. default: "bottom"
  53476. },
  53477. showArrow: Boolean,
  53478. offset: {
  53479. type: Number,
  53480. default: 0
  53481. },
  53482. whole: Boolean,
  53483. checkIsWhole: { type: definePropType(Function) },
  53484. modelValue: String,
  53485. loading: Boolean,
  53486. popperClass: useTooltipContentProps.popperClass,
  53487. popperStyle: useTooltipContentProps.popperStyle,
  53488. popperOptions: {
  53489. type: definePropType(Object),
  53490. default: () => ({})
  53491. },
  53492. props: {
  53493. type: definePropType(Object),
  53494. default: () => mentionDefaultProps
  53495. }
  53496. });
  53497. var mentionEmits = {
  53498. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  53499. "whole-remove": (pattern, prefix) => isString(pattern) && isString(prefix),
  53500. input: (value) => isString(value),
  53501. search: (pattern, prefix) => isString(pattern) && isString(prefix),
  53502. select: (option, prefix) => isObject$2(option) && isString(prefix),
  53503. focus: (evt) => evt instanceof FocusEvent,
  53504. blur: (evt) => evt instanceof FocusEvent
  53505. };
  53506. var mentionDefaultProps = {
  53507. value: "value",
  53508. label: "label",
  53509. disabled: "disabled"
  53510. };
  53511. //#endregion
  53512. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.mjs
  53513. /**
  53514. * @deprecated Removed after 3.0.0, Use `MentionDropdownProps` instead.
  53515. */
  53516. var mentionDropdownProps = buildProps({
  53517. options: {
  53518. type: definePropType(Array),
  53519. default: () => []
  53520. },
  53521. loading: Boolean,
  53522. disabled: Boolean,
  53523. contentId: String,
  53524. ariaLabel: String
  53525. });
  53526. var mentionDropdownEmits = { select: (option) => isString(option.value) };
  53527. //#endregion
  53528. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.vue_vue_type_script_setup_true_lang.mjs
  53529. var _hoisted_1$3 = [
  53530. "id",
  53531. "aria-disabled",
  53532. "aria-selected",
  53533. "onMousemove",
  53534. "onClick"
  53535. ];
  53536. //#endregion
  53537. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown2.mjs
  53538. var mention_dropdown_default = /* @__PURE__ */ defineComponent({
  53539. name: "ElMentionDropdown",
  53540. __name: "mention-dropdown",
  53541. props: mentionDropdownProps,
  53542. emits: mentionDropdownEmits,
  53543. setup(__props, { expose: __expose, emit: __emit }) {
  53544. const props = __props;
  53545. const emit = __emit;
  53546. const ns = useNamespace("mention");
  53547. const { t } = useLocale();
  53548. const hoveringIndex = ref(-1);
  53549. const scrollbarRef = ref();
  53550. const optionRefs = ref();
  53551. const dropdownRef = ref();
  53552. const optionkls = (item, index) => [
  53553. ns.be("dropdown", "item"),
  53554. ns.is("hovering", hoveringIndex.value === index),
  53555. ns.is("disabled", item.disabled || props.disabled)
  53556. ];
  53557. const handleSelect = (item) => {
  53558. if (item.disabled || props.disabled) return;
  53559. emit("select", item);
  53560. };
  53561. const handleMouseEnter = (index) => {
  53562. hoveringIndex.value = index;
  53563. };
  53564. const filteredAllDisabled = computed(() => props.disabled || props.options.every((item) => item.disabled));
  53565. const hoverOption = computed(() => props.options[hoveringIndex.value]);
  53566. const selectHoverOption = () => {
  53567. if (!hoverOption.value || hoverOption.value.disabled || props.disabled) return;
  53568. emit("select", hoverOption.value);
  53569. };
  53570. const navigateOptions = (direction) => {
  53571. const { options } = props;
  53572. if (options.length === 0 || filteredAllDisabled.value) return;
  53573. if (direction === "next") {
  53574. hoveringIndex.value++;
  53575. if (hoveringIndex.value === options.length) hoveringIndex.value = 0;
  53576. } else if (direction === "prev") {
  53577. hoveringIndex.value--;
  53578. if (hoveringIndex.value < 0) hoveringIndex.value = options.length - 1;
  53579. }
  53580. const option = options[hoveringIndex.value];
  53581. if (option.disabled) {
  53582. navigateOptions(direction);
  53583. return;
  53584. }
  53585. nextTick(() => scrollToOption(option));
  53586. };
  53587. const scrollToOption = (option) => {
  53588. const { options } = props;
  53589. const index = options.findIndex((item) => item.value === option.value);
  53590. const target = optionRefs.value?.[index];
  53591. if (target) {
  53592. const menu = dropdownRef.value?.querySelector?.(`.${ns.be("dropdown", "wrap")}`);
  53593. if (menu) scrollIntoView(menu, target);
  53594. }
  53595. scrollbarRef.value?.handleScroll();
  53596. };
  53597. const resetHoveringIndex = () => {
  53598. if (filteredAllDisabled.value || props.options.length === 0) hoveringIndex.value = -1;
  53599. else hoveringIndex.value = props.options.findIndex((item) => !item.disabled);
  53600. };
  53601. watch(() => props.options, resetHoveringIndex, { immediate: true });
  53602. __expose({
  53603. hoveringIndex,
  53604. navigateOptions,
  53605. selectHoverOption,
  53606. hoverOption
  53607. });
  53608. return (_ctx, _cache) => {
  53609. return openBlock(), createElementBlock("div", {
  53610. ref_key: "dropdownRef",
  53611. ref: dropdownRef,
  53612. class: normalizeClass(unref(ns).b("dropdown"))
  53613. }, [
  53614. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  53615. key: 0,
  53616. class: normalizeClass(unref(ns).be("dropdown", "header"))
  53617. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  53618. withDirectives(createVNode(unref(ElScrollbar), {
  53619. id: __props.contentId,
  53620. ref_key: "scrollbarRef",
  53621. ref: scrollbarRef,
  53622. tag: "ul",
  53623. "wrap-class": unref(ns).be("dropdown", "wrap"),
  53624. "view-class": unref(ns).be("dropdown", "list"),
  53625. role: "listbox",
  53626. "aria-label": __props.ariaLabel,
  53627. "aria-orientation": "vertical"
  53628. }, {
  53629. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  53630. return openBlock(), createElementBlock("li", {
  53631. id: `${__props.contentId}-${index}`,
  53632. ref_for: true,
  53633. ref_key: "optionRefs",
  53634. ref: optionRefs,
  53635. key: index,
  53636. class: normalizeClass(optionkls(item, index)),
  53637. role: "option",
  53638. "aria-disabled": item.disabled || __props.disabled || void 0,
  53639. "aria-selected": hoveringIndex.value === index,
  53640. onMousemove: ($event) => handleMouseEnter(index),
  53641. onClick: withModifiers(($event) => handleSelect(item), ["stop"])
  53642. }, [renderSlot(_ctx.$slots, "label", {
  53643. item,
  53644. index
  53645. }, () => [createBaseVNode("span", null, toDisplayString(item.label ?? item.value), 1)])], 42, _hoisted_1$3);
  53646. }), 128))]),
  53647. _: 3
  53648. }, 8, [
  53649. "id",
  53650. "wrap-class",
  53651. "view-class",
  53652. "aria-label"
  53653. ]), [[vShow, __props.options.length > 0 && !__props.loading]]),
  53654. __props.loading ? (openBlock(), createElementBlock("div", {
  53655. key: 1,
  53656. class: normalizeClass(unref(ns).be("dropdown", "loading"))
  53657. }, [renderSlot(_ctx.$slots, "loading", {}, () => [createTextVNode(toDisplayString(unref(t)("el.mention.loading")), 1)])], 2)) : createCommentVNode("v-if", true),
  53658. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  53659. key: 2,
  53660. class: normalizeClass(unref(ns).be("dropdown", "footer"))
  53661. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  53662. ], 2);
  53663. };
  53664. }
  53665. });
  53666. //#endregion
  53667. //#region node_modules/element-plus/es/components/mention/index.mjs
  53668. var ElMention = withInstall(/* @__PURE__ */ defineComponent({
  53669. name: "ElMention",
  53670. inheritAttrs: false,
  53671. __name: "mention",
  53672. props: mentionProps,
  53673. emits: mentionEmits,
  53674. setup(__props, { expose: __expose, emit: __emit }) {
  53675. const props = __props;
  53676. const emit = __emit;
  53677. const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
  53678. const ns = useNamespace("mention");
  53679. const disabled = useFormDisabled();
  53680. const contentId = useId();
  53681. const elInputRef = ref();
  53682. const tooltipRef = ref();
  53683. const dropdownRef = ref();
  53684. const visible = ref(false);
  53685. const cursorStyle = ref();
  53686. const mentionCtx = ref();
  53687. const computedPlacement = computed(() => props.showArrow ? props.placement : `${props.placement}-start`);
  53688. const computedFallbackPlacements = computed(() => props.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"]);
  53689. const aliasProps = computed(() => ({
  53690. ...mentionDefaultProps,
  53691. ...props.props
  53692. }));
  53693. const mapOption = (option) => {
  53694. const base = {
  53695. label: option[aliasProps.value.label],
  53696. value: option[aliasProps.value.value],
  53697. disabled: option[aliasProps.value.disabled]
  53698. };
  53699. return {
  53700. ...option,
  53701. ...base
  53702. };
  53703. };
  53704. const options = computed(() => props.options.map(mapOption));
  53705. const filteredOptions = computed(() => {
  53706. const { filterOption } = props;
  53707. if (!mentionCtx.value || !filterOption) return options.value;
  53708. return options.value.filter((option) => filterOption(mentionCtx.value.pattern, option));
  53709. });
  53710. const dropdownVisible = computed(() => {
  53711. return visible.value && (!!filteredOptions.value.length || props.loading);
  53712. });
  53713. const hoveringId = computed(() => {
  53714. return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`;
  53715. });
  53716. const handleInputChange = (value) => {
  53717. emit(UPDATE_MODEL_EVENT, value);
  53718. emit(INPUT_EVENT, value);
  53719. syncAfterCursorMove();
  53720. };
  53721. const handleInputKeyDown = (event) => {
  53722. if (elInputRef.value?.isComposing) return;
  53723. const code = getEventCode(event);
  53724. switch (code) {
  53725. case EVENT_CODE.left:
  53726. case EVENT_CODE.right:
  53727. syncAfterCursorMove();
  53728. break;
  53729. case EVENT_CODE.up:
  53730. case EVENT_CODE.down:
  53731. if (!visible.value) return;
  53732. event.preventDefault();
  53733. dropdownRef.value?.navigateOptions(code === EVENT_CODE.up ? "prev" : "next");
  53734. break;
  53735. case EVENT_CODE.enter:
  53736. case EVENT_CODE.numpadEnter:
  53737. if (!visible.value) {
  53738. props.type !== "textarea" && syncAfterCursorMove();
  53739. return;
  53740. }
  53741. event.preventDefault();
  53742. if (dropdownRef.value?.hoverOption) dropdownRef.value?.selectHoverOption();
  53743. else visible.value = false;
  53744. break;
  53745. case EVENT_CODE.esc:
  53746. if (!visible.value) return;
  53747. event.preventDefault();
  53748. visible.value = false;
  53749. break;
  53750. case EVENT_CODE.backspace: if (props.whole && mentionCtx.value) {
  53751. const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } = mentionCtx.value;
  53752. const inputEl = getInputEl();
  53753. if (!inputEl) return;
  53754. const inputValue = inputEl.value;
  53755. const matchOption = options.value.find((item) => item.value === pattern);
  53756. if ((isFunction$1(props.checkIsWhole) ? props.checkIsWhole(pattern, prefix) : matchOption) && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {
  53757. event.preventDefault();
  53758. const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1);
  53759. emit(UPDATE_MODEL_EVENT, newValue);
  53760. emit(INPUT_EVENT, newValue);
  53761. emit("whole-remove", pattern, prefix);
  53762. const newSelectionEnd = prefixIndex;
  53763. nextTick(() => {
  53764. inputEl.selectionStart = newSelectionEnd;
  53765. inputEl.selectionEnd = newSelectionEnd;
  53766. syncDropdownVisible();
  53767. });
  53768. }
  53769. }
  53770. }
  53771. };
  53772. const { wrapperRef } = useFocusController(elInputRef, {
  53773. disabled,
  53774. afterFocus() {
  53775. syncAfterCursorMove();
  53776. },
  53777. beforeBlur(event) {
  53778. return tooltipRef.value?.isFocusInsideContent(event);
  53779. },
  53780. afterBlur() {
  53781. visible.value = false;
  53782. }
  53783. });
  53784. const handleInputMouseDown = () => {
  53785. syncAfterCursorMove();
  53786. };
  53787. const getOriginalOption = (mentionOption) => {
  53788. return props.options.find((option) => {
  53789. return mentionOption.value === option[aliasProps.value.value];
  53790. });
  53791. };
  53792. const handleSelect = (item) => {
  53793. if (!mentionCtx.value) return;
  53794. const inputEl = getInputEl();
  53795. if (!inputEl) return;
  53796. const inputValue = inputEl.value;
  53797. const { split } = props;
  53798. const newEndPart = inputValue.slice(mentionCtx.value.end);
  53799. const alreadySeparated = newEndPart.startsWith(split);
  53800. const newMiddlePart = `${item.value}${alreadySeparated ? "" : split}`;
  53801. const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart;
  53802. emit(UPDATE_MODEL_EVENT, newValue);
  53803. emit(INPUT_EVENT, newValue);
  53804. emit("select", getOriginalOption(item), mentionCtx.value.prefix);
  53805. const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0);
  53806. nextTick(() => {
  53807. inputEl.selectionStart = newSelectionEnd;
  53808. inputEl.selectionEnd = newSelectionEnd;
  53809. inputEl.focus();
  53810. syncDropdownVisible();
  53811. });
  53812. };
  53813. const getInputEl = () => props.type === "textarea" ? elInputRef.value?.textarea : elInputRef.value?.input;
  53814. const syncAfterCursorMove = () => {
  53815. setTimeout(() => {
  53816. syncCursor();
  53817. syncDropdownVisible();
  53818. nextTick(() => tooltipRef.value?.updatePopper());
  53819. }, 0);
  53820. };
  53821. const syncCursor = () => {
  53822. const inputEl = getInputEl();
  53823. if (!inputEl) return;
  53824. const caretPosition = getCursorPosition(inputEl);
  53825. const inputRect = inputEl.getBoundingClientRect();
  53826. const wrapperRect = wrapperRef.value.getBoundingClientRect();
  53827. cursorStyle.value = {
  53828. position: "absolute",
  53829. width: 0,
  53830. height: `${caretPosition.height}px`,
  53831. left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,
  53832. top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`
  53833. };
  53834. };
  53835. const syncDropdownVisible = () => {
  53836. const inputEl = getInputEl();
  53837. if (document.activeElement !== inputEl) {
  53838. visible.value = false;
  53839. return;
  53840. }
  53841. const { prefix, split } = props;
  53842. mentionCtx.value = getMentionCtx(inputEl, prefix, split);
  53843. if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {
  53844. visible.value = true;
  53845. emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix);
  53846. return;
  53847. }
  53848. visible.value = false;
  53849. };
  53850. __expose({
  53851. input: elInputRef,
  53852. tooltip: tooltipRef,
  53853. dropdownVisible
  53854. });
  53855. return (_ctx, _cache) => {
  53856. return openBlock(), createElementBlock("div", {
  53857. ref_key: "wrapperRef",
  53858. ref: wrapperRef,
  53859. class: normalizeClass(unref(ns).b())
  53860. }, [createVNode(unref(ElInput), mergeProps(mergeProps(passInputProps.value, _ctx.$attrs), {
  53861. ref_key: "elInputRef",
  53862. ref: elInputRef,
  53863. "model-value": __props.modelValue,
  53864. disabled: unref(disabled),
  53865. role: dropdownVisible.value ? "combobox" : void 0,
  53866. "aria-activedescendant": dropdownVisible.value ? hoveringId.value || "" : void 0,
  53867. "aria-controls": dropdownVisible.value ? unref(contentId) : void 0,
  53868. "aria-expanded": dropdownVisible.value || void 0,
  53869. "aria-label": __props.ariaLabel,
  53870. "aria-autocomplete": dropdownVisible.value ? "none" : void 0,
  53871. "aria-haspopup": dropdownVisible.value ? "listbox" : void 0,
  53872. onInput: handleInputChange,
  53873. onKeydown: handleInputKeyDown,
  53874. onMousedown: handleInputMouseDown
  53875. }), createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  53876. return {
  53877. name,
  53878. fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
  53879. };
  53880. })]), 1040, [
  53881. "model-value",
  53882. "disabled",
  53883. "role",
  53884. "aria-activedescendant",
  53885. "aria-controls",
  53886. "aria-expanded",
  53887. "aria-label",
  53888. "aria-autocomplete",
  53889. "aria-haspopup"
  53890. ]), createVNode(unref(ElTooltip), {
  53891. ref_key: "tooltipRef",
  53892. ref: tooltipRef,
  53893. visible: dropdownVisible.value,
  53894. "popper-class": [unref(ns).e("popper"), __props.popperClass],
  53895. "popper-style": __props.popperStyle,
  53896. "popper-options": __props.popperOptions,
  53897. placement: computedPlacement.value,
  53898. "fallback-placements": computedFallbackPlacements.value,
  53899. effect: "light",
  53900. pure: "",
  53901. offset: __props.offset,
  53902. "show-arrow": __props.showArrow
  53903. }, {
  53904. default: withCtx(() => [createBaseVNode("div", { style: normalizeStyle(cursorStyle.value) }, null, 4)]),
  53905. content: withCtx(() => [createVNode(mention_dropdown_default, {
  53906. ref_key: "dropdownRef",
  53907. ref: dropdownRef,
  53908. options: filteredOptions.value,
  53909. disabled: unref(disabled),
  53910. loading: __props.loading,
  53911. "content-id": unref(contentId),
  53912. "aria-label": __props.ariaLabel,
  53913. onSelect: handleSelect,
  53914. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => elInputRef.value?.focus(), ["stop"]))
  53915. }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  53916. return {
  53917. name,
  53918. fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
  53919. };
  53920. })]), 1032, [
  53921. "options",
  53922. "disabled",
  53923. "loading",
  53924. "content-id",
  53925. "aria-label"
  53926. ])]),
  53927. _: 3
  53928. }, 8, [
  53929. "visible",
  53930. "popper-class",
  53931. "popper-style",
  53932. "popper-options",
  53933. "placement",
  53934. "fallback-placements",
  53935. "offset",
  53936. "show-arrow"
  53937. ])], 2);
  53938. };
  53939. }
  53940. }));
  53941. //#endregion
  53942. //#region node_modules/element-plus/es/components/splitter/src/splitter.mjs
  53943. /**
  53944. * @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
  53945. */
  53946. var splitterProps = buildProps({
  53947. layout: {
  53948. type: String,
  53949. default: "horizontal",
  53950. values: ["horizontal", "vertical"]
  53951. },
  53952. lazy: Boolean
  53953. });
  53954. var splitterEmits = {
  53955. resizeStart: (index, sizes) => true,
  53956. resize: (index, sizes) => true,
  53957. resizeEnd: (index, sizes) => true,
  53958. collapse: (index, type, sizes) => true
  53959. };
  53960. //#endregion
  53961. //#region node_modules/element-plus/es/components/splitter/src/split-panel.mjs
  53962. /**
  53963. * @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
  53964. */
  53965. var splitterPanelProps = buildProps({
  53966. min: { type: [String, Number] },
  53967. max: { type: [String, Number] },
  53968. size: { type: [String, Number] },
  53969. resizable: {
  53970. type: Boolean,
  53971. default: true
  53972. },
  53973. collapsible: Boolean
  53974. });
  53975. var splitterPanelEmits = { "update:size": (value) => typeof value === "number" || typeof value === "string" };
  53976. //#endregion
  53977. //#region node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
  53978. function useContainer(layout) {
  53979. const containerEl = ref();
  53980. const { width, height } = useElementSize(containerEl);
  53981. return {
  53982. containerEl,
  53983. containerSize: computed(() => {
  53984. return layout.value === "horizontal" ? width.value : height.value;
  53985. })
  53986. };
  53987. }
  53988. //#endregion
  53989. //#region node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
  53990. function getPct(str) {
  53991. return Number(str.slice(0, -1)) / 100;
  53992. }
  53993. function getPx(str) {
  53994. return Number(str.slice(0, -2));
  53995. }
  53996. function isPct(itemSize) {
  53997. return isString(itemSize) && itemSize.endsWith("%");
  53998. }
  53999. function isPx(itemSize) {
  54000. return isString(itemSize) && itemSize.endsWith("px");
  54001. }
  54002. function useSize$1(panels, containerSize) {
  54003. const propSizes = computed(() => panels.value.map((i) => i.size));
  54004. const panelCounts = computed(() => panels.value.length);
  54005. const percentSizes = ref([]);
  54006. watch([
  54007. propSizes,
  54008. panelCounts,
  54009. containerSize
  54010. ], () => {
  54011. let ptgList = [];
  54012. let emptyCount = 0;
  54013. for (let i = 0; i < panelCounts.value; i += 1) {
  54014. const itemSize = panels.value[i]?.size;
  54015. if (isPct(itemSize)) ptgList[i] = getPct(itemSize);
  54016. else if (isPx(itemSize)) ptgList[i] = getPx(itemSize) / containerSize.value;
  54017. else if (itemSize || itemSize === 0) {
  54018. const num = Number(itemSize);
  54019. if (!Number.isNaN(num)) ptgList[i] = num / containerSize.value;
  54020. } else {
  54021. emptyCount += 1;
  54022. ptgList[i] = void 0;
  54023. }
  54024. }
  54025. const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
  54026. if (totalPtg > 1 || !emptyCount) {
  54027. const scale = 1 / totalPtg;
  54028. ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale);
  54029. } else {
  54030. const avgRest = (1 - totalPtg) / emptyCount;
  54031. ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg);
  54032. }
  54033. percentSizes.value = ptgList;
  54034. });
  54035. const ptg2px = (ptg) => ptg * containerSize.value;
  54036. return {
  54037. percentSizes,
  54038. pxSizes: computed(() => percentSizes.value.map(ptg2px))
  54039. };
  54040. }
  54041. //#endregion
  54042. //#region node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
  54043. function useResize(panels, containerSize, pxSizes, lazy) {
  54044. const ptg2px = (ptg) => ptg * containerSize.value || 0;
  54045. function getLimitSize(str, defaultLimit) {
  54046. if (isPct(str)) return ptg2px(getPct(str));
  54047. else if (isPx(str)) return getPx(str);
  54048. return str ?? defaultLimit;
  54049. }
  54050. const lazyOffset = ref(0);
  54051. const movingIndex = ref(null);
  54052. let cachePxSizes = [];
  54053. let updatePanelSizes = NOOP;
  54054. const limitSizes = computed(() => panels.value.map((item) => [item.min, item.max]));
  54055. watch(lazy, () => {
  54056. if (lazyOffset.value) {
  54057. const mouseup = new MouseEvent("mouseup", { bubbles: true });
  54058. window.dispatchEvent(mouseup);
  54059. }
  54060. });
  54061. const onMoveStart = (index) => {
  54062. lazyOffset.value = 0;
  54063. movingIndex.value = {
  54064. index,
  54065. confirmed: false
  54066. };
  54067. cachePxSizes = pxSizes.value;
  54068. };
  54069. const onMoving = (index, offset) => {
  54070. let confirmedIndex = null;
  54071. if ((!movingIndex.value || !movingIndex.value.confirmed) && offset !== 0) {
  54072. if (offset > 0) {
  54073. confirmedIndex = index;
  54074. movingIndex.value = {
  54075. index,
  54076. confirmed: true
  54077. };
  54078. } else for (let i = index; i >= 0; i -= 1) if (cachePxSizes[i] > 0) {
  54079. confirmedIndex = i;
  54080. movingIndex.value = {
  54081. index: i,
  54082. confirmed: true
  54083. };
  54084. break;
  54085. }
  54086. }
  54087. const mergedIndex = confirmedIndex ?? movingIndex.value?.index ?? index;
  54088. const numSizes = [...cachePxSizes];
  54089. const nextIndex = mergedIndex + 1;
  54090. const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0);
  54091. const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0);
  54092. const startMaxSize = getLimitSize(limitSizes.value[mergedIndex][1], containerSize.value || 0);
  54093. const endMaxSize = getLimitSize(limitSizes.value[nextIndex][1], containerSize.value || 0);
  54094. let mergedOffset = offset;
  54095. if (numSizes[mergedIndex] + mergedOffset < startMinSize) mergedOffset = startMinSize - numSizes[mergedIndex];
  54096. if (numSizes[nextIndex] - mergedOffset < endMinSize) mergedOffset = numSizes[nextIndex] - endMinSize;
  54097. if (numSizes[mergedIndex] + mergedOffset > startMaxSize) mergedOffset = startMaxSize - numSizes[mergedIndex];
  54098. if (numSizes[nextIndex] - mergedOffset > endMaxSize) mergedOffset = numSizes[nextIndex] - endMaxSize;
  54099. numSizes[mergedIndex] += mergedOffset;
  54100. numSizes[nextIndex] -= mergedOffset;
  54101. lazyOffset.value = mergedOffset;
  54102. updatePanelSizes = () => {
  54103. panels.value.forEach((panel, index) => {
  54104. panel.size = numSizes[index];
  54105. });
  54106. updatePanelSizes = NOOP;
  54107. };
  54108. if (!lazy.value) updatePanelSizes();
  54109. };
  54110. const onMoveEnd = () => {
  54111. if (lazy.value) updatePanelSizes();
  54112. lazyOffset.value = 0;
  54113. movingIndex.value = null;
  54114. cachePxSizes = [];
  54115. };
  54116. const cacheCollapsedSize = [];
  54117. const onCollapse = (index, type) => {
  54118. if (!cacheCollapsedSize.length) cacheCollapsedSize.push(...pxSizes.value);
  54119. const currentSizes = pxSizes.value;
  54120. const currentIndex = type === "start" ? index : index + 1;
  54121. const targetIndex = type === "start" ? index + 1 : index;
  54122. const currentSize = currentSizes[currentIndex];
  54123. const targetSize = currentSizes[targetIndex];
  54124. if (currentSize !== 0 && targetSize !== 0) {
  54125. currentSizes[currentIndex] = 0;
  54126. currentSizes[targetIndex] += currentSize;
  54127. cacheCollapsedSize[index] = currentSize;
  54128. } else {
  54129. const totalSize = currentSize + targetSize;
  54130. const targetCacheCollapsedSize = cacheCollapsedSize[index];
  54131. const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
  54132. currentSizes[targetIndex] = targetCacheCollapsedSize;
  54133. currentSizes[currentIndex] = currentCacheCollapsedSize;
  54134. }
  54135. panels.value.forEach((panel, index) => {
  54136. panel.size = currentSizes[index];
  54137. });
  54138. };
  54139. return {
  54140. lazyOffset,
  54141. onMoveStart,
  54142. onMoving,
  54143. onMoveEnd,
  54144. movingIndex,
  54145. onCollapse
  54146. };
  54147. }
  54148. //#endregion
  54149. //#region node_modules/element-plus/es/components/splitter/src/type.mjs
  54150. var splitterRootContextKey = Symbol("splitterRootContextKey");
  54151. //#endregion
  54152. //#region node_modules/element-plus/es/components/splitter/src/splitter2.mjs
  54153. var splitter_default = /* @__PURE__ */ defineComponent({
  54154. name: "ElSplitter",
  54155. __name: "splitter",
  54156. props: splitterProps,
  54157. emits: splitterEmits,
  54158. setup(__props, { emit: __emit }) {
  54159. const ns = useNamespace("splitter");
  54160. const emits = __emit;
  54161. const props = __props;
  54162. const layout = toRef(props, "layout");
  54163. const lazy = toRef(props, "lazy");
  54164. const { containerEl, containerSize } = useContainer(layout);
  54165. const { removeChild: unregisterPanel, children: panels, addChild: registerPanel, ChildrenSorter: PanelsSorter } = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
  54166. watch(panels, () => {
  54167. movingIndex.value = null;
  54168. panels.value.forEach((instance, index) => {
  54169. instance.setIndex(index);
  54170. });
  54171. });
  54172. const { percentSizes, pxSizes } = useSize$1(panels, containerSize);
  54173. const { lazyOffset, movingIndex, onMoveStart, onMoving, onMoveEnd, onCollapse } = useResize(panels, containerSize, pxSizes, lazy);
  54174. const splitterStyles = computed(() => {
  54175. return { [ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0 };
  54176. });
  54177. const onResizeStart = (index) => {
  54178. onMoveStart(index);
  54179. emits("resizeStart", index, pxSizes.value);
  54180. };
  54181. const onResize = (index, offset) => {
  54182. onMoving(index, offset);
  54183. if (!lazy.value) emits("resize", index, pxSizes.value);
  54184. };
  54185. const onResizeEnd = async (index) => {
  54186. onMoveEnd();
  54187. await nextTick();
  54188. emits("resizeEnd", index, pxSizes.value);
  54189. };
  54190. const onCollapsible = (index, type) => {
  54191. onCollapse(index, type);
  54192. emits("collapse", index, type, pxSizes.value);
  54193. };
  54194. provide(splitterRootContextKey, reactive({
  54195. panels,
  54196. percentSizes,
  54197. pxSizes,
  54198. layout,
  54199. lazy,
  54200. movingIndex,
  54201. containerSize,
  54202. onMoveStart: onResizeStart,
  54203. onMoving: onResize,
  54204. onMoveEnd: onResizeEnd,
  54205. onCollapse: onCollapsible,
  54206. registerPanel,
  54207. unregisterPanel
  54208. }));
  54209. return (_ctx, _cache) => {
  54210. return openBlock(), createElementBlock("div", {
  54211. ref_key: "containerEl",
  54212. ref: containerEl,
  54213. class: normalizeClass([unref(ns).b(), unref(ns).e(layout.value)]),
  54214. style: normalizeStyle(splitterStyles.value)
  54215. }, [
  54216. renderSlot(_ctx.$slots, "default"),
  54217. createVNode(unref(PanelsSorter)),
  54218. createCommentVNode(" Prevent iframe touch events from breaking "),
  54219. unref(movingIndex) ? (openBlock(), createElementBlock("div", {
  54220. key: 0,
  54221. class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout.value}`)])
  54222. }, null, 2)) : createCommentVNode("v-if", true)
  54223. ], 6);
  54224. };
  54225. }
  54226. });
  54227. //#endregion
  54228. //#region node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
  54229. function getCollapsible(collapsible) {
  54230. if (collapsible && isObject$2(collapsible)) return collapsible;
  54231. return {
  54232. start: !!collapsible,
  54233. end: !!collapsible
  54234. };
  54235. }
  54236. function isCollapsible(panel, size, nextPanel, nextSize) {
  54237. if (panel?.collapsible.end && size > 0) return true;
  54238. if (nextPanel?.collapsible.start && nextSize === 0 && size > 0) return true;
  54239. return false;
  54240. }
  54241. //#endregion
  54242. //#region node_modules/element-plus/es/components/splitter/src/split-bar.mjs
  54243. var split_bar_default = /* @__PURE__ */ defineComponent({
  54244. name: "ElSplitterBar",
  54245. __name: "split-bar",
  54246. props: {
  54247. index: {
  54248. type: Number,
  54249. required: true
  54250. },
  54251. layout: {
  54252. type: String,
  54253. values: ["horizontal", "vertical"],
  54254. default: "horizontal"
  54255. },
  54256. resizable: {
  54257. type: Boolean,
  54258. default: true
  54259. },
  54260. lazy: Boolean,
  54261. startCollapsible: Boolean,
  54262. endCollapsible: Boolean
  54263. },
  54264. emits: [
  54265. "moveStart",
  54266. "moving",
  54267. "moveEnd",
  54268. "collapse"
  54269. ],
  54270. setup(__props, { emit: __emit }) {
  54271. const ns = useNamespace("splitter-bar");
  54272. const props = __props;
  54273. const emit = __emit;
  54274. const isHorizontal = computed(() => props.layout === "horizontal");
  54275. const barWrapStyles = computed(() => {
  54276. if (isHorizontal.value) return { width: 0 };
  54277. return { height: 0 };
  54278. });
  54279. const draggerStyles = computed(() => {
  54280. return {
  54281. width: isHorizontal.value ? "16px" : "100%",
  54282. height: isHorizontal.value ? "100%" : "16px",
  54283. cursor: !props.resizable ? "auto" : isHorizontal.value ? "ew-resize" : "ns-resize",
  54284. touchAction: "none"
  54285. };
  54286. });
  54287. const draggerPseudoClass = computed(() => {
  54288. const prefix = ns.e("dragger");
  54289. return {
  54290. [`${prefix}-horizontal`]: isHorizontal.value,
  54291. [`${prefix}-vertical`]: !isHorizontal.value,
  54292. [`${prefix}-active`]: !!startPos.value
  54293. };
  54294. });
  54295. const startPos = ref(null);
  54296. const onMousedown = (e) => {
  54297. if (!props.resizable) return;
  54298. startPos.value = [e.pageX, e.pageY];
  54299. emit("moveStart", props.index);
  54300. window.addEventListener("mouseup", onMouseUp);
  54301. window.addEventListener("mousemove", onMouseMove);
  54302. };
  54303. const onTouchStart = (e) => {
  54304. if (props.resizable && e.touches.length === 1) {
  54305. e.preventDefault();
  54306. const touch = e.touches[0];
  54307. startPos.value = [touch.pageX, touch.pageY];
  54308. emit("moveStart", props.index);
  54309. window.addEventListener("touchend", onTouchEnd);
  54310. window.addEventListener("touchmove", onTouchMove);
  54311. }
  54312. };
  54313. const onMouseMove = (e) => {
  54314. const { pageX, pageY } = e;
  54315. const offsetX = pageX - startPos.value[0];
  54316. const offsetY = pageY - startPos.value[1];
  54317. const offset = isHorizontal.value ? offsetX : offsetY;
  54318. emit("moving", props.index, offset);
  54319. };
  54320. const onTouchMove = (e) => {
  54321. if (e.touches.length === 1) {
  54322. e.preventDefault();
  54323. const touch = e.touches[0];
  54324. const offsetX = touch.pageX - startPos.value[0];
  54325. const offsetY = touch.pageY - startPos.value[1];
  54326. const offset = isHorizontal.value ? offsetX : offsetY;
  54327. emit("moving", props.index, offset);
  54328. }
  54329. };
  54330. const onMouseUp = () => {
  54331. startPos.value = null;
  54332. window.removeEventListener("mouseup", onMouseUp);
  54333. window.removeEventListener("mousemove", onMouseMove);
  54334. emit("moveEnd", props.index);
  54335. };
  54336. const onTouchEnd = () => {
  54337. startPos.value = null;
  54338. window.removeEventListener("touchend", onTouchEnd);
  54339. window.removeEventListener("touchmove", onTouchMove);
  54340. emit("moveEnd", props.index);
  54341. };
  54342. const StartIcon = computed(() => isHorizontal.value ? arrow_left_default : arrow_up_default);
  54343. const EndIcon = computed(() => isHorizontal.value ? arrow_right_default : arrow_down_default);
  54344. return (_ctx, _cache) => {
  54345. return openBlock(), createElementBlock("div", {
  54346. class: normalizeClass([unref(ns).b()]),
  54347. style: normalizeStyle(barWrapStyles.value)
  54348. }, [
  54349. __props.startCollapsible ? (openBlock(), createElementBlock("div", {
  54350. key: 0,
  54351. class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]),
  54352. onClick: _cache[0] || (_cache[0] = ($event) => emit("collapse", __props.index, "start"))
  54353. }, [renderSlot(_ctx.$slots, "start-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(StartIcon.value), { style: {
  54354. "width": "12px",
  54355. "height": "12px"
  54356. } }))])], 2)) : createCommentVNode("v-if", true),
  54357. createBaseVNode("div", {
  54358. class: normalizeClass([
  54359. unref(ns).e("dragger"),
  54360. draggerPseudoClass.value,
  54361. unref(ns).is("disabled", !__props.resizable),
  54362. unref(ns).is("lazy", __props.resizable && __props.lazy)
  54363. ]),
  54364. style: normalizeStyle(draggerStyles.value),
  54365. onMousedown,
  54366. onTouchstart: onTouchStart
  54367. }, null, 38),
  54368. __props.endCollapsible ? (openBlock(), createElementBlock("div", {
  54369. key: 1,
  54370. class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]),
  54371. onClick: _cache[1] || (_cache[1] = ($event) => emit("collapse", __props.index, "end"))
  54372. }, [renderSlot(_ctx.$slots, "end-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(EndIcon.value), { style: {
  54373. "width": "12px",
  54374. "height": "12px"
  54375. } }))])], 2)) : createCommentVNode("v-if", true)
  54376. ], 6);
  54377. };
  54378. }
  54379. });
  54380. //#endregion
  54381. //#region node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs
  54382. var COMPONENT_NAME = "ElSplitterPanel";
  54383. //#endregion
  54384. //#region node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
  54385. var split_panel_default = /* @__PURE__ */ defineComponent({
  54386. name: COMPONENT_NAME,
  54387. __name: "split-panel",
  54388. props: splitterPanelProps,
  54389. emits: splitterPanelEmits,
  54390. setup(__props, { expose: __expose, emit: __emit }) {
  54391. const ns = useNamespace("splitter-panel");
  54392. const props = __props;
  54393. const emits = __emit;
  54394. const splitterContext = inject(splitterRootContextKey);
  54395. if (!splitterContext) throwError(COMPONENT_NAME, "usage: <el-splitter><el-splitter-panel /></el-splitter/>");
  54396. const { panels, layout, lazy, containerSize, pxSizes } = toRefs(splitterContext);
  54397. const { registerPanel, unregisterPanel, onCollapse, onMoveEnd, onMoveStart, onMoving } = splitterContext;
  54398. const panelEl = ref();
  54399. const instance = getCurrentInstance();
  54400. const uid = instance.uid;
  54401. const index = ref(0);
  54402. const panel = computed(() => panels.value[index.value]);
  54403. const setIndex = (val) => {
  54404. index.value = val;
  54405. };
  54406. const panelSize = computed(() => {
  54407. if (!panel.value) return 0;
  54408. return pxSizes.value[index.value] ?? 0;
  54409. });
  54410. const nextSize = computed(() => {
  54411. if (!panel.value) return 0;
  54412. return pxSizes.value[index.value + 1] ?? 0;
  54413. });
  54414. const nextPanel = computed(() => {
  54415. if (panel.value) return panels.value[index.value + 1];
  54416. return null;
  54417. });
  54418. const isResizable = computed(() => {
  54419. if (!nextPanel.value) return false;
  54420. return props.resizable && nextPanel.value?.resizable && (panelSize.value !== 0 || !props.min) && (nextSize.value !== 0 || !nextPanel.value.min);
  54421. });
  54422. const isShowBar = computed(() => {
  54423. if (!panel.value) return false;
  54424. return index.value !== panels.value.length - 1;
  54425. });
  54426. const startCollapsible = computed(() => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value));
  54427. const endCollapsible = computed(() => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value));
  54428. function sizeToPx(str) {
  54429. if (isPct(str)) return getPct(str) * containerSize.value || 0;
  54430. else if (isPx(str)) return getPx(str);
  54431. return str ?? 0;
  54432. }
  54433. let isSizeUpdating = false;
  54434. watch(() => props.size, () => {
  54435. if (!isSizeUpdating && panel.value) {
  54436. if (!containerSize.value) {
  54437. panel.value.size = props.size;
  54438. return;
  54439. }
  54440. const size = sizeToPx(props.size);
  54441. const maxSize = sizeToPx(props.max);
  54442. const minSize = sizeToPx(props.min);
  54443. const finalSize = Math.min(Math.max(size, minSize || 0), maxSize || size);
  54444. if (finalSize !== size) emits("update:size", finalSize);
  54445. panel.value.size = finalSize;
  54446. }
  54447. });
  54448. watch(() => panel.value?.size, (val) => {
  54449. if (val !== props.size) {
  54450. isSizeUpdating = true;
  54451. emits("update:size", val);
  54452. nextTick(() => isSizeUpdating = false);
  54453. }
  54454. });
  54455. watch(() => props.resizable, (val) => {
  54456. if (panel.value) panel.value.resizable = val;
  54457. });
  54458. const _panel = reactive({
  54459. uid,
  54460. getVnode: () => instance.vnode,
  54461. setIndex,
  54462. ...props,
  54463. collapsible: computed(() => getCollapsible(props.collapsible))
  54464. });
  54465. registerPanel(_panel);
  54466. onBeforeUnmount(() => unregisterPanel(_panel));
  54467. __expose({ splitterPanelRef: panelEl });
  54468. return (_ctx, _cache) => {
  54469. return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("div", mergeProps({
  54470. ref_key: "panelEl",
  54471. ref: panelEl,
  54472. class: [unref(ns).b()],
  54473. style: { flexBasis: `${panelSize.value}px` }
  54474. }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16), isShowBar.value ? (openBlock(), createBlock(split_bar_default, {
  54475. key: 0,
  54476. index: index.value,
  54477. layout: unref(layout),
  54478. lazy: unref(lazy),
  54479. resizable: isResizable.value,
  54480. "start-collapsible": startCollapsible.value,
  54481. "end-collapsible": endCollapsible.value,
  54482. onMoveStart: unref(onMoveStart),
  54483. onMoving: unref(onMoving),
  54484. onMoveEnd: unref(onMoveEnd),
  54485. onCollapse: unref(onCollapse)
  54486. }, {
  54487. "start-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "start-collapsible")]),
  54488. "end-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "end-collapsible")]),
  54489. _: 3
  54490. }, 8, [
  54491. "index",
  54492. "layout",
  54493. "lazy",
  54494. "resizable",
  54495. "start-collapsible",
  54496. "end-collapsible",
  54497. "onMoveStart",
  54498. "onMoving",
  54499. "onMoveEnd",
  54500. "onCollapse"
  54501. ])) : createCommentVNode("v-if", true)], 64);
  54502. };
  54503. }
  54504. });
  54505. //#endregion
  54506. //#region node_modules/element-plus/es/components/splitter/index.mjs
  54507. var ElSplitter = withInstall(splitter_default, { SplitPanel: split_panel_default });
  54508. var ElSplitterPanel = withNoopInstall(split_panel_default);
  54509. //#endregion
  54510. //#region node_modules/element-plus/es/components/infinite-scroll/src/index.mjs
  54511. var SCOPE$1 = "ElInfiniteScroll";
  54512. var attributes = {
  54513. delay: {
  54514. type: Number,
  54515. default: 200
  54516. },
  54517. distance: {
  54518. type: Number,
  54519. default: 0
  54520. },
  54521. disabled: {
  54522. type: Boolean,
  54523. default: false
  54524. },
  54525. immediate: {
  54526. type: Boolean,
  54527. default: true
  54528. }
  54529. };
  54530. var getScrollOptions = (el, instance) => {
  54531. return Object.entries(attributes).reduce((acm, [name, option]) => {
  54532. const { type, default: defaultValue } = option;
  54533. const attrVal = el.getAttribute(`infinite-scroll-${name}`);
  54534. let value = instance[attrVal] ?? attrVal ?? defaultValue;
  54535. value = value === "false" ? false : value;
  54536. value = type(value);
  54537. acm[name] = Number.isNaN(value) ? defaultValue : value;
  54538. return acm;
  54539. }, {});
  54540. };
  54541. var destroyObserver = (el) => {
  54542. const { observer } = el[SCOPE$1];
  54543. if (observer) {
  54544. observer.disconnect();
  54545. delete el[SCOPE$1].observer;
  54546. }
  54547. };
  54548. var handleScroll = (el, cb) => {
  54549. const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE$1];
  54550. const { disabled, distance } = getScrollOptions(el, instance);
  54551. const { clientHeight, scrollHeight, scrollTop } = containerEl;
  54552. const delta = scrollTop - lastScrollTop;
  54553. el[SCOPE$1].lastScrollTop = scrollTop;
  54554. if (observer || disabled || delta < 0) return;
  54555. let shouldTrigger = false;
  54556. if (container === el) shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance;
  54557. else {
  54558. const { clientTop, scrollHeight: height } = el;
  54559. const offsetTop = getOffsetTopDistance(el, containerEl);
  54560. shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance;
  54561. }
  54562. if (shouldTrigger) cb.call(instance);
  54563. };
  54564. function checkFull(el, cb) {
  54565. const { containerEl, instance } = el[SCOPE$1];
  54566. const { disabled } = getScrollOptions(el, instance);
  54567. if (disabled || containerEl.clientHeight === 0) return;
  54568. if (containerEl.scrollHeight <= containerEl.clientHeight) cb.call(instance);
  54569. else destroyObserver(el);
  54570. }
  54571. //#endregion
  54572. //#region node_modules/element-plus/es/components/infinite-scroll/index.mjs
  54573. var _InfiniteScroll = {
  54574. async mounted(el, binding) {
  54575. const { instance, value: cb } = binding;
  54576. useDeprecated({
  54577. scope: SCOPE$1,
  54578. from: "the directive v-infinite-scroll",
  54579. replacement: "the el-scrollbar infinite scroll",
  54580. version: "3.0.0",
  54581. ref: "https://element-plus.org/en-US/component/scrollbar#infinite-scroll"
  54582. }, true);
  54583. if (!isFunction$1(cb)) throwError(SCOPE$1, "'v-infinite-scroll' binding value must be a function");
  54584. await nextTick();
  54585. const { delay, immediate } = getScrollOptions(el, instance);
  54586. const container = getScrollContainer(el, true);
  54587. const containerEl = container === window ? document.documentElement : container;
  54588. const onScroll = throttle(handleScroll.bind(null, el, cb), delay);
  54589. if (!container) return;
  54590. el[SCOPE$1] = {
  54591. instance,
  54592. container,
  54593. containerEl,
  54594. delay,
  54595. cb,
  54596. onScroll,
  54597. lastScrollTop: containerEl.scrollTop
  54598. };
  54599. if (immediate) {
  54600. const observer = new MutationObserver(throttle(checkFull.bind(null, el, cb), 50));
  54601. el[SCOPE$1].observer = observer;
  54602. observer.observe(el, {
  54603. childList: true,
  54604. subtree: true
  54605. });
  54606. checkFull(el, cb);
  54607. }
  54608. container.addEventListener("scroll", onScroll);
  54609. },
  54610. unmounted(el) {
  54611. if (!el["ElInfiniteScroll"]) return;
  54612. const { container, onScroll } = el[SCOPE$1];
  54613. container?.removeEventListener("scroll", onScroll);
  54614. destroyObserver(el);
  54615. },
  54616. async updated(el) {
  54617. if (!el["ElInfiniteScroll"]) await nextTick();
  54618. else {
  54619. const { containerEl, cb, observer } = el[SCOPE$1];
  54620. if (containerEl.clientHeight && observer) checkFull(el, cb);
  54621. }
  54622. }
  54623. };
  54624. _InfiniteScroll.install = (app) => {
  54625. app.directive("InfiniteScroll", _InfiniteScroll);
  54626. };
  54627. var ElInfiniteScroll = _InfiniteScroll;
  54628. //#endregion
  54629. //#region node_modules/element-plus/es/components/loading/src/loading.mjs
  54630. function createLoadingComponent(options, appContext) {
  54631. let afterLeaveTimer;
  54632. const afterLeaveFlag = ref(false);
  54633. const data = reactive({
  54634. ...options,
  54635. originalPosition: "",
  54636. originalOverflow: "",
  54637. visible: false
  54638. });
  54639. function setText(text) {
  54640. data.text = text;
  54641. }
  54642. function destroySelf() {
  54643. const target = data.parent;
  54644. const ns = vm.ns;
  54645. if (!target.vLoadingAddClassList) {
  54646. let loadingNumber = target.getAttribute("loading-number");
  54647. loadingNumber = Number.parseInt(loadingNumber) - 1;
  54648. if (!loadingNumber) {
  54649. removeClass(target, ns.bm("parent", "relative"));
  54650. target.removeAttribute("loading-number");
  54651. } else target.setAttribute("loading-number", loadingNumber.toString());
  54652. removeClass(target, ns.bm("parent", "hidden"));
  54653. }
  54654. removeElLoadingChild();
  54655. loadingInstance.unmount();
  54656. }
  54657. function removeElLoadingChild() {
  54658. vm.$el?.parentNode?.removeChild(vm.$el);
  54659. }
  54660. function close() {
  54661. if (options.beforeClose && !options.beforeClose()) return;
  54662. afterLeaveFlag.value = true;
  54663. clearTimeout(afterLeaveTimer);
  54664. afterLeaveTimer = setTimeout(handleAfterLeave, 400);
  54665. data.visible = false;
  54666. options.closed?.();
  54667. }
  54668. function handleAfterLeave() {
  54669. if (!afterLeaveFlag.value) return;
  54670. const target = data.parent;
  54671. afterLeaveFlag.value = false;
  54672. target.vLoadingAddClassList = void 0;
  54673. destroySelf();
  54674. }
  54675. const loadingInstance = createApp(defineComponent({
  54676. name: "ElLoading",
  54677. setup(_, { expose }) {
  54678. const { ns, zIndex } = useGlobalComponentSettings("loading");
  54679. expose({
  54680. ns,
  54681. zIndex
  54682. });
  54683. return () => {
  54684. const svg = data.spinner || data.svg;
  54685. const spinner = h$1("svg", {
  54686. class: "circular",
  54687. viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
  54688. ...svg ? { innerHTML: svg } : {}
  54689. }, [h$1("circle", {
  54690. class: "path",
  54691. cx: "25",
  54692. cy: "25",
  54693. r: "20",
  54694. fill: "none"
  54695. })]);
  54696. const spinnerText = data.text ? h$1("p", { class: ns.b("text") }, [data.text]) : void 0;
  54697. return h$1(Transition, {
  54698. name: ns.b("fade"),
  54699. onAfterLeave: handleAfterLeave
  54700. }, { default: withCtx(() => [withDirectives(createVNode("div", {
  54701. style: { backgroundColor: data.background || "" },
  54702. class: [
  54703. ns.b("mask"),
  54704. data.customClass,
  54705. ns.is("fullscreen", data.fullscreen)
  54706. ]
  54707. }, [h$1("div", { class: ns.b("spinner") }, [spinner, spinnerText])]), [[vShow, data.visible]])]) });
  54708. };
  54709. }
  54710. }));
  54711. Object.assign(loadingInstance._context, appContext ?? {});
  54712. const vm = loadingInstance.mount(document.createElement("div"));
  54713. return {
  54714. ...toRefs(data),
  54715. setText,
  54716. removeElLoadingChild,
  54717. close,
  54718. handleAfterLeave,
  54719. vm,
  54720. get $el() {
  54721. return vm.$el;
  54722. }
  54723. };
  54724. }
  54725. //#endregion
  54726. //#region node_modules/element-plus/es/components/loading/src/service.mjs
  54727. var fullscreenInstance = void 0;
  54728. var Loading = function(options = {}, context) {
  54729. if (!isClient) return void 0;
  54730. const resolved = resolveOptions(options);
  54731. if (resolved.fullscreen && fullscreenInstance) return fullscreenInstance;
  54732. const instance = createLoadingComponent({
  54733. ...resolved,
  54734. closed: () => {
  54735. resolved.closed?.();
  54736. if (resolved.fullscreen) fullscreenInstance = void 0;
  54737. }
  54738. }, context ?? Loading._context);
  54739. addStyle(resolved, resolved.parent, instance);
  54740. addClassList(resolved, resolved.parent, instance);
  54741. resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
  54742. /**
  54743. * add loading-number to parent.
  54744. * because if a fullscreen loading is triggered when somewhere
  54745. * a v-loading.body was triggered before and it's parent is
  54746. * document.body which with a margin , the fullscreen loading's
  54747. * destroySelf function will remove 'el-loading-parent--relative',
  54748. * and then the position of v-loading.body will be error.
  54749. */
  54750. let loadingNumber = resolved.parent.getAttribute("loading-number");
  54751. if (!loadingNumber) loadingNumber = "1";
  54752. else loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
  54753. resolved.parent.setAttribute("loading-number", loadingNumber);
  54754. resolved.parent.appendChild(instance.$el);
  54755. nextTick(() => instance.visible.value = resolved.visible);
  54756. if (resolved.fullscreen) fullscreenInstance = instance;
  54757. return instance;
  54758. };
  54759. var resolveOptions = (options) => {
  54760. let target;
  54761. if (isString(options.target)) target = document.querySelector(options.target) ?? document.body;
  54762. else target = options.target || document.body;
  54763. return {
  54764. parent: target === document.body || options.body ? document.body : target,
  54765. background: options.background || "",
  54766. svg: options.svg || "",
  54767. svgViewBox: options.svgViewBox || "",
  54768. spinner: options.spinner || false,
  54769. text: options.text || "",
  54770. fullscreen: target === document.body && (options.fullscreen ?? true),
  54771. lock: options.lock ?? false,
  54772. customClass: options.customClass || "",
  54773. visible: options.visible ?? true,
  54774. beforeClose: options.beforeClose,
  54775. closed: options.closed,
  54776. target
  54777. };
  54778. };
  54779. var addStyle = async (options, parent, instance) => {
  54780. const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
  54781. const maskStyle = {};
  54782. if (options.fullscreen) {
  54783. instance.originalPosition.value = getStyle(document.body, "position");
  54784. instance.originalOverflow.value = getStyle(document.body, "overflow");
  54785. maskStyle.zIndex = nextZIndex();
  54786. } else if (options.parent === document.body) {
  54787. instance.originalPosition.value = getStyle(document.body, "position");
  54788. /**
  54789. * await dom render when visible is true in init,
  54790. * because some component's height maybe 0.
  54791. * e.g. el-table.
  54792. */
  54793. await nextTick();
  54794. for (const property of ["top", "left"]) {
  54795. const scroll = property === "top" ? "scrollTop" : "scrollLeft";
  54796. maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
  54797. }
  54798. for (const property of ["height", "width"]) maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
  54799. } else instance.originalPosition.value = getStyle(parent, "position");
  54800. for (const [key, value] of Object.entries(maskStyle)) instance.$el.style[key] = value;
  54801. };
  54802. var addClassList = (options, parent, instance) => {
  54803. const ns = instance.vm.ns || instance.vm._.exposed.ns;
  54804. if (![
  54805. "absolute",
  54806. "fixed",
  54807. "sticky"
  54808. ].includes(instance.originalPosition.value)) addClass(parent, ns.bm("parent", "relative"));
  54809. else removeClass(parent, ns.bm("parent", "relative"));
  54810. if (options.fullscreen && options.lock) addClass(parent, ns.bm("parent", "hidden"));
  54811. else removeClass(parent, ns.bm("parent", "hidden"));
  54812. };
  54813. Loading._context = null;
  54814. //#endregion
  54815. //#region node_modules/element-plus/es/components/loading/src/directive.mjs
  54816. var INSTANCE_KEY = Symbol("ElLoading");
  54817. var getAttributeName = (name) => {
  54818. return `element-loading-${hyphenate$1(name)}`;
  54819. };
  54820. var createInstance = (el, binding) => {
  54821. const vm = binding.instance;
  54822. const getBindingProp = (key) => isObject$2(binding.value) ? binding.value[key] : void 0;
  54823. const resolveExpression = (key) => {
  54824. return ref(isString(key) && vm?.[key] || key);
  54825. };
  54826. const getProp = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(getAttributeName(name)));
  54827. const fullscreen = getBindingProp("fullscreen") ?? binding.modifiers.fullscreen;
  54828. const options = {
  54829. text: getProp("text"),
  54830. svg: getProp("svg"),
  54831. svgViewBox: getProp("svgViewBox"),
  54832. spinner: getProp("spinner"),
  54833. background: getProp("background"),
  54834. customClass: getProp("customClass"),
  54835. fullscreen,
  54836. target: getBindingProp("target") ?? (fullscreen ? void 0 : el),
  54837. body: getBindingProp("body") ?? binding.modifiers.body,
  54838. lock: getBindingProp("lock") ?? binding.modifiers.lock
  54839. };
  54840. const instance = Loading(options);
  54841. instance._context = vLoading._context;
  54842. el[INSTANCE_KEY] = {
  54843. options,
  54844. instance
  54845. };
  54846. };
  54847. var updateOptions = (originalOptions, newOptions) => {
  54848. for (const key of Object.keys(originalOptions)) if (isRef(originalOptions[key])) originalOptions[key].value = newOptions[key];
  54849. };
  54850. var vLoading = {
  54851. mounted(el, binding) {
  54852. if (binding.value) createInstance(el, binding);
  54853. },
  54854. updated(el, binding) {
  54855. const instance = el[INSTANCE_KEY];
  54856. if (!binding.value) {
  54857. instance?.instance.close();
  54858. el[INSTANCE_KEY] = null;
  54859. return;
  54860. }
  54861. if (!instance) createInstance(el, binding);
  54862. else updateOptions(instance.options, isObject$2(binding.value) ? binding.value : {
  54863. text: el.getAttribute(getAttributeName("text")),
  54864. svg: el.getAttribute(getAttributeName("svg")),
  54865. svgViewBox: el.getAttribute(getAttributeName("svgViewBox")),
  54866. spinner: el.getAttribute(getAttributeName("spinner")),
  54867. background: el.getAttribute(getAttributeName("background")),
  54868. customClass: el.getAttribute(getAttributeName("customClass"))
  54869. });
  54870. },
  54871. unmounted(el) {
  54872. el[INSTANCE_KEY]?.instance.close();
  54873. el[INSTANCE_KEY] = null;
  54874. }
  54875. };
  54876. vLoading._context = null;
  54877. //#endregion
  54878. //#region node_modules/element-plus/es/components/loading/index.mjs
  54879. var ElLoading = {
  54880. install(app) {
  54881. Loading._context = app._context;
  54882. vLoading._context = app._context;
  54883. app.directive("loading", vLoading);
  54884. app.config.globalProperties.$loading = Loading;
  54885. },
  54886. directive: vLoading,
  54887. service: Loading
  54888. };
  54889. //#endregion
  54890. //#region node_modules/element-plus/es/components/message/src/message.mjs
  54891. var messageTypes = [
  54892. "primary",
  54893. "success",
  54894. "info",
  54895. "warning",
  54896. "error"
  54897. ];
  54898. var messagePlacement = [
  54899. "top",
  54900. "top-left",
  54901. "top-right",
  54902. "bottom",
  54903. "bottom-left",
  54904. "bottom-right"
  54905. ];
  54906. var MESSAGE_DEFAULT_PLACEMENT = "top";
  54907. var messageDefaults = mutable({
  54908. customClass: "",
  54909. dangerouslyUseHTMLString: false,
  54910. duration: 3e3,
  54911. icon: void 0,
  54912. id: "",
  54913. message: "",
  54914. onClose: void 0,
  54915. showClose: false,
  54916. type: "info",
  54917. plain: false,
  54918. offset: 16,
  54919. placement: void 0,
  54920. zIndex: 0,
  54921. grouping: false,
  54922. repeatNum: 1,
  54923. appendTo: isClient ? document.body : void 0
  54924. });
  54925. /**
  54926. * @deprecated Removed after 3.0.0, Use `MessageProps` instead.
  54927. */
  54928. var messageProps = buildProps({
  54929. customClass: {
  54930. type: String,
  54931. default: messageDefaults.customClass
  54932. },
  54933. dangerouslyUseHTMLString: {
  54934. type: Boolean,
  54935. default: messageDefaults.dangerouslyUseHTMLString
  54936. },
  54937. duration: {
  54938. type: Number,
  54939. default: messageDefaults.duration
  54940. },
  54941. icon: {
  54942. type: iconPropType,
  54943. default: messageDefaults.icon
  54944. },
  54945. id: {
  54946. type: String,
  54947. default: messageDefaults.id
  54948. },
  54949. message: {
  54950. type: definePropType([
  54951. String,
  54952. Object,
  54953. Function
  54954. ]),
  54955. default: messageDefaults.message
  54956. },
  54957. onClose: {
  54958. type: definePropType(Function),
  54959. default: messageDefaults.onClose
  54960. },
  54961. showClose: {
  54962. type: Boolean,
  54963. default: messageDefaults.showClose
  54964. },
  54965. type: {
  54966. type: String,
  54967. values: messageTypes,
  54968. default: messageDefaults.type
  54969. },
  54970. plain: {
  54971. type: Boolean,
  54972. default: messageDefaults.plain
  54973. },
  54974. offset: {
  54975. type: Number,
  54976. default: messageDefaults.offset
  54977. },
  54978. placement: {
  54979. type: String,
  54980. values: messagePlacement,
  54981. default: messageDefaults.placement
  54982. },
  54983. zIndex: {
  54984. type: Number,
  54985. default: messageDefaults.zIndex
  54986. },
  54987. grouping: {
  54988. type: Boolean,
  54989. default: messageDefaults.grouping
  54990. },
  54991. repeatNum: {
  54992. type: Number,
  54993. default: messageDefaults.repeatNum
  54994. }
  54995. });
  54996. var messageEmits = { destroy: () => true };
  54997. //#endregion
  54998. //#region node_modules/element-plus/es/components/message/src/instance.mjs
  54999. var placementInstances = shallowReactive({});
  55000. var getOrCreatePlacementInstances = (placement) => {
  55001. if (!placementInstances[placement]) placementInstances[placement] = shallowReactive([]);
  55002. return placementInstances[placement];
  55003. };
  55004. var getInstance = (id, placement) => {
  55005. const instances = placementInstances[placement] || [];
  55006. const idx = instances.findIndex((instance) => instance.id === id);
  55007. const current = instances[idx];
  55008. let prev;
  55009. if (idx > 0) prev = instances[idx - 1];
  55010. return {
  55011. current,
  55012. prev
  55013. };
  55014. };
  55015. var getLastOffset = (id, placement) => {
  55016. const { prev } = getInstance(id, placement);
  55017. if (!prev) return 0;
  55018. return prev.vm.exposed.bottom.value;
  55019. };
  55020. var getOffsetOrSpace = (id, offset, placement) => {
  55021. return (placementInstances[placement] || []).findIndex((instance) => instance.id === id) > 0 ? 16 : offset;
  55022. };
  55023. //#endregion
  55024. //#region node_modules/element-plus/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs
  55025. var _hoisted_1$2 = ["id"];
  55026. var _hoisted_2$2 = ["innerHTML"];
  55027. //#endregion
  55028. //#region node_modules/element-plus/es/components/message/src/message2.mjs
  55029. var message_default = /* @__PURE__ */ defineComponent({
  55030. name: "ElMessage",
  55031. __name: "message",
  55032. props: messageProps,
  55033. emits: messageEmits,
  55034. setup(__props, { expose: __expose, emit: __emit }) {
  55035. const { Close } = TypeComponents;
  55036. const props = __props;
  55037. const emit = __emit;
  55038. const isStartTransition = ref(false);
  55039. const { ns, zIndex } = useGlobalComponentSettings("message");
  55040. const { currentZIndex, nextZIndex } = zIndex;
  55041. const messageRef = ref();
  55042. const visible = ref(false);
  55043. const height = ref(0);
  55044. let stopTimer = void 0;
  55045. const badgeType = computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
  55046. const typeClass = computed(() => {
  55047. const type = props.type;
  55048. return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
  55049. });
  55050. const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
  55051. const placement = computed(() => props.placement || "top");
  55052. const lastOffset = computed(() => getLastOffset(props.id, placement.value));
  55053. const offset = computed(() => {
  55054. return getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value;
  55055. });
  55056. const bottom = computed(() => height.value + offset.value);
  55057. const horizontalClass = computed(() => {
  55058. if (placement.value.includes("left")) return ns.is("left");
  55059. if (placement.value.includes("right")) return ns.is("right");
  55060. return ns.is("center");
  55061. });
  55062. const verticalProperty = computed(() => placement.value.startsWith("top") ? "top" : "bottom");
  55063. const customStyle = computed(() => ({
  55064. [verticalProperty.value]: `${offset.value}px`,
  55065. zIndex: currentZIndex.value
  55066. }));
  55067. function startTimer() {
  55068. if (props.duration === 0) return;
  55069. ({stop: stopTimer} = useTimeoutFn(() => {
  55070. close();
  55071. }, props.duration));
  55072. }
  55073. function clearTimer() {
  55074. stopTimer?.();
  55075. }
  55076. function close() {
  55077. visible.value = false;
  55078. nextTick(() => {
  55079. if (!isStartTransition.value) {
  55080. props.onClose?.();
  55081. emit("destroy");
  55082. }
  55083. });
  55084. }
  55085. function keydown(event) {
  55086. if (getEventCode(event) === EVENT_CODE.esc) close();
  55087. }
  55088. onMounted(() => {
  55089. startTimer();
  55090. nextZIndex();
  55091. visible.value = true;
  55092. });
  55093. watch(() => props.repeatNum, () => {
  55094. clearTimer();
  55095. startTimer();
  55096. });
  55097. useEventListener(document, "keydown", keydown);
  55098. useResizeObserver(messageRef, () => {
  55099. height.value = messageRef.value.getBoundingClientRect().height;
  55100. });
  55101. __expose({
  55102. visible,
  55103. bottom,
  55104. close
  55105. });
  55106. return (_ctx, _cache) => {
  55107. return openBlock(), createBlock(Transition, {
  55108. name: unref(ns).b("fade"),
  55109. onBeforeEnter: _cache[0] || (_cache[0] = ($event) => isStartTransition.value = true),
  55110. onBeforeLeave: __props.onClose,
  55111. onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
  55112. persisted: ""
  55113. }, {
  55114. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  55115. id: __props.id,
  55116. ref_key: "messageRef",
  55117. ref: messageRef,
  55118. class: normalizeClass([
  55119. unref(ns).b(),
  55120. { [unref(ns).m(__props.type)]: __props.type },
  55121. unref(ns).is("closable", __props.showClose),
  55122. unref(ns).is("plain", __props.plain),
  55123. unref(ns).is("bottom", verticalProperty.value === "bottom"),
  55124. horizontalClass.value,
  55125. __props.customClass
  55126. ]),
  55127. style: normalizeStyle(customStyle.value),
  55128. role: "alert",
  55129. onMouseenter: clearTimer,
  55130. onMouseleave: startTimer
  55131. }, [
  55132. __props.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
  55133. key: 0,
  55134. value: __props.repeatNum,
  55135. type: badgeType.value,
  55136. class: normalizeClass(unref(ns).e("badge"))
  55137. }, null, 8, [
  55138. "value",
  55139. "type",
  55140. "class"
  55141. ])) : createCommentVNode("v-if", true),
  55142. iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
  55143. key: 1,
  55144. class: normalizeClass([unref(ns).e("icon"), typeClass.value])
  55145. }, {
  55146. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
  55147. _: 1
  55148. }, 8, ["class"])) : createCommentVNode("v-if", true),
  55149. renderSlot(_ctx.$slots, "default", {}, () => [!__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
  55150. key: 0,
  55151. class: normalizeClass(unref(ns).e("content"))
  55152. }, toDisplayString(__props.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", {
  55153. class: normalizeClass(unref(ns).e("content")),
  55154. innerHTML: __props.message
  55155. }, null, 10, _hoisted_2$2)], 2112))]),
  55156. __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  55157. key: 2,
  55158. class: normalizeClass(unref(ns).e("closeBtn")),
  55159. onClick: withModifiers(close, ["stop"])
  55160. }, {
  55161. default: withCtx(() => [createVNode(unref(Close))]),
  55162. _: 1
  55163. }, 8, ["class"])) : createCommentVNode("v-if", true)
  55164. ], 46, _hoisted_1$2), [[vShow, visible.value]])]),
  55165. _: 3
  55166. }, 8, ["name", "onBeforeLeave"]);
  55167. };
  55168. }
  55169. });
  55170. //#endregion
  55171. //#region node_modules/element-plus/es/components/message/src/method.mjs
  55172. var seed$1 = 1;
  55173. var normalizeAppendTo = (normalized) => {
  55174. if (!normalized.appendTo) normalized.appendTo = document.body;
  55175. else if (isString(normalized.appendTo)) {
  55176. let appendTo = document.querySelector(normalized.appendTo);
  55177. if (!isElement$1(appendTo)) {
  55178. debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  55179. appendTo = document.body;
  55180. }
  55181. normalized.appendTo = appendTo;
  55182. }
  55183. };
  55184. var normalizePlacement = (normalized) => {
  55185. if (!normalized.placement && isString(messageConfig.placement) && messageConfig.placement) normalized.placement = messageConfig.placement;
  55186. if (!normalized.placement) normalized.placement = "top";
  55187. if (!messagePlacement.includes(normalized.placement)) {
  55188. debugWarn("ElMessage", `Invalid placement: ${normalized.placement}. Falling back to 'top'.`);
  55189. normalized.placement = "top";
  55190. }
  55191. };
  55192. var normalizeOptions = (params) => {
  55193. const options = !params || isString(params) || isVNode(params) || isFunction$1(params) ? { message: params } : params;
  55194. const normalized = {
  55195. ...messageDefaults,
  55196. ...options
  55197. };
  55198. normalizeAppendTo(normalized);
  55199. normalizePlacement(normalized);
  55200. if (isBoolean(messageConfig.grouping) && !normalized.grouping) normalized.grouping = messageConfig.grouping;
  55201. if (isNumber(messageConfig.duration) && normalized.duration === 3e3) normalized.duration = messageConfig.duration;
  55202. if (isNumber(messageConfig.offset) && normalized.offset === 16) normalized.offset = messageConfig.offset;
  55203. if (isBoolean(messageConfig.showClose) && !normalized.showClose) normalized.showClose = messageConfig.showClose;
  55204. if (isBoolean(messageConfig.plain) && !normalized.plain) normalized.plain = messageConfig.plain;
  55205. return normalized;
  55206. };
  55207. var closeMessage = (instance) => {
  55208. const instances = placementInstances[instance.props.placement || "top"];
  55209. const idx = instances.indexOf(instance);
  55210. if (idx === -1) return;
  55211. instances.splice(idx, 1);
  55212. const { handler } = instance;
  55213. handler.close();
  55214. };
  55215. var createMessage = ({ appendTo, ...options }, context) => {
  55216. const id = `message_${seed$1++}`;
  55217. const userOnClose = options.onClose;
  55218. const container = document.createElement("div");
  55219. const props = {
  55220. ...options,
  55221. id,
  55222. onClose: () => {
  55223. userOnClose?.();
  55224. closeMessage(instance);
  55225. },
  55226. onDestroy: () => {
  55227. render(null, container);
  55228. }
  55229. };
  55230. const vnode = createVNode(message_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? props.message : () => props.message } : null);
  55231. vnode.appContext = context || message._context;
  55232. render(vnode, container);
  55233. appendTo.appendChild(container.firstElementChild);
  55234. const vm = vnode.component;
  55235. const instance = {
  55236. id,
  55237. vnode,
  55238. vm,
  55239. handler: { close: () => {
  55240. vm.exposed.close();
  55241. } },
  55242. props: vnode.component.props
  55243. };
  55244. return instance;
  55245. };
  55246. var message = (options = {}, context) => {
  55247. if (!isClient) return { close: () => void 0 };
  55248. const normalized = normalizeOptions(options);
  55249. const instances = getOrCreatePlacementInstances(normalized.placement || "top");
  55250. if (normalized.grouping && instances.length) {
  55251. const instance = instances.find(({ vnode: vm }) => vm.props?.message === normalized.message);
  55252. if (instance) {
  55253. instance.props.repeatNum += 1;
  55254. instance.props.type = normalized.type;
  55255. return instance.handler;
  55256. }
  55257. }
  55258. if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) return { close: () => void 0 };
  55259. const instance = createMessage(normalized, context);
  55260. instances.push(instance);
  55261. return instance.handler;
  55262. };
  55263. messageTypes.forEach((type) => {
  55264. message[type] = (options = {}, appContext) => {
  55265. return message({
  55266. ...normalizeOptions(options),
  55267. type
  55268. }, appContext);
  55269. };
  55270. });
  55271. function closeAll$1(type) {
  55272. for (const placement in placementInstances) if (hasOwn(placementInstances, placement)) {
  55273. const instances = [...placementInstances[placement]];
  55274. for (const instance of instances) if (!type || type === instance.props.type) instance.handler.close();
  55275. }
  55276. }
  55277. function closeAllByPlacement(placement) {
  55278. if (!placementInstances[placement]) return;
  55279. [...placementInstances[placement]].forEach((instance) => instance.handler.close());
  55280. }
  55281. message.closeAll = closeAll$1;
  55282. message.closeAllByPlacement = closeAllByPlacement;
  55283. message._context = null;
  55284. //#endregion
  55285. //#region node_modules/element-plus/es/components/message/index.mjs
  55286. var ElMessage = withInstallFunction(message, "$message");
  55287. //#endregion
  55288. //#region node_modules/element-plus/es/components/message-box/src/index.vue_vue_type_script_lang.mjs
  55289. var index_vue_vue_type_script_lang_default = defineComponent({
  55290. name: "ElMessageBox",
  55291. directives: { TrapFocus },
  55292. components: {
  55293. ElButton,
  55294. ElFocusTrap: focus_trap_default$1,
  55295. ElInput,
  55296. ElOverlay,
  55297. ElIcon,
  55298. ...TypeComponents
  55299. },
  55300. inheritAttrs: false,
  55301. props: {
  55302. buttonSize: {
  55303. type: String,
  55304. validator: isValidComponentSize
  55305. },
  55306. modal: {
  55307. type: Boolean,
  55308. default: true
  55309. },
  55310. lockScroll: {
  55311. type: Boolean,
  55312. default: true
  55313. },
  55314. showClose: {
  55315. type: Boolean,
  55316. default: true
  55317. },
  55318. closeOnClickModal: {
  55319. type: Boolean,
  55320. default: true
  55321. },
  55322. closeOnPressEscape: {
  55323. type: Boolean,
  55324. default: true
  55325. },
  55326. closeOnHashChange: {
  55327. type: Boolean,
  55328. default: true
  55329. },
  55330. center: Boolean,
  55331. draggable: Boolean,
  55332. overflow: Boolean,
  55333. roundButton: Boolean,
  55334. container: {
  55335. type: String,
  55336. default: "body"
  55337. },
  55338. boxType: {
  55339. type: String,
  55340. default: ""
  55341. }
  55342. },
  55343. emits: ["vanish", "action"],
  55344. setup(props, { emit }) {
  55345. const { locale, zIndex, ns, size: btnSize } = useGlobalComponentSettings("message-box", computed(() => props.buttonSize));
  55346. const { t } = locale;
  55347. const { nextZIndex } = zIndex;
  55348. const visible = ref(false);
  55349. const state = reactive({
  55350. autofocus: true,
  55351. beforeClose: null,
  55352. callback: null,
  55353. cancelButtonText: "",
  55354. cancelButtonClass: "",
  55355. confirmButtonText: "",
  55356. confirmButtonClass: "",
  55357. cancelButtonType: "",
  55358. confirmButtonType: "primary",
  55359. customClass: "",
  55360. customStyle: {},
  55361. dangerouslyUseHTMLString: false,
  55362. distinguishCancelAndClose: false,
  55363. icon: "",
  55364. closeIcon: "",
  55365. inputPattern: null,
  55366. inputPlaceholder: "",
  55367. inputType: "text",
  55368. inputValue: "",
  55369. inputValidator: void 0,
  55370. inputErrorMessage: "",
  55371. message: "",
  55372. modalFade: true,
  55373. modalClass: "",
  55374. showCancelButton: false,
  55375. showConfirmButton: true,
  55376. type: "",
  55377. title: void 0,
  55378. showInput: false,
  55379. action: "",
  55380. confirmButtonLoading: false,
  55381. cancelButtonLoading: false,
  55382. confirmButtonLoadingIcon: markRaw(loading_default),
  55383. cancelButtonLoadingIcon: markRaw(loading_default),
  55384. confirmButtonDisabled: false,
  55385. editorErrorMessage: "",
  55386. validateError: false,
  55387. zIndex: nextZIndex()
  55388. });
  55389. const typeClass = computed(() => {
  55390. const type = state.type;
  55391. return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
  55392. });
  55393. const contentId = useId();
  55394. const inputId = useId();
  55395. const iconComponent = computed(() => {
  55396. const type = state.type;
  55397. return state.icon || type && TypeComponentsMap[type] || "";
  55398. });
  55399. const hasMessage = computed(() => !!state.message);
  55400. const rootRef = ref();
  55401. const headerRef = ref();
  55402. const focusStartRef = ref();
  55403. const inputRef = ref();
  55404. const confirmRef = ref();
  55405. const confirmButtonClasses = computed(() => state.confirmButtonClass);
  55406. watch(() => state.inputValue, async (val) => {
  55407. await nextTick();
  55408. if (props.boxType === "prompt" && val) validate();
  55409. }, { immediate: true });
  55410. watch(() => visible.value, (val) => {
  55411. if (val) {
  55412. if (props.boxType !== "prompt") if (state.autofocus) focusStartRef.value = confirmRef.value?.$el ?? rootRef.value;
  55413. else focusStartRef.value = rootRef.value;
  55414. state.zIndex = nextZIndex();
  55415. }
  55416. if (props.boxType !== "prompt") return;
  55417. if (val) nextTick().then(() => {
  55418. if (inputRef.value && inputRef.value.$el) if (state.autofocus) focusStartRef.value = getInputElement() ?? rootRef.value;
  55419. else focusStartRef.value = rootRef.value;
  55420. });
  55421. else {
  55422. state.editorErrorMessage = "";
  55423. state.validateError = false;
  55424. }
  55425. });
  55426. const { isDragging } = useDraggable(rootRef, headerRef, computed(() => props.draggable), computed(() => props.overflow));
  55427. onMounted(async () => {
  55428. await nextTick();
  55429. if (props.closeOnHashChange) window.addEventListener("hashchange", doClose);
  55430. });
  55431. onBeforeUnmount(() => {
  55432. if (props.closeOnHashChange) window.removeEventListener("hashchange", doClose);
  55433. });
  55434. function doClose() {
  55435. if (!visible.value) return;
  55436. visible.value = false;
  55437. nextTick(() => {
  55438. if (state.action) emit("action", state.action);
  55439. });
  55440. }
  55441. const handleWrapperClick = () => {
  55442. if (props.closeOnClickModal) handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
  55443. };
  55444. const overlayEvent = useSameTarget(handleWrapperClick);
  55445. const handleInputEnter = (e) => {
  55446. if (state.inputType !== "textarea" && !inputRef.value?.isComposing) {
  55447. e.preventDefault();
  55448. return handleAction("confirm");
  55449. }
  55450. };
  55451. const handleAction = (action) => {
  55452. if (props.boxType === "prompt" && action === "confirm" && !validate()) return;
  55453. state.action = action;
  55454. if (state.beforeClose) state.beforeClose?.(action, state, doClose);
  55455. else doClose();
  55456. };
  55457. const validate = () => {
  55458. if (props.boxType === "prompt") {
  55459. const inputPattern = state.inputPattern;
  55460. if (inputPattern && !inputPattern.test(state.inputValue || "")) {
  55461. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  55462. state.validateError = true;
  55463. return false;
  55464. }
  55465. const inputValidator = state.inputValidator;
  55466. if (isFunction$1(inputValidator)) {
  55467. const validateResult = inputValidator(state.inputValue);
  55468. if (validateResult === false) {
  55469. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  55470. state.validateError = true;
  55471. return false;
  55472. }
  55473. if (isString(validateResult)) {
  55474. state.editorErrorMessage = validateResult;
  55475. state.validateError = true;
  55476. return false;
  55477. }
  55478. }
  55479. }
  55480. state.editorErrorMessage = "";
  55481. state.validateError = false;
  55482. return true;
  55483. };
  55484. const getInputElement = () => {
  55485. const inputRefs = inputRef.value?.$refs;
  55486. return inputRefs?.input ?? inputRefs?.textarea;
  55487. };
  55488. const handleClose = () => {
  55489. handleAction("close");
  55490. };
  55491. const onCloseRequested = () => {
  55492. if (props.closeOnPressEscape) handleClose();
  55493. };
  55494. if (props.lockScroll) useLockscreen(visible, { ns });
  55495. return {
  55496. ...toRefs(state),
  55497. ns,
  55498. overlayEvent,
  55499. visible,
  55500. hasMessage,
  55501. typeClass,
  55502. contentId,
  55503. inputId,
  55504. btnSize,
  55505. iconComponent,
  55506. confirmButtonClasses,
  55507. rootRef,
  55508. focusStartRef,
  55509. headerRef,
  55510. inputRef,
  55511. isDragging,
  55512. confirmRef,
  55513. doClose,
  55514. handleClose,
  55515. onCloseRequested,
  55516. handleWrapperClick,
  55517. handleInputEnter,
  55518. handleAction,
  55519. t
  55520. };
  55521. }
  55522. });
  55523. //#endregion
  55524. //#region node_modules/element-plus/es/components/message-box/src/index.mjs
  55525. var _hoisted_1$1 = ["aria-label", "aria-describedby"];
  55526. var _hoisted_2$1 = ["aria-label"];
  55527. var _hoisted_3$1 = ["id"];
  55528. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  55529. const _component_el_icon = resolveComponent("el-icon");
  55530. const _component_el_input = resolveComponent("el-input");
  55531. const _component_el_button = resolveComponent("el-button");
  55532. const _component_el_focus_trap = resolveComponent("el-focus-trap");
  55533. const _component_el_overlay = resolveComponent("el-overlay");
  55534. return openBlock(), createBlock(Transition, {
  55535. name: "fade-in-linear",
  55536. onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")),
  55537. persisted: ""
  55538. }, {
  55539. default: withCtx(() => [withDirectives(createVNode(_component_el_overlay, {
  55540. "z-index": _ctx.zIndex,
  55541. "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass],
  55542. mask: _ctx.modal
  55543. }, {
  55544. default: withCtx(() => [createBaseVNode("div", {
  55545. role: "dialog",
  55546. "aria-label": _ctx.title,
  55547. "aria-modal": "true",
  55548. "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0,
  55549. class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),
  55550. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
  55551. onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
  55552. onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
  55553. }, [createVNode(_component_el_focus_trap, {
  55554. loop: "",
  55555. trapped: _ctx.visible,
  55556. "focus-trap-el": _ctx.rootRef,
  55557. "focus-start-el": _ctx.focusStartRef,
  55558. onReleaseRequested: _ctx.onCloseRequested
  55559. }, {
  55560. default: withCtx(() => [createBaseVNode("div", {
  55561. ref: "rootRef",
  55562. class: normalizeClass([
  55563. _ctx.ns.b(),
  55564. _ctx.customClass,
  55565. _ctx.ns.is("draggable", _ctx.draggable),
  55566. _ctx.ns.is("dragging", _ctx.isDragging),
  55567. { [_ctx.ns.m("center")]: _ctx.center }
  55568. ]),
  55569. style: normalizeStyle(_ctx.customStyle),
  55570. tabindex: "-1",
  55571. onClick: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
  55572. }, [
  55573. _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", {
  55574. key: 0,
  55575. ref: "headerRef",
  55576. class: normalizeClass([_ctx.ns.e("header"), { "show-close": _ctx.showClose }])
  55577. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("title")) }, [_ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
  55578. key: 0,
  55579. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  55580. }, {
  55581. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  55582. _: 1
  55583. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("span", null, toDisplayString(_ctx.title), 1)], 2), _ctx.showClose ? (openBlock(), createElementBlock("button", {
  55584. key: 0,
  55585. type: "button",
  55586. class: normalizeClass(_ctx.ns.e("headerbtn")),
  55587. "aria-label": _ctx.t("el.messagebox.close"),
  55588. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
  55589. onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
  55590. }, [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("close")) }, {
  55591. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || "close")))]),
  55592. _: 1
  55593. }, 8, ["class"])], 42, _hoisted_2$1)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  55594. createBaseVNode("div", {
  55595. id: _ctx.contentId,
  55596. class: normalizeClass(_ctx.ns.e("content"))
  55597. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("container")) }, [_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
  55598. key: 0,
  55599. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  55600. }, {
  55601. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  55602. _: 1
  55603. }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.hasMessage ? (openBlock(), createElementBlock("div", {
  55604. key: 1,
  55605. class: normalizeClass(_ctx.ns.e("message"))
  55606. }, [renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  55607. key: 0,
  55608. for: _ctx.showInput ? _ctx.inputId : void 0,
  55609. textContent: toDisplayString(_ctx.message)
  55610. }, null, 8, ["for", "textContent"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  55611. key: 1,
  55612. for: _ctx.showInput ? _ctx.inputId : void 0,
  55613. innerHTML: _ctx.message
  55614. }, null, 8, ["for", "innerHTML"]))])], 2)) : createCommentVNode("v-if", true)], 2), withDirectives(createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("input")) }, [createVNode(_component_el_input, {
  55615. id: _ctx.inputId,
  55616. ref: "inputRef",
  55617. modelValue: _ctx.inputValue,
  55618. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
  55619. type: _ctx.inputType,
  55620. placeholder: _ctx.inputPlaceholder,
  55621. "aria-invalid": _ctx.validateError,
  55622. class: normalizeClass({ invalid: _ctx.validateError }),
  55623. onKeydown: withKeys(_ctx.handleInputEnter, ["enter"])
  55624. }, null, 8, [
  55625. "id",
  55626. "modelValue",
  55627. "type",
  55628. "placeholder",
  55629. "aria-invalid",
  55630. "class",
  55631. "onKeydown"
  55632. ]), createBaseVNode("div", {
  55633. class: normalizeClass(_ctx.ns.e("errormsg")),
  55634. style: normalizeStyle({ visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" })
  55635. }, toDisplayString(_ctx.editorErrorMessage), 7)], 2), [[vShow, _ctx.showInput]])], 10, _hoisted_3$1),
  55636. createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("btns")) }, [_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
  55637. key: 0,
  55638. type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
  55639. text: _ctx.cancelButtonType === "text",
  55640. loading: _ctx.cancelButtonLoading,
  55641. "loading-icon": _ctx.cancelButtonLoadingIcon,
  55642. class: normalizeClass([_ctx.cancelButtonClass]),
  55643. round: _ctx.roundButton,
  55644. size: _ctx.btnSize,
  55645. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
  55646. onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
  55647. }, {
  55648. default: withCtx(() => [createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)]),
  55649. _: 1
  55650. }, 8, [
  55651. "type",
  55652. "text",
  55653. "loading",
  55654. "loading-icon",
  55655. "class",
  55656. "round",
  55657. "size"
  55658. ])) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_el_button, {
  55659. ref: "confirmRef",
  55660. type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
  55661. text: _ctx.confirmButtonType === "text",
  55662. loading: _ctx.confirmButtonLoading,
  55663. "loading-icon": _ctx.confirmButtonLoadingIcon,
  55664. class: normalizeClass([_ctx.confirmButtonClasses]),
  55665. round: _ctx.roundButton,
  55666. disabled: _ctx.confirmButtonDisabled,
  55667. size: _ctx.btnSize,
  55668. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
  55669. onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
  55670. }, {
  55671. default: withCtx(() => [createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)]),
  55672. _: 1
  55673. }, 8, [
  55674. "type",
  55675. "text",
  55676. "loading",
  55677. "loading-icon",
  55678. "class",
  55679. "round",
  55680. "disabled",
  55681. "size"
  55682. ]), [[vShow, _ctx.showConfirmButton]])], 2)
  55683. ], 6)]),
  55684. _: 3
  55685. }, 8, [
  55686. "trapped",
  55687. "focus-trap-el",
  55688. "focus-start-el",
  55689. "onReleaseRequested"
  55690. ])], 42, _hoisted_1$1)]),
  55691. _: 3
  55692. }, 8, [
  55693. "z-index",
  55694. "overlay-class",
  55695. "mask"
  55696. ]), [[vShow, _ctx.visible]])]),
  55697. _: 3
  55698. });
  55699. }
  55700. var src_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
  55701. //#endregion
  55702. //#region node_modules/element-plus/es/components/message-box/src/messageBox.mjs
  55703. var messageInstance = /* @__PURE__ */ new Map();
  55704. var getAppendToElement = (props) => {
  55705. let appendTo = document.body;
  55706. if (props.appendTo) {
  55707. if (isString(props.appendTo)) appendTo = document.querySelector(props.appendTo);
  55708. if (isElement$1(props.appendTo)) appendTo = props.appendTo;
  55709. if (!isElement$1(appendTo)) {
  55710. debugWarn("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  55711. appendTo = document.body;
  55712. }
  55713. }
  55714. return appendTo;
  55715. };
  55716. var initInstance = (props, container, appContext = null) => {
  55717. const vnode = createVNode(src_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? props.message : () => props.message } : null);
  55718. vnode.appContext = appContext;
  55719. render(vnode, container);
  55720. getAppendToElement(props).appendChild(container.firstElementChild);
  55721. return vnode.component;
  55722. };
  55723. var genContainer = () => {
  55724. return document.createElement("div");
  55725. };
  55726. var showMessage = (options, appContext) => {
  55727. const container = genContainer();
  55728. options.onVanish = () => {
  55729. render(null, container);
  55730. messageInstance.delete(vm);
  55731. };
  55732. options.onAction = (action) => {
  55733. const currentMsg = messageInstance.get(vm);
  55734. let resolve;
  55735. if (options.showInput) resolve = {
  55736. value: vm.inputValue,
  55737. action
  55738. };
  55739. else resolve = action;
  55740. if (options.callback) options.callback(resolve, instance.proxy);
  55741. else if (action === "cancel" || action === "close") if (options.distinguishCancelAndClose && action !== "cancel") currentMsg.reject("close");
  55742. else currentMsg.reject("cancel");
  55743. else currentMsg.resolve(resolve);
  55744. };
  55745. const instance = initInstance(options, container, appContext);
  55746. const vm = instance.proxy;
  55747. for (const prop in options) if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) if (prop === "closeIcon" && isObject$2(options[prop])) vm[prop] = markRaw(options[prop]);
  55748. else vm[prop] = options[prop];
  55749. vm.visible = true;
  55750. return vm;
  55751. };
  55752. function MessageBox(options, appContext = null) {
  55753. if (!isClient) return Promise.reject();
  55754. let callback;
  55755. if (isString(options) || isVNode(options)) options = { message: options };
  55756. else callback = options.callback;
  55757. return new Promise((resolve, reject) => {
  55758. const vm = showMessage(options, appContext ?? MessageBox._context);
  55759. messageInstance.set(vm, {
  55760. options,
  55761. callback,
  55762. resolve,
  55763. reject
  55764. });
  55765. });
  55766. }
  55767. var MESSAGE_BOX_VARIANTS = [
  55768. "alert",
  55769. "confirm",
  55770. "prompt"
  55771. ];
  55772. var MESSAGE_BOX_DEFAULT_OPTS = {
  55773. alert: {
  55774. closeOnPressEscape: false,
  55775. closeOnClickModal: false
  55776. },
  55777. confirm: { showCancelButton: true },
  55778. prompt: {
  55779. showCancelButton: true,
  55780. showInput: true
  55781. }
  55782. };
  55783. MESSAGE_BOX_VARIANTS.forEach((boxType) => {
  55784. MessageBox[boxType] = messageBoxFactory(boxType);
  55785. });
  55786. function messageBoxFactory(boxType) {
  55787. return (message, title, options, appContext) => {
  55788. let titleOrOpts = "";
  55789. if (isObject$2(title)) {
  55790. options = title;
  55791. titleOrOpts = "";
  55792. } else if (isUndefined(title)) titleOrOpts = "";
  55793. else titleOrOpts = title;
  55794. return MessageBox(Object.assign({
  55795. title: titleOrOpts,
  55796. message,
  55797. type: "",
  55798. ...MESSAGE_BOX_DEFAULT_OPTS[boxType]
  55799. }, options, { boxType }), appContext);
  55800. };
  55801. }
  55802. MessageBox.close = () => {
  55803. messageInstance.forEach((_, vm) => {
  55804. vm.doClose();
  55805. });
  55806. messageInstance.clear();
  55807. };
  55808. MessageBox._context = null;
  55809. //#endregion
  55810. //#region node_modules/element-plus/es/components/message-box/index.mjs
  55811. var _MessageBox = MessageBox;
  55812. _MessageBox.install = (app) => {
  55813. _MessageBox._context = app._context;
  55814. app.config.globalProperties.$msgbox = _MessageBox;
  55815. app.config.globalProperties.$messageBox = _MessageBox;
  55816. app.config.globalProperties.$alert = _MessageBox.alert;
  55817. app.config.globalProperties.$confirm = _MessageBox.confirm;
  55818. app.config.globalProperties.$prompt = _MessageBox.prompt;
  55819. };
  55820. var ElMessageBox = _MessageBox;
  55821. //#endregion
  55822. //#region node_modules/element-plus/es/components/notification/src/notification.mjs
  55823. var notificationTypes = [
  55824. "primary",
  55825. "success",
  55826. "info",
  55827. "warning",
  55828. "error"
  55829. ];
  55830. /**
  55831. * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
  55832. */
  55833. var notificationProps = buildProps({
  55834. customClass: {
  55835. type: String,
  55836. default: ""
  55837. },
  55838. dangerouslyUseHTMLString: Boolean,
  55839. duration: {
  55840. type: Number,
  55841. default: 4500
  55842. },
  55843. icon: { type: iconPropType },
  55844. id: {
  55845. type: String,
  55846. default: ""
  55847. },
  55848. message: {
  55849. type: definePropType([
  55850. String,
  55851. Object,
  55852. Function
  55853. ]),
  55854. default: ""
  55855. },
  55856. offset: {
  55857. type: Number,
  55858. default: 0
  55859. },
  55860. onClick: {
  55861. type: definePropType(Function),
  55862. default: () => void 0
  55863. },
  55864. onClose: {
  55865. type: definePropType(Function),
  55866. required: true
  55867. },
  55868. position: {
  55869. type: String,
  55870. values: [
  55871. "top-right",
  55872. "top-left",
  55873. "bottom-right",
  55874. "bottom-left"
  55875. ],
  55876. default: "top-right"
  55877. },
  55878. showClose: {
  55879. type: Boolean,
  55880. default: true
  55881. },
  55882. title: {
  55883. type: String,
  55884. default: ""
  55885. },
  55886. type: {
  55887. type: String,
  55888. values: [...notificationTypes, ""],
  55889. default: ""
  55890. },
  55891. zIndex: Number,
  55892. closeIcon: {
  55893. type: iconPropType,
  55894. default: close_default
  55895. }
  55896. });
  55897. var notificationEmits = { destroy: () => true };
  55898. //#endregion
  55899. //#region node_modules/element-plus/es/components/notification/src/notification.vue_vue_type_script_setup_true_lang.mjs
  55900. var _hoisted_1 = ["id"];
  55901. var _hoisted_2 = ["textContent"];
  55902. var _hoisted_3 = { key: 0 };
  55903. var _hoisted_4 = ["innerHTML"];
  55904. //#endregion
  55905. //#region node_modules/element-plus/es/components/notification/src/notification2.mjs
  55906. var notification_default = /* @__PURE__ */ defineComponent({
  55907. name: "ElNotification",
  55908. __name: "notification",
  55909. props: notificationProps,
  55910. emits: notificationEmits,
  55911. setup(__props, { expose: __expose }) {
  55912. const props = __props;
  55913. const { ns, zIndex } = useGlobalComponentSettings("notification");
  55914. const { nextZIndex, currentZIndex } = zIndex;
  55915. const visible = ref(false);
  55916. let timer = void 0;
  55917. const typeClass = computed(() => {
  55918. const type = props.type;
  55919. return type && TypeComponentsMap[props.type] ? ns.m(type) : "";
  55920. });
  55921. const iconComponent = computed(() => {
  55922. if (!props.type) return props.icon;
  55923. return TypeComponentsMap[props.type] || props.icon;
  55924. });
  55925. const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left");
  55926. const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom");
  55927. const positionStyle = computed(() => {
  55928. return {
  55929. [verticalProperty.value]: `${props.offset}px`,
  55930. zIndex: props.zIndex ?? currentZIndex.value
  55931. };
  55932. });
  55933. function startTimer() {
  55934. if (props.duration > 0) ({stop: timer} = useTimeoutFn(() => {
  55935. if (visible.value) close();
  55936. }, props.duration));
  55937. }
  55938. function clearTimer() {
  55939. timer?.();
  55940. }
  55941. function close() {
  55942. visible.value = false;
  55943. }
  55944. function onKeydown(event) {
  55945. switch (getEventCode(event)) {
  55946. case EVENT_CODE.delete:
  55947. case EVENT_CODE.backspace:
  55948. clearTimer();
  55949. break;
  55950. case EVENT_CODE.esc:
  55951. if (visible.value) close();
  55952. break;
  55953. default:
  55954. startTimer();
  55955. break;
  55956. }
  55957. }
  55958. onMounted(() => {
  55959. startTimer();
  55960. nextZIndex();
  55961. visible.value = true;
  55962. });
  55963. useEventListener(document, "keydown", onKeydown);
  55964. __expose({
  55965. visible,
  55966. close
  55967. });
  55968. return (_ctx, _cache) => {
  55969. return openBlock(), createBlock(Transition, {
  55970. name: unref(ns).b("fade"),
  55971. onBeforeLeave: __props.onClose,
  55972. onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
  55973. persisted: ""
  55974. }, {
  55975. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  55976. id: __props.id,
  55977. class: normalizeClass([
  55978. unref(ns).b(),
  55979. __props.customClass,
  55980. horizontalClass.value
  55981. ]),
  55982. style: normalizeStyle(positionStyle.value),
  55983. role: "alert",
  55984. onMouseenter: clearTimer,
  55985. onMouseleave: startTimer,
  55986. onClick: _cache[0] || (_cache[0] = (...args) => __props.onClick && __props.onClick(...args))
  55987. }, [iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
  55988. key: 0,
  55989. class: normalizeClass([unref(ns).e("icon"), typeClass.value])
  55990. }, {
  55991. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
  55992. _: 1
  55993. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("group")) }, [
  55994. createBaseVNode("h2", {
  55995. class: normalizeClass(unref(ns).e("title")),
  55996. textContent: toDisplayString(__props.title)
  55997. }, null, 10, _hoisted_2),
  55998. withDirectives(createBaseVNode("div", {
  55999. class: normalizeClass(unref(ns).e("content")),
  56000. style: normalizeStyle(!!__props.title ? void 0 : { margin: 0 })
  56001. }, [renderSlot(_ctx.$slots, "default", {}, () => [!__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(__props.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_4)], 2112))])], 6), [[vShow, __props.message]]),
  56002. __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  56003. key: 0,
  56004. class: normalizeClass(unref(ns).e("closeBtn")),
  56005. onClick: withModifiers(close, ["stop"])
  56006. }, {
  56007. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon)))]),
  56008. _: 1
  56009. }, 8, ["class"])) : createCommentVNode("v-if", true)
  56010. ], 2)], 46, _hoisted_1), [[vShow, visible.value]])]),
  56011. _: 3
  56012. }, 8, ["name", "onBeforeLeave"]);
  56013. };
  56014. }
  56015. });
  56016. //#endregion
  56017. //#region node_modules/element-plus/es/components/notification/src/notify.mjs
  56018. var notifications = {
  56019. "top-left": [],
  56020. "top-right": [],
  56021. "bottom-left": [],
  56022. "bottom-right": []
  56023. };
  56024. var GAP_SIZE = 16;
  56025. var seed = 1;
  56026. var notify = function(options = {}, context) {
  56027. if (!isClient) return { close: () => void 0 };
  56028. if (isString(options) || isVNode(options)) options = { message: options };
  56029. const position = options.position || "top-right";
  56030. let verticalOffset = options.offset || 0;
  56031. notifications[position].forEach(({ vm }) => {
  56032. verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
  56033. });
  56034. verticalOffset += GAP_SIZE;
  56035. const id = `notification_${seed++}`;
  56036. const userOnClose = options.onClose;
  56037. const props = {
  56038. ...options,
  56039. offset: verticalOffset,
  56040. id,
  56041. onClose: () => {
  56042. close(id, position, userOnClose);
  56043. }
  56044. };
  56045. let appendTo = document.body;
  56046. if (isElement$1(options.appendTo)) appendTo = options.appendTo;
  56047. else if (isString(options.appendTo)) appendTo = document.querySelector(options.appendTo);
  56048. if (!isElement$1(appendTo)) {
  56049. debugWarn("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  56050. appendTo = document.body;
  56051. }
  56052. const container = document.createElement("div");
  56053. const vm = createVNode(notification_default, props, isFunction$1(props.message) ? props.message : isVNode(props.message) ? () => props.message : null);
  56054. vm.appContext = isUndefined(context) ? notify._context : context;
  56055. vm.props.onDestroy = () => {
  56056. render(null, container);
  56057. };
  56058. render(vm, container);
  56059. notifications[position].push({ vm });
  56060. appendTo.appendChild(container.firstElementChild);
  56061. return { close: () => {
  56062. vm.component.exposed.visible.value = false;
  56063. } };
  56064. };
  56065. notificationTypes.forEach((type) => {
  56066. notify[type] = (options = {}, appContext) => {
  56067. if (isString(options) || isVNode(options)) options = { message: options };
  56068. return notify({
  56069. ...options,
  56070. type
  56071. }, appContext);
  56072. };
  56073. });
  56074. /**
  56075. * This function gets called when user click `x` button or press `esc` or the time reached its limitation.
  56076. * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called
  56077. * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.
  56078. * @param {String} id notification id to be closed
  56079. * @param {Position} position the positioning strategy
  56080. * @param {Function} userOnClose the callback called when close passed by user
  56081. */
  56082. function close(id, position, userOnClose) {
  56083. const orientedNotifications = notifications[position];
  56084. const idx = orientedNotifications.findIndex(({ vm }) => vm.component?.props.id === id);
  56085. if (idx === -1) return;
  56086. const { vm } = orientedNotifications[idx];
  56087. if (!vm) return;
  56088. userOnClose?.(vm);
  56089. const removedHeight = vm.el.offsetHeight;
  56090. const verticalPos = position.split("-")[0];
  56091. orientedNotifications.splice(idx, 1);
  56092. const len = orientedNotifications.length;
  56093. if (len < 1) return;
  56094. for (let i = idx; i < len; i++) {
  56095. const { el, component } = orientedNotifications[i].vm;
  56096. const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;
  56097. component.props.offset = pos;
  56098. }
  56099. }
  56100. function closeAll() {
  56101. for (const orientedNotifications of Object.values(notifications)) orientedNotifications.forEach(({ vm }) => {
  56102. vm.component.exposed.visible.value = false;
  56103. });
  56104. }
  56105. function updateOffsets(position = "top-right") {
  56106. let verticalOffset = notifications[position][0]?.vm.component?.props?.offset || 0;
  56107. for (const { vm } of notifications[position]) {
  56108. vm.component.props.offset = verticalOffset;
  56109. verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
  56110. }
  56111. }
  56112. notify.closeAll = closeAll;
  56113. notify.updateOffsets = updateOffsets;
  56114. notify._context = null;
  56115. //#endregion
  56116. //#region node_modules/element-plus/es/components/notification/index.mjs
  56117. var ElNotification = withInstallFunction(notify, "$notify");
  56118. //#endregion
  56119. //#region node_modules/element-plus/es/components/popover/src/popover.mjs
  56120. /**
  56121. * @deprecated Removed after 3.0.0, Use `PopoverProps` instead.
  56122. */
  56123. var popoverProps = buildProps({
  56124. trigger: useTooltipTriggerProps.trigger,
  56125. triggerKeys: useTooltipTriggerProps.triggerKeys,
  56126. placement: dropdownProps.placement,
  56127. disabled: useTooltipTriggerProps.disabled,
  56128. visible: useTooltipContentProps.visible,
  56129. transition: useTooltipContentProps.transition,
  56130. popperOptions: dropdownProps.popperOptions,
  56131. tabindex: dropdownProps.tabindex,
  56132. content: useTooltipContentProps.content,
  56133. popperStyle: useTooltipContentProps.popperStyle,
  56134. popperClass: useTooltipContentProps.popperClass,
  56135. enterable: {
  56136. ...useTooltipContentProps.enterable,
  56137. default: true
  56138. },
  56139. effect: {
  56140. ...useTooltipContentProps.effect,
  56141. default: "light"
  56142. },
  56143. teleported: useTooltipContentProps.teleported,
  56144. appendTo: useTooltipContentProps.appendTo,
  56145. title: String,
  56146. width: {
  56147. type: [String, Number],
  56148. default: 150
  56149. },
  56150. offset: {
  56151. type: Number,
  56152. default: void 0
  56153. },
  56154. showAfter: {
  56155. type: Number,
  56156. default: 0
  56157. },
  56158. hideAfter: {
  56159. type: Number,
  56160. default: 200
  56161. },
  56162. autoClose: {
  56163. type: Number,
  56164. default: 0
  56165. },
  56166. showArrow: {
  56167. type: Boolean,
  56168. default: true
  56169. },
  56170. persistent: {
  56171. type: Boolean,
  56172. default: true
  56173. },
  56174. "onUpdate:visible": { type: Function }
  56175. });
  56176. var popoverEmits = {
  56177. "update:visible": (value) => isBoolean(value),
  56178. "before-enter": () => true,
  56179. "before-leave": () => true,
  56180. "after-enter": () => true,
  56181. "after-leave": () => true
  56182. };
  56183. /**
  56184. * @description default values for PopoverProps
  56185. */
  56186. var popoverPropsDefaults = {
  56187. trigger: "hover",
  56188. triggerKeys: () => [
  56189. EVENT_CODE.enter,
  56190. EVENT_CODE.numpadEnter,
  56191. EVENT_CODE.space
  56192. ],
  56193. placement: "bottom",
  56194. visible: null,
  56195. popperOptions: () => ({}),
  56196. tabindex: 0,
  56197. content: "",
  56198. popperStyle: void 0,
  56199. enterable: true,
  56200. effect: "light",
  56201. teleported: true,
  56202. width: 150,
  56203. offset: void 0,
  56204. showAfter: 0,
  56205. hideAfter: 200,
  56206. autoClose: 0,
  56207. showArrow: true,
  56208. persistent: true
  56209. };
  56210. //#endregion
  56211. //#region node_modules/element-plus/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs
  56212. var updateEventKeyRaw = `onUpdate:visible`;
  56213. //#endregion
  56214. //#region node_modules/element-plus/es/components/popover/src/popover2.mjs
  56215. var popover_default = /* @__PURE__ */ defineComponent({
  56216. name: "ElPopover",
  56217. __name: "popover",
  56218. props: popoverProps,
  56219. emits: popoverEmits,
  56220. setup(__props, { expose: __expose, emit: __emit }) {
  56221. const props = __props;
  56222. const emit = __emit;
  56223. const onUpdateVisible = computed(() => {
  56224. return props[updateEventKeyRaw];
  56225. });
  56226. const ns = useNamespace("popover");
  56227. const tooltipRef = ref();
  56228. const popperRef = computed(() => {
  56229. return unref(tooltipRef)?.popperRef;
  56230. });
  56231. const style = computed(() => {
  56232. return [{ width: addUnit(props.width) }, props.popperStyle];
  56233. });
  56234. const kls = computed(() => {
  56235. return [
  56236. ns.b(),
  56237. props.popperClass,
  56238. { [ns.m("plain")]: !!props.content }
  56239. ];
  56240. });
  56241. const gpuAcceleration = computed(() => {
  56242. return props.transition === `${ns.namespace.value}-fade-in-linear`;
  56243. });
  56244. const hide = () => {
  56245. tooltipRef.value?.hide();
  56246. };
  56247. const beforeEnter = () => {
  56248. emit("before-enter");
  56249. };
  56250. const beforeLeave = () => {
  56251. emit("before-leave");
  56252. };
  56253. const afterEnter = () => {
  56254. emit("after-enter");
  56255. };
  56256. const afterLeave = () => {
  56257. emit("update:visible", false);
  56258. emit("after-leave");
  56259. };
  56260. __expose({
  56261. popperRef,
  56262. hide
  56263. });
  56264. return (_ctx, _cache) => {
  56265. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  56266. ref_key: "tooltipRef",
  56267. ref: tooltipRef
  56268. }, _ctx.$attrs, {
  56269. trigger: __props.trigger,
  56270. "trigger-keys": __props.triggerKeys,
  56271. placement: __props.placement,
  56272. disabled: __props.disabled,
  56273. visible: __props.visible,
  56274. transition: __props.transition,
  56275. "popper-options": __props.popperOptions,
  56276. tabindex: __props.tabindex,
  56277. content: __props.content,
  56278. offset: __props.offset,
  56279. "show-after": __props.showAfter,
  56280. "hide-after": __props.hideAfter,
  56281. "auto-close": __props.autoClose,
  56282. "show-arrow": __props.showArrow,
  56283. "aria-label": __props.title,
  56284. effect: __props.effect,
  56285. enterable: __props.enterable,
  56286. "popper-class": kls.value,
  56287. "popper-style": style.value,
  56288. teleported: __props.teleported,
  56289. "append-to": __props.appendTo,
  56290. persistent: __props.persistent,
  56291. "gpu-acceleration": gpuAcceleration.value,
  56292. "onUpdate:visible": onUpdateVisible.value,
  56293. onBeforeShow: beforeEnter,
  56294. onBeforeHide: beforeLeave,
  56295. onShow: afterEnter,
  56296. onHide: afterLeave
  56297. }), {
  56298. content: withCtx(() => [__props.title ? (openBlock(), createElementBlock("div", {
  56299. key: 0,
  56300. class: normalizeClass(unref(ns).e("title")),
  56301. role: "title"
  56302. }, toDisplayString(__props.title), 3)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", { hide }, () => [createTextVNode(toDisplayString(__props.content), 1)])]),
  56303. default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
  56304. _: 3
  56305. }, 16, [
  56306. "trigger",
  56307. "trigger-keys",
  56308. "placement",
  56309. "disabled",
  56310. "visible",
  56311. "transition",
  56312. "popper-options",
  56313. "tabindex",
  56314. "content",
  56315. "offset",
  56316. "show-after",
  56317. "hide-after",
  56318. "auto-close",
  56319. "show-arrow",
  56320. "aria-label",
  56321. "effect",
  56322. "enterable",
  56323. "popper-class",
  56324. "popper-style",
  56325. "teleported",
  56326. "append-to",
  56327. "persistent",
  56328. "gpu-acceleration",
  56329. "onUpdate:visible"
  56330. ]);
  56331. };
  56332. }
  56333. });
  56334. //#endregion
  56335. //#region node_modules/element-plus/es/components/popover/src/directive.mjs
  56336. var attachEvents = (el, binding) => {
  56337. const popover = (binding.arg || binding.value)?.popperRef;
  56338. if (popover) popover.triggerRef = el;
  56339. };
  56340. //#endregion
  56341. //#region node_modules/element-plus/es/components/popover/index.mjs
  56342. var ElPopoverDirective = withInstallDirective({
  56343. mounted(el, binding) {
  56344. attachEvents(el, binding);
  56345. },
  56346. updated(el, binding) {
  56347. attachEvents(el, binding);
  56348. }
  56349. }, "popover");
  56350. var ElPopover = withInstall(popover_default, { directive: ElPopoverDirective });
  56351. //#endregion
  56352. //#region node_modules/element-plus/es/version.mjs
  56353. var version$1 = "2.13.5";
  56354. //#endregion
  56355. //#region node_modules/element-plus/es/make-installer.mjs
  56356. var makeInstaller = (components = []) => {
  56357. const install = (app, options) => {
  56358. if (app[INSTALLED_KEY]) return;
  56359. app[INSTALLED_KEY] = true;
  56360. components.forEach((c) => app.use(c));
  56361. if (options) provideGlobalConfig(options, app, true);
  56362. };
  56363. return {
  56364. version: version$1,
  56365. install
  56366. };
  56367. };
  56368. //#endregion
  56369. //#region node_modules/element-plus/es/component.mjs
  56370. var component_default = [
  56371. ElAffix,
  56372. ElAlert,
  56373. ElAutocomplete,
  56374. ElAutoResizer,
  56375. ElAvatar,
  56376. ElAvatarGroup,
  56377. ElBacktop,
  56378. ElBadge,
  56379. ElBreadcrumb,
  56380. ElBreadcrumbItem,
  56381. ElButton,
  56382. ElButtonGroup,
  56383. ElCalendar,
  56384. ElCard,
  56385. ElCarousel,
  56386. ElCarouselItem,
  56387. ElCascader,
  56388. ElCascaderPanel,
  56389. ElCheckTag,
  56390. ElCheckbox,
  56391. ElCheckboxButton,
  56392. ElCheckboxGroup,
  56393. ElCol,
  56394. ElCollapse,
  56395. ElCollapseItem,
  56396. ElCollapseTransition,
  56397. ElColorPickerPanel,
  56398. ElColorPicker,
  56399. ElConfigProvider,
  56400. ElContainer,
  56401. ElAside,
  56402. ElFooter,
  56403. ElHeader,
  56404. ElMain,
  56405. ElDatePicker,
  56406. ElDatePickerPanel,
  56407. ElDescriptions,
  56408. ElDescriptionsItem,
  56409. ElDialog,
  56410. ElDivider,
  56411. ElDrawer,
  56412. ElDropdown,
  56413. ElDropdownItem,
  56414. ElDropdownMenu,
  56415. ElEmpty,
  56416. ElForm,
  56417. ElFormItem,
  56418. ElIcon,
  56419. ElImage,
  56420. ElImageViewer,
  56421. ElInput,
  56422. ElInputNumber,
  56423. ElInputTag,
  56424. ElLink,
  56425. ElMenu,
  56426. ElMenuItem,
  56427. ElMenuItemGroup,
  56428. ElSubMenu,
  56429. ElPageHeader,
  56430. ElPagination,
  56431. ElPopconfirm,
  56432. ElPopover,
  56433. ElPopper,
  56434. ElProgress,
  56435. ElRadio,
  56436. ElRadioButton,
  56437. ElRadioGroup,
  56438. ElRate,
  56439. ElResult,
  56440. ElRow,
  56441. ElScrollbar,
  56442. ElSelect,
  56443. ElOption,
  56444. ElOptionGroup,
  56445. ElSelectV2,
  56446. ElSkeleton,
  56447. ElSkeletonItem,
  56448. ElSlider,
  56449. ElSpace,
  56450. ElStatistic,
  56451. ElCountdown,
  56452. ElSteps,
  56453. ElStep,
  56454. ElSwitch,
  56455. ElTable,
  56456. ElTableColumn,
  56457. ElTableV2,
  56458. ElTabs,
  56459. ElTabPane,
  56460. ElTag,
  56461. ElText,
  56462. ElTimePicker,
  56463. ElTimeSelect,
  56464. ElTimeline,
  56465. ElTimelineItem,
  56466. ElTooltip,
  56467. ElTransfer,
  56468. ElTree,
  56469. ElTreeSelect,
  56470. ElTreeV2,
  56471. ElUpload,
  56472. ElWatermark,
  56473. ElTour,
  56474. ElTourStep,
  56475. ElAnchor,
  56476. ElAnchorLink,
  56477. ElSegmented,
  56478. ElMention,
  56479. ElSplitter,
  56480. ElSplitterPanel
  56481. ];
  56482. //#endregion
  56483. //#region node_modules/element-plus/es/plugin.mjs
  56484. var plugin_default = [
  56485. ElInfiniteScroll,
  56486. ElLoading,
  56487. ElMessage,
  56488. ElMessageBox,
  56489. ElNotification,
  56490. ElPopoverDirective
  56491. ];
  56492. //#endregion
  56493. //#region node_modules/element-plus/es/defaults.mjs
  56494. var defaults_default = makeInstaller([...component_default, ...plugin_default]);
  56495. //#endregion
  56496. //#region node_modules/element-plus/es/index.mjs
  56497. var install = defaults_default.install;
  56498. var version = defaults_default.version;
  56499. var element_plus_default = defaults_default;
  56500. //#endregion
  56501. var dayjs = import_dayjs_min.default;
  56502. export { BAR_MAP, BORDER_HORIZONTAL_WIDTH, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, picker_default as CommonPicker, CommonProps, DEFAULT_DIALOG_TRANSITION, DEFAULT_EMPTY_VALUES, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_STEP, DEFAULT_VALUE_ON_CLEAR, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DefaultProps, DynamicSizeGrid, DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElAvatarGroup, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElColorPickerPanel, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDatePickerPanel, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading as ElLoadingDirective, vLoading, Loading as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, arrow_default as ElPopperArrow, content_default as ElPopperContent, trigger_default as ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid, FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, MENU_INJECTION_KEY, MESSAGE_DEFAULT_PLACEMENT, MINIMUM_INPUT_WIDTH, Mousewheel, NODE_INSTANCE_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_COMMON_COLOR_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, RowAlign, RowJustify, SCOPE, SIZE_INJECTION_KEY, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, panel_time_pick_default as TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, ZINDEX_INJECTION_KEY, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, ariaProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarGroupContextKey, avatarGroupProps, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxDefaultProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, checkboxPropsDefaults, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerEmits, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps, colorPickerProps, colorPickerPropsDefaults, columnAlignment, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, datePickerPanelProps, datePickerProps, dayOrDaysToDate, dayjs, element_plus_default as default, defaultInitialZIndex, defaultNamespace, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, emptyValuesContextKey, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputPropsDefaults, inputTagEmits, inputTagProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, mentionDefaultProps, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messagePlacement, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popoverPropsDefaults, popperArrowProps, popperArrowPropsDefaults, popperContentEmits, popperContentProps, popperContentPropsDefaults, popperCoreConfigProps, popperCoreConfigPropsDefaults, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioButtonPropsDefaults, radioDefaultProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioGroupPropsDefaults, radioProps, radioPropsBase, radioPropsDefaults, rangeArr, rateEmits, rateProps, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits, timelineItemProps, timelineProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, translate, treeEmits, treeProps, uploadBaseProps, uploadBasePropsDefaults, uploadContentProps, uploadContentPropsDefaults, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, uploadPropsDefaults, useAriaProps, useAttrs, useCalcInputWidth, useCascaderConfig, useComposition, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDelayedTogglePropsDefaults, useDeprecated, useDialog, useDisabled, useDraggable, useEmptyValues, useEmptyValuesProps, useEscapeKeydown, useFloating, useFloatingProps, useFocus, useFocusController, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useSameTarget, useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipContentPropsDefaults, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTooltipTriggerPropsDefaults, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vRepeatClick, valueEquals, version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps, zIndexContextKey };
  56503. //# sourceMappingURL=element-plus.js.map