Table.js 169 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927
  1. import { d as g, P as ie, c as te, bD as pl, bE as ml, _ as G, p as Ut, n as Pt, bF as lt, bG as vl, bH as Gt, bI as hl, g as $n, m as wn, r as Dt, bx as gl, aU as Jt, M as se, O as Ne, Q as Ke, N as De, h as qe, u as Kt, ab as In, a6 as Pn, bJ as xl, z as qt, L as Yt, bK as Qt, bL as Zt, b as bl, bM as yl, bN as Cl, bO as Sl, bP as $l, bQ as wl, l as ze, bR as Ft, a8 as Tn, a1 as Il, j as Re, a as We, w as rt, s as Pl, R as Rn, bS as en, ax as Tl, q as Ve, bw as tn, bT as Rl, J as El, bU as Ol, ak as ft, ao as En, az as Bl, aS as Nl, bV as zl, bW as kl, K as On, W as _l, e as Ye, ay as Dl, bz as Kl, D as nn, bX as Fl, E as ln, t as Al, a4 as ot, a2 as Ml, i as Bn, a7 as Hl, o as jl } from "./index2.js";
  2. import { defineComponent as ue, createVNode as u, ref as pe, computed as C, createTextVNode as At, toRef as xe, inject as Me, provide as He, shallowRef as ce, onMounted as et, watch as Fe, isVNode as ut, Text as Ll, onUnmounted as Wl, watchEffect as Ee, getCurrentInstance as Vl, Fragment as Xe, onBeforeUnmount as tt, reactive as Qe, onActivated as Xl, nextTick as at, toRefs as $t, onUpdated as Ul } from "vue";
  3. import { B as Nn, g as on } from "./BaseInput.js";
  4. import { S as Gl } from "./index11.js";
  5. import { S as pt, s as zn } from "./index13.js";
  6. import { i as Jl, g as ql, a as Yl } from "./index16.js";
  7. import { c as Ql, u as Zl, a as wt, b as eo, d as to } from "./useMaxLevel.js";
  8. import { u as no } from "./useMergedState.js";
  9. import { C as mt } from "./index17.js";
  10. import { R as kn } from "./index18.js";
  11. import "./index15.js";
  12. import { I as lo } from "./Search.js";
  13. import { T as oo } from "./index19.js";
  14. import { s as ro } from "./scrollTo.js";
  15. const ao = (e) => ({
  16. // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  17. // And Typography use this to generate link style which should not do this.
  18. color: e.colorLink,
  19. textDecoration: "none",
  20. outline: "none",
  21. cursor: "pointer",
  22. transition: `color ${e.motionDurationSlow}`,
  23. "&:focus, &:hover": {
  24. color: e.colorLinkHover
  25. },
  26. "&:active": {
  27. color: e.colorLinkActive
  28. }
  29. });
  30. function io(e) {
  31. for (var t = -1, l = e == null ? 0 : e.length, n = {}; ++t < l; ) {
  32. var o = e[t];
  33. n[o[0]] = o[1];
  34. }
  35. return n;
  36. }
  37. const so = ue({
  38. name: "MiniSelect",
  39. compatConfig: {
  40. MODE: 3
  41. },
  42. inheritAttrs: !1,
  43. props: zn(),
  44. Option: pt.Option,
  45. setup(e, t) {
  46. let {
  47. attrs: l,
  48. slots: n
  49. } = t;
  50. return () => {
  51. const o = g(g(g({}, e), {
  52. size: "small"
  53. }), l);
  54. return u(pt, o, n);
  55. };
  56. }
  57. }), co = ue({
  58. name: "MiddleSelect",
  59. inheritAttrs: !1,
  60. props: zn(),
  61. Option: pt.Option,
  62. setup(e, t) {
  63. let {
  64. attrs: l,
  65. slots: n
  66. } = t;
  67. return () => {
  68. const o = g(g(g({}, e), {
  69. size: "middle"
  70. }), l);
  71. return u(pt, o, n);
  72. };
  73. }
  74. }), je = ue({
  75. compatConfig: {
  76. MODE: 3
  77. },
  78. name: "Pager",
  79. inheritAttrs: !1,
  80. props: {
  81. rootPrefixCls: String,
  82. page: Number,
  83. active: {
  84. type: Boolean,
  85. default: void 0
  86. },
  87. last: {
  88. type: Boolean,
  89. default: void 0
  90. },
  91. locale: ie.object,
  92. showTitle: {
  93. type: Boolean,
  94. default: void 0
  95. },
  96. itemRender: {
  97. type: Function,
  98. default: () => {
  99. }
  100. },
  101. onClick: {
  102. type: Function
  103. },
  104. onKeypress: {
  105. type: Function
  106. }
  107. },
  108. eimt: ["click", "keypress"],
  109. setup(e, t) {
  110. let {
  111. emit: l,
  112. attrs: n
  113. } = t;
  114. const o = () => {
  115. l("click", e.page);
  116. }, r = (a) => {
  117. l("keypress", a, o, e.page);
  118. };
  119. return () => {
  120. const {
  121. showTitle: a,
  122. page: i,
  123. itemRender: s
  124. } = e, {
  125. class: p,
  126. style: c
  127. } = n, f = `${e.rootPrefixCls}-item`, x = te(f, `${f}-${e.page}`, {
  128. [`${f}-active`]: e.active,
  129. [`${f}-disabled`]: !e.page
  130. }, p);
  131. return u("li", {
  132. onClick: o,
  133. onKeypress: r,
  134. title: a ? String(i) : null,
  135. tabindex: "0",
  136. class: x,
  137. style: c
  138. }, [s({
  139. page: i,
  140. type: "page",
  141. originalElement: u("a", {
  142. rel: "nofollow"
  143. }, [i])
  144. })]);
  145. };
  146. }
  147. }), Le = {
  148. ENTER: 13,
  149. ARROW_UP: 38,
  150. ARROW_DOWN: 40
  151. }, uo = ue({
  152. compatConfig: {
  153. MODE: 3
  154. },
  155. props: {
  156. disabled: {
  157. type: Boolean,
  158. default: void 0
  159. },
  160. changeSize: Function,
  161. quickGo: Function,
  162. selectComponentClass: ie.any,
  163. current: Number,
  164. pageSizeOptions: ie.array.def(["10", "20", "50", "100"]),
  165. pageSize: Number,
  166. buildOptionText: Function,
  167. locale: ie.object,
  168. rootPrefixCls: String,
  169. selectPrefixCls: String,
  170. goButton: ie.any
  171. },
  172. setup(e) {
  173. const t = pe(""), l = C(() => !t.value || isNaN(t.value) ? void 0 : Number(t.value)), n = (s) => `${s.value} ${e.locale.items_per_page}`, o = (s) => {
  174. const {
  175. value: p
  176. } = s.target;
  177. t.value !== p && (t.value = p);
  178. }, r = (s) => {
  179. const {
  180. goButton: p,
  181. quickGo: c,
  182. rootPrefixCls: f
  183. } = e;
  184. if (!(p || t.value === ""))
  185. if (s.relatedTarget && (s.relatedTarget.className.indexOf(`${f}-item-link`) >= 0 || s.relatedTarget.className.indexOf(`${f}-item`) >= 0)) {
  186. t.value = "";
  187. return;
  188. } else
  189. c(l.value), t.value = "";
  190. }, a = (s) => {
  191. t.value !== "" && (s.keyCode === Le.ENTER || s.type === "click") && (e.quickGo(l.value), t.value = "");
  192. }, i = C(() => {
  193. const {
  194. pageSize: s,
  195. pageSizeOptions: p
  196. } = e;
  197. return p.some((c) => c.toString() === s.toString()) ? p : p.concat([s.toString()]).sort((c, f) => {
  198. const x = isNaN(Number(c)) ? 0 : Number(c), $ = isNaN(Number(f)) ? 0 : Number(f);
  199. return x - $;
  200. });
  201. });
  202. return () => {
  203. const {
  204. rootPrefixCls: s,
  205. locale: p,
  206. changeSize: c,
  207. quickGo: f,
  208. goButton: x,
  209. selectComponentClass: $,
  210. selectPrefixCls: b,
  211. pageSize: m,
  212. disabled: v
  213. } = e, h = `${s}-options`;
  214. let y = null, d = null, T = null;
  215. if (!c && !f)
  216. return null;
  217. if (c && $) {
  218. const O = e.buildOptionText || n, z = i.value.map((S, H) => u($.Option, {
  219. key: H,
  220. value: S
  221. }, {
  222. default: () => [O({
  223. value: S
  224. })]
  225. }));
  226. y = u($, {
  227. disabled: v,
  228. prefixCls: b,
  229. showSearch: !1,
  230. class: `${h}-size-changer`,
  231. optionLabelProp: "children",
  232. value: (m || i.value[0]).toString(),
  233. onChange: (S) => c(Number(S)),
  234. getPopupContainer: (S) => S.parentNode
  235. }, {
  236. default: () => [z]
  237. });
  238. }
  239. return f && (x && (T = typeof x == "boolean" ? u("button", {
  240. type: "button",
  241. onClick: a,
  242. onKeyup: a,
  243. disabled: v,
  244. class: `${h}-quick-jumper-button`
  245. }, [p.jump_to_confirm]) : u("span", {
  246. onClick: a,
  247. onKeyup: a
  248. }, [x])), d = u("div", {
  249. class: `${h}-quick-jumper`
  250. }, [p.jump_to, u(Nn, {
  251. disabled: v,
  252. type: "text",
  253. value: t.value,
  254. onInput: o,
  255. onChange: o,
  256. onKeyup: a,
  257. onBlur: r
  258. }, null), p.page, T])), u("li", {
  259. class: `${h}`
  260. }, [y, d]);
  261. };
  262. }
  263. });
  264. var fo = function(e, t) {
  265. var l = {};
  266. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  267. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  268. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  269. return l;
  270. };
  271. function po(e) {
  272. return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
  273. }
  274. function mo(e) {
  275. let {
  276. originalElement: t
  277. } = e;
  278. return t;
  279. }
  280. function ke(e, t, l) {
  281. const n = typeof e == "undefined" ? t.statePageSize : e;
  282. return Math.floor((l.total - 1) / n) + 1;
  283. }
  284. const vo = ue({
  285. compatConfig: {
  286. MODE: 3
  287. },
  288. name: "Pagination",
  289. mixins: [pl],
  290. inheritAttrs: !1,
  291. props: {
  292. disabled: {
  293. type: Boolean,
  294. default: void 0
  295. },
  296. prefixCls: ie.string.def("rc-pagination"),
  297. selectPrefixCls: ie.string.def("rc-select"),
  298. current: Number,
  299. defaultCurrent: ie.number.def(1),
  300. total: ie.number.def(0),
  301. pageSize: Number,
  302. defaultPageSize: ie.number.def(10),
  303. hideOnSinglePage: {
  304. type: Boolean,
  305. default: !1
  306. },
  307. showSizeChanger: {
  308. type: Boolean,
  309. default: void 0
  310. },
  311. showLessItems: {
  312. type: Boolean,
  313. default: !1
  314. },
  315. // showSizeChange: PropTypes.func.def(noop),
  316. selectComponentClass: ie.any,
  317. showPrevNextJumpers: {
  318. type: Boolean,
  319. default: !0
  320. },
  321. showQuickJumper: ie.oneOfType([ie.looseBool, ie.object]).def(!1),
  322. showTitle: {
  323. type: Boolean,
  324. default: !0
  325. },
  326. pageSizeOptions: ie.arrayOf(ie.oneOfType([ie.number, ie.string])),
  327. buildOptionText: Function,
  328. showTotal: Function,
  329. simple: {
  330. type: Boolean,
  331. default: void 0
  332. },
  333. locale: ie.object.def(hl),
  334. itemRender: ie.func.def(mo),
  335. prevIcon: ie.any,
  336. nextIcon: ie.any,
  337. jumpPrevIcon: ie.any,
  338. jumpNextIcon: ie.any,
  339. totalBoundaryShowSizeChanger: ie.number.def(50)
  340. },
  341. data() {
  342. const e = this.$props;
  343. let t = Gt([this.current, this.defaultCurrent]);
  344. const l = Gt([this.pageSize, this.defaultPageSize]);
  345. return t = Math.min(t, ke(l, void 0, e)), {
  346. stateCurrent: t,
  347. stateCurrentInputValue: t,
  348. statePageSize: l
  349. };
  350. },
  351. watch: {
  352. current(e) {
  353. this.setState({
  354. stateCurrent: e,
  355. stateCurrentInputValue: e
  356. });
  357. },
  358. pageSize(e) {
  359. const t = {};
  360. let l = this.stateCurrent;
  361. const n = ke(e, this.$data, this.$props);
  362. l = l > n ? n : l, lt(this, "current") || (t.stateCurrent = l, t.stateCurrentInputValue = l), t.statePageSize = e, this.setState(t);
  363. },
  364. stateCurrent(e, t) {
  365. this.$nextTick(() => {
  366. if (this.$refs.paginationNode) {
  367. const l = this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);
  368. l && document.activeElement === l && l.blur();
  369. }
  370. });
  371. },
  372. total() {
  373. const e = {}, t = ke(this.pageSize, this.$data, this.$props);
  374. if (lt(this, "current")) {
  375. const l = Math.min(this.current, t);
  376. e.stateCurrent = l, e.stateCurrentInputValue = l;
  377. } else {
  378. let l = this.stateCurrent;
  379. l === 0 && t > 0 ? l = 1 : l = Math.min(this.stateCurrent, t), e.stateCurrent = l;
  380. }
  381. this.setState(e);
  382. }
  383. },
  384. methods: {
  385. getJumpPrevPage() {
  386. return Math.max(1, this.stateCurrent - (this.showLessItems ? 3 : 5));
  387. },
  388. getJumpNextPage() {
  389. return Math.min(ke(void 0, this.$data, this.$props), this.stateCurrent + (this.showLessItems ? 3 : 5));
  390. },
  391. getItemIcon(e, t) {
  392. const {
  393. prefixCls: l
  394. } = this.$props;
  395. return vl(this, e, this.$props) || u("button", {
  396. type: "button",
  397. "aria-label": t,
  398. class: `${l}-item-link`
  399. }, null);
  400. },
  401. getValidValue(e) {
  402. const t = e.target.value, l = ke(void 0, this.$data, this.$props), {
  403. stateCurrentInputValue: n
  404. } = this.$data;
  405. let o;
  406. return t === "" ? o = t : isNaN(Number(t)) ? o = n : t >= l ? o = l : o = Number(t), o;
  407. },
  408. isValid(e) {
  409. return po(e) && e !== this.stateCurrent;
  410. },
  411. shouldDisplayQuickJumper() {
  412. const {
  413. showQuickJumper: e,
  414. pageSize: t,
  415. total: l
  416. } = this.$props;
  417. return l <= t ? !1 : e;
  418. },
  419. // calculatePage (p) {
  420. // let pageSize = p
  421. // if (typeof pageSize === 'undefined') {
  422. // pageSize = this.statePageSize
  423. // }
  424. // return Math.floor((this.total - 1) / pageSize) + 1
  425. // },
  426. handleKeyDown(e) {
  427. (e.keyCode === Le.ARROW_UP || e.keyCode === Le.ARROW_DOWN) && e.preventDefault();
  428. },
  429. handleKeyUp(e) {
  430. const t = this.getValidValue(e), l = this.stateCurrentInputValue;
  431. t !== l && this.setState({
  432. stateCurrentInputValue: t
  433. }), e.keyCode === Le.ENTER ? this.handleChange(t) : e.keyCode === Le.ARROW_UP ? this.handleChange(t - 1) : e.keyCode === Le.ARROW_DOWN && this.handleChange(t + 1);
  434. },
  435. changePageSize(e) {
  436. let t = this.stateCurrent;
  437. const l = t, n = ke(e, this.$data, this.$props);
  438. t = t > n ? n : t, n === 0 && (t = this.stateCurrent), typeof e == "number" && (lt(this, "pageSize") || this.setState({
  439. statePageSize: e
  440. }), lt(this, "current") || this.setState({
  441. stateCurrent: t,
  442. stateCurrentInputValue: t
  443. })), this.__emit("update:pageSize", e), t !== l && this.__emit("update:current", t), this.__emit("showSizeChange", t, e), this.__emit("change", t, e);
  444. },
  445. handleChange(e) {
  446. const {
  447. disabled: t
  448. } = this.$props;
  449. let l = e;
  450. if (this.isValid(l) && !t) {
  451. const n = ke(void 0, this.$data, this.$props);
  452. return l > n ? l = n : l < 1 && (l = 1), lt(this, "current") || this.setState({
  453. stateCurrent: l,
  454. stateCurrentInputValue: l
  455. }), this.__emit("update:current", l), this.__emit("change", l, this.statePageSize), l;
  456. }
  457. return this.stateCurrent;
  458. },
  459. prev() {
  460. this.hasPrev() && this.handleChange(this.stateCurrent - 1);
  461. },
  462. next() {
  463. this.hasNext() && this.handleChange(this.stateCurrent + 1);
  464. },
  465. jumpPrev() {
  466. this.handleChange(this.getJumpPrevPage());
  467. },
  468. jumpNext() {
  469. this.handleChange(this.getJumpNextPage());
  470. },
  471. hasPrev() {
  472. return this.stateCurrent > 1;
  473. },
  474. hasNext() {
  475. return this.stateCurrent < ke(void 0, this.$data, this.$props);
  476. },
  477. getShowSizeChanger() {
  478. const {
  479. showSizeChanger: e,
  480. total: t,
  481. totalBoundaryShowSizeChanger: l
  482. } = this.$props;
  483. return typeof e != "undefined" ? e : t > l;
  484. },
  485. runIfEnter(e, t) {
  486. if (e.key === "Enter" || e.charCode === 13) {
  487. e.preventDefault();
  488. for (var l = arguments.length, n = new Array(l > 2 ? l - 2 : 0), o = 2; o < l; o++)
  489. n[o - 2] = arguments[o];
  490. t(...n);
  491. }
  492. },
  493. runIfEnterPrev(e) {
  494. this.runIfEnter(e, this.prev);
  495. },
  496. runIfEnterNext(e) {
  497. this.runIfEnter(e, this.next);
  498. },
  499. runIfEnterJumpPrev(e) {
  500. this.runIfEnter(e, this.jumpPrev);
  501. },
  502. runIfEnterJumpNext(e) {
  503. this.runIfEnter(e, this.jumpNext);
  504. },
  505. handleGoTO(e) {
  506. (e.keyCode === Le.ENTER || e.type === "click") && this.handleChange(this.stateCurrentInputValue);
  507. },
  508. renderPrev(e) {
  509. const {
  510. itemRender: t
  511. } = this.$props, l = t({
  512. page: e,
  513. type: "prev",
  514. originalElement: this.getItemIcon("prevIcon", "prev page")
  515. }), n = !this.hasPrev();
  516. return Pt(l) ? Ut(l, n ? {
  517. disabled: n
  518. } : {}) : l;
  519. },
  520. renderNext(e) {
  521. const {
  522. itemRender: t
  523. } = this.$props, l = t({
  524. page: e,
  525. type: "next",
  526. originalElement: this.getItemIcon("nextIcon", "next page")
  527. }), n = !this.hasNext();
  528. return Pt(l) ? Ut(l, n ? {
  529. disabled: n
  530. } : {}) : l;
  531. }
  532. },
  533. render() {
  534. const {
  535. prefixCls: e,
  536. disabled: t,
  537. hideOnSinglePage: l,
  538. total: n,
  539. locale: o,
  540. showQuickJumper: r,
  541. showLessItems: a,
  542. showTitle: i,
  543. showTotal: s,
  544. simple: p,
  545. itemRender: c,
  546. showPrevNextJumpers: f,
  547. jumpPrevIcon: x,
  548. jumpNextIcon: $,
  549. selectComponentClass: b,
  550. selectPrefixCls: m,
  551. pageSizeOptions: v
  552. } = this.$props, {
  553. stateCurrent: h,
  554. statePageSize: y
  555. } = this, d = ml(this.$attrs).extraAttrs, {
  556. class: T
  557. } = d, O = fo(d, ["class"]);
  558. if (l === !0 && this.total <= y)
  559. return null;
  560. const z = ke(void 0, this.$data, this.$props), S = [];
  561. let H = null, R = null, E = null, k = null, N = null;
  562. const M = r && r.goButton, J = a ? 1 : 2, Z = h - 1 > 0 ? h - 1 : 0, ee = h + 1 < z ? h + 1 : z, fe = this.hasPrev(), le = this.hasNext();
  563. if (p)
  564. return M && (typeof M == "boolean" ? N = u("button", {
  565. type: "button",
  566. onClick: this.handleGoTO,
  567. onKeyup: this.handleGoTO
  568. }, [o.jump_to_confirm]) : N = u("span", {
  569. onClick: this.handleGoTO,
  570. onKeyup: this.handleGoTO
  571. }, [M]), N = u("li", {
  572. title: i ? `${o.jump_to}${h}/${z}` : null,
  573. class: `${e}-simple-pager`
  574. }, [N])), u("ul", G({
  575. class: te(`${e} ${e}-simple`, {
  576. [`${e}-disabled`]: t
  577. }, T)
  578. }, O), [u("li", {
  579. title: i ? o.prev_page : null,
  580. onClick: this.prev,
  581. tabindex: fe ? 0 : null,
  582. onKeypress: this.runIfEnterPrev,
  583. class: te(`${e}-prev`, {
  584. [`${e}-disabled`]: !fe
  585. }),
  586. "aria-disabled": !fe
  587. }, [this.renderPrev(Z)]), u("li", {
  588. title: i ? `${h}/${z}` : null,
  589. class: `${e}-simple-pager`
  590. }, [u(Nn, {
  591. type: "text",
  592. value: this.stateCurrentInputValue,
  593. disabled: t,
  594. onKeydown: this.handleKeyDown,
  595. onKeyup: this.handleKeyUp,
  596. onInput: this.handleKeyUp,
  597. onChange: this.handleKeyUp,
  598. size: "3"
  599. }, null), u("span", {
  600. class: `${e}-slash`
  601. }, [At("/")]), z]), u("li", {
  602. title: i ? o.next_page : null,
  603. onClick: this.next,
  604. tabindex: le ? 0 : null,
  605. onKeypress: this.runIfEnterNext,
  606. class: te(`${e}-next`, {
  607. [`${e}-disabled`]: !le
  608. }),
  609. "aria-disabled": !le
  610. }, [this.renderNext(ee)]), N]);
  611. if (z <= 3 + J * 2) {
  612. const K = {
  613. locale: o,
  614. rootPrefixCls: e,
  615. showTitle: i,
  616. itemRender: c,
  617. onClick: this.handleChange,
  618. onKeypress: this.runIfEnter
  619. };
  620. z || S.push(u(je, G(G({}, K), {}, {
  621. key: "noPager",
  622. page: 1,
  623. class: `${e}-item-disabled`
  624. }), null));
  625. for (let B = 1; B <= z; B += 1) {
  626. const A = h === B;
  627. S.push(u(je, G(G({}, K), {}, {
  628. key: B,
  629. page: B,
  630. active: A
  631. }), null));
  632. }
  633. } else {
  634. const K = a ? o.prev_3 : o.prev_5, B = a ? o.next_3 : o.next_5;
  635. f && (H = u("li", {
  636. title: this.showTitle ? K : null,
  637. key: "prev",
  638. onClick: this.jumpPrev,
  639. tabindex: "0",
  640. onKeypress: this.runIfEnterJumpPrev,
  641. class: te(`${e}-jump-prev`, {
  642. [`${e}-jump-prev-custom-icon`]: !!x
  643. })
  644. }, [c({
  645. page: this.getJumpPrevPage(),
  646. type: "jump-prev",
  647. originalElement: this.getItemIcon("jumpPrevIcon", "prev page")
  648. })]), R = u("li", {
  649. title: this.showTitle ? B : null,
  650. key: "next",
  651. tabindex: "0",
  652. onClick: this.jumpNext,
  653. onKeypress: this.runIfEnterJumpNext,
  654. class: te(`${e}-jump-next`, {
  655. [`${e}-jump-next-custom-icon`]: !!$
  656. })
  657. }, [c({
  658. page: this.getJumpNextPage(),
  659. type: "jump-next",
  660. originalElement: this.getItemIcon("jumpNextIcon", "next page")
  661. })])), k = u(je, {
  662. locale: o,
  663. last: !0,
  664. rootPrefixCls: e,
  665. onClick: this.handleChange,
  666. onKeypress: this.runIfEnter,
  667. key: z,
  668. page: z,
  669. active: !1,
  670. showTitle: i,
  671. itemRender: c
  672. }, null), E = u(je, {
  673. locale: o,
  674. rootPrefixCls: e,
  675. onClick: this.handleChange,
  676. onKeypress: this.runIfEnter,
  677. key: 1,
  678. page: 1,
  679. active: !1,
  680. showTitle: i,
  681. itemRender: c
  682. }, null);
  683. let A = Math.max(1, h - J), F = Math.min(h + J, z);
  684. h - 1 <= J && (F = 1 + J * 2), z - h <= J && (A = z - J * 2);
  685. for (let oe = A; oe <= F; oe += 1) {
  686. const V = h === oe;
  687. S.push(u(je, {
  688. locale: o,
  689. rootPrefixCls: e,
  690. onClick: this.handleChange,
  691. onKeypress: this.runIfEnter,
  692. key: oe,
  693. page: oe,
  694. active: V,
  695. showTitle: i,
  696. itemRender: c
  697. }, null));
  698. }
  699. h - 1 >= J * 2 && h !== 3 && (S[0] = u(je, {
  700. locale: o,
  701. rootPrefixCls: e,
  702. onClick: this.handleChange,
  703. onKeypress: this.runIfEnter,
  704. key: A,
  705. page: A,
  706. class: `${e}-item-after-jump-prev`,
  707. active: !1,
  708. showTitle: this.showTitle,
  709. itemRender: c
  710. }, null), S.unshift(H)), z - h >= J * 2 && h !== z - 2 && (S[S.length - 1] = u(je, {
  711. locale: o,
  712. rootPrefixCls: e,
  713. onClick: this.handleChange,
  714. onKeypress: this.runIfEnter,
  715. key: F,
  716. page: F,
  717. class: `${e}-item-before-jump-next`,
  718. active: !1,
  719. showTitle: this.showTitle,
  720. itemRender: c
  721. }, null), S.push(R)), A !== 1 && S.unshift(E), F !== z && S.push(k);
  722. }
  723. let L = null;
  724. s && (L = u("li", {
  725. class: `${e}-total-text`
  726. }, [s(n, [n === 0 ? 0 : (h - 1) * y + 1, h * y > n ? n : h * y])]));
  727. const j = !fe || !z, q = !le || !z, w = this.buildOptionText || this.$slots.buildOptionText;
  728. return u("ul", G(G({
  729. unselectable: "on",
  730. ref: "paginationNode"
  731. }, O), {}, {
  732. class: te({
  733. [`${e}`]: !0,
  734. [`${e}-disabled`]: t
  735. }, T)
  736. }), [L, u("li", {
  737. title: i ? o.prev_page : null,
  738. onClick: this.prev,
  739. tabindex: j ? null : 0,
  740. onKeypress: this.runIfEnterPrev,
  741. class: te(`${e}-prev`, {
  742. [`${e}-disabled`]: j
  743. }),
  744. "aria-disabled": j
  745. }, [this.renderPrev(Z)]), S, u("li", {
  746. title: i ? o.next_page : null,
  747. onClick: this.next,
  748. tabindex: q ? null : 0,
  749. onKeypress: this.runIfEnterNext,
  750. class: te(`${e}-next`, {
  751. [`${e}-disabled`]: q
  752. }),
  753. "aria-disabled": q
  754. }, [this.renderNext(ee)]), u(uo, {
  755. disabled: t,
  756. locale: o,
  757. rootPrefixCls: e,
  758. selectComponentClass: b,
  759. selectPrefixCls: m,
  760. changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
  761. current: h,
  762. pageSize: y,
  763. pageSizeOptions: v,
  764. buildOptionText: w || null,
  765. quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
  766. goButton: M
  767. }, null)]);
  768. }
  769. }), ho = (e) => {
  770. const {
  771. componentCls: t
  772. } = e;
  773. return {
  774. [`${t}-disabled`]: {
  775. "&, &:hover": {
  776. cursor: "not-allowed",
  777. [`${t}-item-link`]: {
  778. color: e.colorTextDisabled,
  779. cursor: "not-allowed"
  780. }
  781. },
  782. "&:focus-visible": {
  783. cursor: "not-allowed",
  784. [`${t}-item-link`]: {
  785. color: e.colorTextDisabled,
  786. cursor: "not-allowed"
  787. }
  788. }
  789. },
  790. [`&${t}-disabled`]: {
  791. cursor: "not-allowed",
  792. [`&${t}-mini`]: {
  793. [`
  794. &:hover ${t}-item:not(${t}-item-active),
  795. &:active ${t}-item:not(${t}-item-active),
  796. &:hover ${t}-item-link,
  797. &:active ${t}-item-link
  798. `]: {
  799. backgroundColor: "transparent"
  800. }
  801. },
  802. [`${t}-item`]: {
  803. cursor: "not-allowed",
  804. "&:hover, &:active": {
  805. backgroundColor: "transparent"
  806. },
  807. a: {
  808. color: e.colorTextDisabled,
  809. backgroundColor: "transparent",
  810. border: "none",
  811. cursor: "not-allowed"
  812. },
  813. "&-active": {
  814. borderColor: e.colorBorder,
  815. backgroundColor: e.paginationItemDisabledBgActive,
  816. "&:hover, &:active": {
  817. backgroundColor: e.paginationItemDisabledBgActive
  818. },
  819. a: {
  820. color: e.paginationItemDisabledColorActive
  821. }
  822. }
  823. },
  824. [`${t}-item-link`]: {
  825. color: e.colorTextDisabled,
  826. cursor: "not-allowed",
  827. "&:hover, &:active": {
  828. backgroundColor: "transparent"
  829. },
  830. [`${t}-simple&`]: {
  831. backgroundColor: "transparent",
  832. "&:hover, &:active": {
  833. backgroundColor: "transparent"
  834. }
  835. }
  836. },
  837. [`${t}-simple-pager`]: {
  838. color: e.colorTextDisabled
  839. },
  840. [`${t}-jump-prev, ${t}-jump-next`]: {
  841. [`${t}-item-link-icon`]: {
  842. opacity: 0
  843. },
  844. [`${t}-item-ellipsis`]: {
  845. opacity: 1
  846. }
  847. }
  848. },
  849. [`&${t}-simple`]: {
  850. [`${t}-prev, ${t}-next`]: {
  851. [`&${t}-disabled ${t}-item-link`]: {
  852. "&:hover, &:active": {
  853. backgroundColor: "transparent"
  854. }
  855. }
  856. }
  857. }
  858. };
  859. }, go = (e) => {
  860. const {
  861. componentCls: t
  862. } = e;
  863. return {
  864. [`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]: {
  865. height: e.paginationItemSizeSM,
  866. lineHeight: `${e.paginationItemSizeSM}px`
  867. },
  868. [`&${t}-mini ${t}-item`]: {
  869. minWidth: e.paginationItemSizeSM,
  870. height: e.paginationItemSizeSM,
  871. margin: 0,
  872. lineHeight: `${e.paginationItemSizeSM - 2}px`
  873. },
  874. [`&${t}-mini ${t}-item:not(${t}-item-active)`]: {
  875. backgroundColor: "transparent",
  876. borderColor: "transparent",
  877. "&:hover": {
  878. backgroundColor: e.colorBgTextHover
  879. },
  880. "&:active": {
  881. backgroundColor: e.colorBgTextActive
  882. }
  883. },
  884. [`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]: {
  885. minWidth: e.paginationItemSizeSM,
  886. height: e.paginationItemSizeSM,
  887. margin: 0,
  888. lineHeight: `${e.paginationItemSizeSM}px`,
  889. [`&:hover ${t}-item-link`]: {
  890. backgroundColor: e.colorBgTextHover
  891. },
  892. [`&:active ${t}-item-link`]: {
  893. backgroundColor: e.colorBgTextActive
  894. },
  895. [`&${t}-disabled:hover ${t}-item-link`]: {
  896. backgroundColor: "transparent"
  897. }
  898. },
  899. [`
  900. &${t}-mini ${t}-prev ${t}-item-link,
  901. &${t}-mini ${t}-next ${t}-item-link
  902. `]: {
  903. backgroundColor: "transparent",
  904. borderColor: "transparent",
  905. "&::after": {
  906. height: e.paginationItemSizeSM,
  907. lineHeight: `${e.paginationItemSizeSM}px`
  908. }
  909. },
  910. [`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]: {
  911. height: e.paginationItemSizeSM,
  912. marginInlineEnd: 0,
  913. lineHeight: `${e.paginationItemSizeSM}px`
  914. },
  915. [`&${t}-mini ${t}-options`]: {
  916. marginInlineStart: e.paginationMiniOptionsMarginInlineStart,
  917. "&-size-changer": {
  918. top: e.paginationMiniOptionsSizeChangerTop
  919. },
  920. "&-quick-jumper": {
  921. height: e.paginationItemSizeSM,
  922. lineHeight: `${e.paginationItemSizeSM}px`,
  923. input: g(g({}, Yl(e)), {
  924. width: e.paginationMiniQuickJumperInputWidth,
  925. height: e.controlHeightSM
  926. })
  927. }
  928. }
  929. };
  930. }, xo = (e) => {
  931. const {
  932. componentCls: t
  933. } = e;
  934. return {
  935. [`
  936. &${t}-simple ${t}-prev,
  937. &${t}-simple ${t}-next
  938. `]: {
  939. height: e.paginationItemSizeSM,
  940. lineHeight: `${e.paginationItemSizeSM}px`,
  941. verticalAlign: "top",
  942. [`${t}-item-link`]: {
  943. height: e.paginationItemSizeSM,
  944. backgroundColor: "transparent",
  945. border: 0,
  946. "&:hover": {
  947. backgroundColor: e.colorBgTextHover
  948. },
  949. "&:active": {
  950. backgroundColor: e.colorBgTextActive
  951. },
  952. "&::after": {
  953. height: e.paginationItemSizeSM,
  954. lineHeight: `${e.paginationItemSizeSM}px`
  955. }
  956. }
  957. },
  958. [`&${t}-simple ${t}-simple-pager`]: {
  959. display: "inline-block",
  960. height: e.paginationItemSizeSM,
  961. marginInlineEnd: e.marginXS,
  962. input: {
  963. boxSizing: "border-box",
  964. height: "100%",
  965. marginInlineEnd: e.marginXS,
  966. padding: `0 ${e.paginationItemPaddingInline}px`,
  967. textAlign: "center",
  968. backgroundColor: e.paginationItemInputBg,
  969. border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
  970. borderRadius: e.borderRadius,
  971. outline: "none",
  972. transition: `border-color ${e.motionDurationMid}`,
  973. color: "inherit",
  974. "&:hover": {
  975. borderColor: e.colorPrimary
  976. },
  977. "&:focus": {
  978. borderColor: e.colorPrimaryHover,
  979. boxShadow: `${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
  980. },
  981. "&[disabled]": {
  982. color: e.colorTextDisabled,
  983. backgroundColor: e.colorBgContainerDisabled,
  984. borderColor: e.colorBorder,
  985. cursor: "not-allowed"
  986. }
  987. }
  988. }
  989. };
  990. }, bo = (e) => {
  991. const {
  992. componentCls: t
  993. } = e;
  994. return {
  995. [`${t}-jump-prev, ${t}-jump-next`]: {
  996. outline: 0,
  997. [`${t}-item-container`]: {
  998. position: "relative",
  999. [`${t}-item-link-icon`]: {
  1000. color: e.colorPrimary,
  1001. fontSize: e.fontSizeSM,
  1002. opacity: 0,
  1003. transition: `all ${e.motionDurationMid}`,
  1004. "&-svg": {
  1005. top: 0,
  1006. insetInlineEnd: 0,
  1007. bottom: 0,
  1008. insetInlineStart: 0,
  1009. margin: "auto"
  1010. }
  1011. },
  1012. [`${t}-item-ellipsis`]: {
  1013. position: "absolute",
  1014. top: 0,
  1015. insetInlineEnd: 0,
  1016. bottom: 0,
  1017. insetInlineStart: 0,
  1018. display: "block",
  1019. margin: "auto",
  1020. color: e.colorTextDisabled,
  1021. fontFamily: "Arial, Helvetica, sans-serif",
  1022. letterSpacing: e.paginationEllipsisLetterSpacing,
  1023. textAlign: "center",
  1024. textIndent: e.paginationEllipsisTextIndent,
  1025. opacity: 1,
  1026. transition: `all ${e.motionDurationMid}`
  1027. }
  1028. },
  1029. "&:hover": {
  1030. [`${t}-item-link-icon`]: {
  1031. opacity: 1
  1032. },
  1033. [`${t}-item-ellipsis`]: {
  1034. opacity: 0
  1035. }
  1036. },
  1037. "&:focus-visible": g({
  1038. [`${t}-item-link-icon`]: {
  1039. opacity: 1
  1040. },
  1041. [`${t}-item-ellipsis`]: {
  1042. opacity: 0
  1043. }
  1044. }, Jt(e))
  1045. },
  1046. [`
  1047. ${t}-prev,
  1048. ${t}-jump-prev,
  1049. ${t}-jump-next
  1050. `]: {
  1051. marginInlineEnd: e.marginXS
  1052. },
  1053. [`
  1054. ${t}-prev,
  1055. ${t}-next,
  1056. ${t}-jump-prev,
  1057. ${t}-jump-next
  1058. `]: {
  1059. display: "inline-block",
  1060. minWidth: e.paginationItemSize,
  1061. height: e.paginationItemSize,
  1062. color: e.colorText,
  1063. fontFamily: e.paginationFontFamily,
  1064. lineHeight: `${e.paginationItemSize}px`,
  1065. textAlign: "center",
  1066. verticalAlign: "middle",
  1067. listStyle: "none",
  1068. borderRadius: e.borderRadius,
  1069. cursor: "pointer",
  1070. transition: `all ${e.motionDurationMid}`
  1071. },
  1072. [`${t}-prev, ${t}-next`]: {
  1073. fontFamily: "Arial, Helvetica, sans-serif",
  1074. outline: 0,
  1075. button: {
  1076. color: e.colorText,
  1077. cursor: "pointer",
  1078. userSelect: "none"
  1079. },
  1080. [`${t}-item-link`]: {
  1081. display: "block",
  1082. width: "100%",
  1083. height: "100%",
  1084. padding: 0,
  1085. fontSize: e.fontSizeSM,
  1086. textAlign: "center",
  1087. backgroundColor: "transparent",
  1088. border: `${e.lineWidth}px ${e.lineType} transparent`,
  1089. borderRadius: e.borderRadius,
  1090. outline: "none",
  1091. transition: `all ${e.motionDurationMid}`
  1092. },
  1093. [`&:focus-visible ${t}-item-link`]: g({}, Jt(e)),
  1094. [`&:hover ${t}-item-link`]: {
  1095. backgroundColor: e.colorBgTextHover
  1096. },
  1097. [`&:active ${t}-item-link`]: {
  1098. backgroundColor: e.colorBgTextActive
  1099. },
  1100. [`&${t}-disabled:hover`]: {
  1101. [`${t}-item-link`]: {
  1102. backgroundColor: "transparent"
  1103. }
  1104. }
  1105. },
  1106. [`${t}-slash`]: {
  1107. marginInlineEnd: e.paginationSlashMarginInlineEnd,
  1108. marginInlineStart: e.paginationSlashMarginInlineStart
  1109. },
  1110. [`${t}-options`]: {
  1111. display: "inline-block",
  1112. marginInlineStart: e.margin,
  1113. verticalAlign: "middle",
  1114. "&-size-changer.-select": {
  1115. display: "inline-block",
  1116. width: "auto"
  1117. },
  1118. "&-quick-jumper": {
  1119. display: "inline-block",
  1120. height: e.controlHeight,
  1121. marginInlineStart: e.marginXS,
  1122. lineHeight: `${e.controlHeight}px`,
  1123. verticalAlign: "top",
  1124. input: g(g({}, ql(e)), {
  1125. width: e.controlHeightLG * 1.25,
  1126. height: e.controlHeight,
  1127. boxSizing: "border-box",
  1128. margin: 0,
  1129. marginInlineStart: e.marginXS,
  1130. marginInlineEnd: e.marginXS
  1131. })
  1132. }
  1133. }
  1134. };
  1135. }, yo = (e) => {
  1136. const {
  1137. componentCls: t
  1138. } = e;
  1139. return {
  1140. [`${t}-item`]: g(g({
  1141. display: "inline-block",
  1142. minWidth: e.paginationItemSize,
  1143. height: e.paginationItemSize,
  1144. marginInlineEnd: e.marginXS,
  1145. fontFamily: e.paginationFontFamily,
  1146. lineHeight: `${e.paginationItemSize - 2}px`,
  1147. textAlign: "center",
  1148. verticalAlign: "middle",
  1149. listStyle: "none",
  1150. backgroundColor: "transparent",
  1151. border: `${e.lineWidth}px ${e.lineType} transparent`,
  1152. borderRadius: e.borderRadius,
  1153. outline: 0,
  1154. cursor: "pointer",
  1155. userSelect: "none",
  1156. a: {
  1157. display: "block",
  1158. padding: `0 ${e.paginationItemPaddingInline}px`,
  1159. color: e.colorText,
  1160. transition: "none",
  1161. "&:hover": {
  1162. textDecoration: "none"
  1163. }
  1164. },
  1165. [`&:not(${t}-item-active)`]: {
  1166. "&:hover": {
  1167. transition: `all ${e.motionDurationMid}`,
  1168. backgroundColor: e.colorBgTextHover
  1169. },
  1170. "&:active": {
  1171. backgroundColor: e.colorBgTextActive
  1172. }
  1173. }
  1174. }, gl(e)), {
  1175. "&-active": {
  1176. fontWeight: e.paginationFontWeightActive,
  1177. backgroundColor: e.paginationItemBgActive,
  1178. borderColor: e.colorPrimary,
  1179. a: {
  1180. color: e.colorPrimary
  1181. },
  1182. "&:hover": {
  1183. borderColor: e.colorPrimaryHover
  1184. },
  1185. "&:hover a": {
  1186. color: e.colorPrimaryHover
  1187. }
  1188. }
  1189. })
  1190. };
  1191. }, Co = (e) => {
  1192. const {
  1193. componentCls: t
  1194. } = e;
  1195. return {
  1196. [t]: g(g(g(g(g(g(g(g({}, Dt(e)), {
  1197. "ul, ol": {
  1198. margin: 0,
  1199. padding: 0,
  1200. listStyle: "none"
  1201. },
  1202. "&::after": {
  1203. display: "block",
  1204. clear: "both",
  1205. height: 0,
  1206. overflow: "hidden",
  1207. visibility: "hidden",
  1208. content: '""'
  1209. },
  1210. [`${t}-total-text`]: {
  1211. display: "inline-block",
  1212. height: e.paginationItemSize,
  1213. marginInlineEnd: e.marginXS,
  1214. lineHeight: `${e.paginationItemSize - 2}px`,
  1215. verticalAlign: "middle"
  1216. }
  1217. }), yo(e)), bo(e)), xo(e)), go(e)), ho(e)), {
  1218. // media query style
  1219. [`@media only screen and (max-width: ${e.screenLG}px)`]: {
  1220. [`${t}-item`]: {
  1221. "&-after-jump-prev, &-before-jump-next": {
  1222. display: "none"
  1223. }
  1224. }
  1225. },
  1226. [`@media only screen and (max-width: ${e.screenSM}px)`]: {
  1227. [`${t}-options`]: {
  1228. display: "none"
  1229. }
  1230. }
  1231. }),
  1232. // rtl style
  1233. [`&${e.componentCls}-rtl`]: {
  1234. direction: "rtl"
  1235. }
  1236. };
  1237. }, So = (e) => {
  1238. const {
  1239. componentCls: t
  1240. } = e;
  1241. return {
  1242. [`${t}${t}-disabled`]: {
  1243. "&, &:hover": {
  1244. [`${t}-item-link`]: {
  1245. borderColor: e.colorBorder
  1246. }
  1247. },
  1248. "&:focus-visible": {
  1249. [`${t}-item-link`]: {
  1250. borderColor: e.colorBorder
  1251. }
  1252. },
  1253. [`${t}-item, ${t}-item-link`]: {
  1254. backgroundColor: e.colorBgContainerDisabled,
  1255. borderColor: e.colorBorder,
  1256. [`&:hover:not(${t}-item-active)`]: {
  1257. backgroundColor: e.colorBgContainerDisabled,
  1258. borderColor: e.colorBorder,
  1259. a: {
  1260. color: e.colorTextDisabled
  1261. }
  1262. },
  1263. [`&${t}-item-active`]: {
  1264. backgroundColor: e.paginationItemDisabledBgActive
  1265. }
  1266. },
  1267. [`${t}-prev, ${t}-next`]: {
  1268. "&:hover button": {
  1269. backgroundColor: e.colorBgContainerDisabled,
  1270. borderColor: e.colorBorder,
  1271. color: e.colorTextDisabled
  1272. },
  1273. [`${t}-item-link`]: {
  1274. backgroundColor: e.colorBgContainerDisabled,
  1275. borderColor: e.colorBorder
  1276. }
  1277. }
  1278. },
  1279. [t]: {
  1280. [`${t}-prev, ${t}-next`]: {
  1281. "&:hover button": {
  1282. borderColor: e.colorPrimaryHover,
  1283. backgroundColor: e.paginationItemBg
  1284. },
  1285. [`${t}-item-link`]: {
  1286. backgroundColor: e.paginationItemLinkBg,
  1287. borderColor: e.colorBorder
  1288. },
  1289. [`&:hover ${t}-item-link`]: {
  1290. borderColor: e.colorPrimary,
  1291. backgroundColor: e.paginationItemBg,
  1292. color: e.colorPrimary
  1293. },
  1294. [`&${t}-disabled`]: {
  1295. [`${t}-item-link`]: {
  1296. borderColor: e.colorBorder,
  1297. color: e.colorTextDisabled
  1298. }
  1299. }
  1300. },
  1301. [`${t}-item`]: {
  1302. backgroundColor: e.paginationItemBg,
  1303. border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
  1304. [`&:hover:not(${t}-item-active)`]: {
  1305. borderColor: e.colorPrimary,
  1306. backgroundColor: e.paginationItemBg,
  1307. a: {
  1308. color: e.colorPrimary
  1309. }
  1310. },
  1311. "&-active": {
  1312. borderColor: e.colorPrimary
  1313. }
  1314. }
  1315. }
  1316. };
  1317. }, $o = $n("Pagination", (e) => {
  1318. const t = wn(e, {
  1319. paginationItemSize: e.controlHeight,
  1320. paginationFontFamily: e.fontFamily,
  1321. paginationItemBg: e.colorBgContainer,
  1322. paginationItemBgActive: e.colorBgContainer,
  1323. paginationFontWeightActive: e.fontWeightStrong,
  1324. paginationItemSizeSM: e.controlHeightSM,
  1325. paginationItemInputBg: e.colorBgContainer,
  1326. paginationMiniOptionsSizeChangerTop: 0,
  1327. paginationItemDisabledBgActive: e.controlItemBgActiveDisabled,
  1328. paginationItemDisabledColorActive: e.colorTextDisabled,
  1329. paginationItemLinkBg: e.colorBgContainer,
  1330. inputOutlineOffset: "0 0",
  1331. paginationMiniOptionsMarginInlineStart: e.marginXXS / 2,
  1332. paginationMiniQuickJumperInputWidth: e.controlHeightLG * 1.1,
  1333. paginationItemPaddingInline: e.marginXXS * 1.5,
  1334. paginationEllipsisLetterSpacing: e.marginXXS / 2,
  1335. paginationSlashMarginInlineStart: e.marginXXS,
  1336. paginationSlashMarginInlineEnd: e.marginSM,
  1337. paginationEllipsisTextIndent: "0.13em"
  1338. // magic for ui experience
  1339. }, Jl(e));
  1340. return [Co(t), e.wireframe && So(t)];
  1341. });
  1342. var wo = function(e, t) {
  1343. var l = {};
  1344. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  1345. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  1346. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  1347. return l;
  1348. };
  1349. const Io = () => ({
  1350. total: Number,
  1351. defaultCurrent: Number,
  1352. disabled: Ne(),
  1353. current: Number,
  1354. defaultPageSize: Number,
  1355. pageSize: Number,
  1356. hideOnSinglePage: Ne(),
  1357. showSizeChanger: Ne(),
  1358. pageSizeOptions: qe(),
  1359. buildOptionText: se(),
  1360. showQuickJumper: De([Boolean, Object]),
  1361. showTotal: se(),
  1362. size: Ke(),
  1363. simple: Ne(),
  1364. locale: Object,
  1365. prefixCls: String,
  1366. selectPrefixCls: String,
  1367. totalBoundaryShowSizeChanger: Number,
  1368. selectComponentClass: String,
  1369. itemRender: se(),
  1370. role: String,
  1371. responsive: Boolean,
  1372. showLessItems: Ne(),
  1373. onChange: se(),
  1374. onShowSizeChange: se(),
  1375. "onUpdate:current": se(),
  1376. "onUpdate:pageSize": se()
  1377. }), Po = ue({
  1378. compatConfig: {
  1379. MODE: 3
  1380. },
  1381. name: "APagination",
  1382. inheritAttrs: !1,
  1383. props: Io(),
  1384. // emits: ['change', 'showSizeChange', 'update:current', 'update:pageSize'],
  1385. setup(e, t) {
  1386. let {
  1387. slots: l,
  1388. attrs: n
  1389. } = t;
  1390. const {
  1391. prefixCls: o,
  1392. configProvider: r,
  1393. direction: a,
  1394. size: i
  1395. } = Kt("pagination", e), [s, p] = $o(o), c = C(() => r.getPrefixCls("select", e.selectPrefixCls)), f = In(), [x] = Pn("Pagination", xl, xe(e, "locale")), $ = (b) => {
  1396. const m = u("span", {
  1397. class: `${b}-item-ellipsis`
  1398. }, [At("•••")]), v = u("button", {
  1399. class: `${b}-item-link`,
  1400. type: "button",
  1401. tabindex: -1
  1402. }, [a.value === "rtl" ? u(qt, null, null) : u(Yt, null, null)]), h = u("button", {
  1403. class: `${b}-item-link`,
  1404. type: "button",
  1405. tabindex: -1
  1406. }, [a.value === "rtl" ? u(Yt, null, null) : u(qt, null, null)]), y = u("a", {
  1407. rel: "nofollow",
  1408. class: `${b}-item-link`
  1409. }, [u("div", {
  1410. class: `${b}-item-container`
  1411. }, [a.value === "rtl" ? u(Qt, {
  1412. class: `${b}-item-link-icon`
  1413. }, null) : u(Zt, {
  1414. class: `${b}-item-link-icon`
  1415. }, null), m])]), d = u("a", {
  1416. rel: "nofollow",
  1417. class: `${b}-item-link`
  1418. }, [u("div", {
  1419. class: `${b}-item-container`
  1420. }, [a.value === "rtl" ? u(Zt, {
  1421. class: `${b}-item-link-icon`
  1422. }, null) : u(Qt, {
  1423. class: `${b}-item-link-icon`
  1424. }, null), m])]);
  1425. return {
  1426. prevIcon: v,
  1427. nextIcon: h,
  1428. jumpPrevIcon: y,
  1429. jumpNextIcon: d
  1430. };
  1431. };
  1432. return () => {
  1433. var b;
  1434. const {
  1435. itemRender: m = l.itemRender,
  1436. buildOptionText: v = l.buildOptionText,
  1437. selectComponentClass: h,
  1438. responsive: y
  1439. } = e, d = wo(e, ["itemRender", "buildOptionText", "selectComponentClass", "responsive"]), T = i.value === "small" || !!(!((b = f.value) === null || b === void 0) && b.xs && !i.value && y), O = g(g(g(g(g({}, d), $(o.value)), {
  1440. prefixCls: o.value,
  1441. selectPrefixCls: c.value,
  1442. selectComponentClass: h || (T ? so : co),
  1443. locale: x.value,
  1444. buildOptionText: v
  1445. }), n), {
  1446. class: te({
  1447. [`${o.value}-mini`]: T,
  1448. [`${o.value}-rtl`]: a.value === "rtl"
  1449. }, n.class, p.value),
  1450. itemRender: m
  1451. });
  1452. return s(u(vo, O, null));
  1453. };
  1454. }
  1455. }), To = bl(Po), _n = Symbol("TableContextProps"), Ro = (e) => {
  1456. He(_n, e);
  1457. }, Ae = () => Me(_n, {}), Eo = "RC_TABLE_KEY";
  1458. function Dn(e) {
  1459. return e == null ? [] : Array.isArray(e) ? e : [e];
  1460. }
  1461. function Kn(e, t) {
  1462. if (!t && typeof t != "number")
  1463. return e;
  1464. const l = Dn(t);
  1465. let n = e;
  1466. for (let o = 0; o < l.length; o += 1) {
  1467. if (!n)
  1468. return null;
  1469. const r = l[o];
  1470. n = n[r];
  1471. }
  1472. return n;
  1473. }
  1474. function ht(e) {
  1475. const t = [], l = {};
  1476. return e.forEach((n) => {
  1477. const {
  1478. key: o,
  1479. dataIndex: r
  1480. } = n || {};
  1481. let a = o || Dn(r).join("-") || Eo;
  1482. for (; l[a]; )
  1483. a = `${a}_next`;
  1484. l[a] = !0, t.push(a);
  1485. }), t;
  1486. }
  1487. function Oo() {
  1488. const e = {};
  1489. function t(r, a) {
  1490. a && Object.keys(a).forEach((i) => {
  1491. const s = a[i];
  1492. s && typeof s == "object" ? (r[i] = r[i] || {}, t(r[i], s)) : r[i] = s;
  1493. });
  1494. }
  1495. for (var l = arguments.length, n = new Array(l), o = 0; o < l; o++)
  1496. n[o] = arguments[o];
  1497. return n.forEach((r) => {
  1498. t(e, r);
  1499. }), e;
  1500. }
  1501. function Tt(e) {
  1502. return e != null;
  1503. }
  1504. const Fn = Symbol("SlotsContextProps"), Bo = (e) => {
  1505. He(Fn, e);
  1506. }, Mt = () => Me(Fn, C(() => ({}))), An = Symbol("ContextProps"), No = (e) => {
  1507. He(An, e);
  1508. }, zo = () => Me(An, {
  1509. onResizeColumn: () => {
  1510. }
  1511. }), Ze = "RC_TABLE_INTERNAL_COL_DEFINE", Mn = Symbol("HoverContextProps"), ko = (e) => {
  1512. He(Mn, e);
  1513. }, _o = () => Me(Mn, {
  1514. startRow: ce(-1),
  1515. endRow: ce(-1),
  1516. onHover() {
  1517. }
  1518. }), Rt = ce(!1), Do = () => {
  1519. et(() => {
  1520. Rt.value = Rt.value || yl("position", "sticky");
  1521. });
  1522. }, Ko = () => Rt;
  1523. var Fo = function(e, t) {
  1524. var l = {};
  1525. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  1526. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  1527. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  1528. return l;
  1529. };
  1530. function Ao(e, t, l, n) {
  1531. const o = e + t - 1;
  1532. return e <= n && o >= l;
  1533. }
  1534. function Mo(e) {
  1535. return e && typeof e == "object" && !Array.isArray(e) && !ut(e);
  1536. }
  1537. const Ht = ue({
  1538. name: "Cell",
  1539. props: ["prefixCls", "record", "index", "renderIndex", "dataIndex", "customRender", "component", "colSpan", "rowSpan", "fixLeft", "fixRight", "firstFixLeft", "lastFixLeft", "firstFixRight", "lastFixRight", "appendNode", "additionalProps", "ellipsis", "align", "rowType", "isSticky", "column", "cellType", "transformCellText"],
  1540. setup(e, t) {
  1541. let {
  1542. slots: l
  1543. } = t;
  1544. const n = Mt(), {
  1545. onHover: o,
  1546. startRow: r,
  1547. endRow: a
  1548. } = _o(), i = C(() => {
  1549. var m, v, h, y;
  1550. return (h = (m = e.colSpan) !== null && m !== void 0 ? m : (v = e.additionalProps) === null || v === void 0 ? void 0 : v.colSpan) !== null && h !== void 0 ? h : (y = e.additionalProps) === null || y === void 0 ? void 0 : y.colspan;
  1551. }), s = C(() => {
  1552. var m, v, h, y;
  1553. return (h = (m = e.rowSpan) !== null && m !== void 0 ? m : (v = e.additionalProps) === null || v === void 0 ? void 0 : v.rowSpan) !== null && h !== void 0 ? h : (y = e.additionalProps) === null || y === void 0 ? void 0 : y.rowspan;
  1554. }), p = Cl(() => {
  1555. const {
  1556. index: m
  1557. } = e;
  1558. return Ao(m, s.value || 1, r.value, a.value);
  1559. }), c = Ko(), f = (m, v) => {
  1560. var h;
  1561. const {
  1562. record: y,
  1563. index: d,
  1564. additionalProps: T
  1565. } = e;
  1566. y && o(d, d + v - 1), (h = T == null ? void 0 : T.onMouseenter) === null || h === void 0 || h.call(T, m);
  1567. }, x = (m) => {
  1568. var v;
  1569. const {
  1570. record: h,
  1571. additionalProps: y
  1572. } = e;
  1573. h && o(-1, -1), (v = y == null ? void 0 : y.onMouseleave) === null || v === void 0 || v.call(y, m);
  1574. }, $ = (m) => {
  1575. const v = Il(m)[0];
  1576. return ut(v) ? v.type === Ll ? v.children : Array.isArray(v.children) ? $(v.children) : void 0 : v;
  1577. }, b = ce(null);
  1578. return Fe([p, () => e.prefixCls, b], () => {
  1579. const m = Sl(b.value);
  1580. m && (p.value ? $l(m, `${e.prefixCls}-cell-row-hover`) : wl(m, `${e.prefixCls}-cell-row-hover`));
  1581. }), () => {
  1582. var m, v, h, y, d, T;
  1583. const {
  1584. prefixCls: O,
  1585. record: z,
  1586. index: S,
  1587. renderIndex: H,
  1588. dataIndex: R,
  1589. customRender: E,
  1590. component: k = "td",
  1591. fixLeft: N,
  1592. fixRight: M,
  1593. firstFixLeft: J,
  1594. lastFixLeft: Z,
  1595. firstFixRight: ee,
  1596. lastFixRight: fe,
  1597. appendNode: le = (m = l.appendNode) === null || m === void 0 ? void 0 : m.call(l),
  1598. additionalProps: L = {},
  1599. ellipsis: j,
  1600. align: q,
  1601. rowType: w,
  1602. isSticky: K,
  1603. column: B = {},
  1604. cellType: A
  1605. } = e, F = `${O}-cell`;
  1606. let oe, V;
  1607. const ge = (v = l.default) === null || v === void 0 ? void 0 : v.call(l);
  1608. if (Tt(ge) || A === "header")
  1609. V = ge;
  1610. else {
  1611. const ae = Kn(z, R);
  1612. if (V = ae, E) {
  1613. const I = E({
  1614. text: ae,
  1615. value: ae,
  1616. record: z,
  1617. index: S,
  1618. renderIndex: H,
  1619. column: B.__originColumn__
  1620. });
  1621. Mo(I) ? (process.env.NODE_ENV !== "production" && ze(!1, "`columns.customRender` return cell props is deprecated with perf issue, please use `customCell` instead."), V = I.children, oe = I.props) : V = I;
  1622. }
  1623. if (!(Ze in B) && A === "body" && n.value.bodyCell && !(!((h = B.slots) === null || h === void 0) && h.customRender)) {
  1624. const I = Ft(n.value, "bodyCell", {
  1625. text: ae,
  1626. value: ae,
  1627. record: z,
  1628. index: S,
  1629. column: B.__originColumn__
  1630. }, () => {
  1631. const P = V === void 0 ? ae : V;
  1632. return [typeof P == "object" && Pt(P) || typeof P != "object" ? P : null];
  1633. });
  1634. V = Tn(I);
  1635. }
  1636. e.transformCellText && (V = e.transformCellText({
  1637. text: V,
  1638. record: z,
  1639. index: S,
  1640. column: B.__originColumn__
  1641. }));
  1642. }
  1643. typeof V == "object" && !Array.isArray(V) && !ut(V) && (V = null), j && (Z || ee) && (V = u("span", {
  1644. class: `${F}-content`
  1645. }, [V])), Array.isArray(V) && V.length === 1 && (V = V[0]);
  1646. const be = oe || {}, {
  1647. colSpan: Se,
  1648. rowSpan: Te,
  1649. style: Oe,
  1650. class: ye
  1651. } = be, $e = Fo(be, ["colSpan", "rowSpan", "style", "class"]), _ = (y = Se !== void 0 ? Se : i.value) !== null && y !== void 0 ? y : 1, Y = (d = Te !== void 0 ? Te : s.value) !== null && d !== void 0 ? d : 1;
  1652. if (_ === 0 || Y === 0)
  1653. return null;
  1654. const D = {}, W = typeof N == "number" && c.value, X = typeof M == "number" && c.value;
  1655. W && (D.position = "sticky", D.left = `${N}px`), X && (D.position = "sticky", D.right = `${M}px`);
  1656. const re = {};
  1657. q && (re.textAlign = q);
  1658. let U;
  1659. const ne = j === !0 ? {
  1660. showTitle: !0
  1661. } : j;
  1662. ne && (ne.showTitle || w === "header") && (typeof V == "string" || typeof V == "number" ? U = V.toString() : ut(V) && (U = $([V])));
  1663. const he = g(g(g({
  1664. title: U
  1665. }, $e), L), {
  1666. colSpan: _ !== 1 ? _ : null,
  1667. rowSpan: Y !== 1 ? Y : null,
  1668. class: te(F, {
  1669. [`${F}-fix-left`]: W && c.value,
  1670. [`${F}-fix-left-first`]: J && c.value,
  1671. [`${F}-fix-left-last`]: Z && c.value,
  1672. [`${F}-fix-right`]: X && c.value,
  1673. [`${F}-fix-right-first`]: ee && c.value,
  1674. [`${F}-fix-right-last`]: fe && c.value,
  1675. [`${F}-ellipsis`]: j,
  1676. [`${F}-with-append`]: le,
  1677. [`${F}-fix-sticky`]: (W || X) && K && c.value
  1678. }, L.class, ye),
  1679. onMouseenter: (ae) => {
  1680. f(ae, Y);
  1681. },
  1682. onMouseleave: x,
  1683. style: [L.style, re, D, Oe]
  1684. });
  1685. return u(k, G(G({}, he), {}, {
  1686. ref: b
  1687. }), {
  1688. default: () => [le, V, (T = l.dragHandle) === null || T === void 0 ? void 0 : T.call(l)]
  1689. });
  1690. };
  1691. }
  1692. });
  1693. function Hn(e, t, l, n, o) {
  1694. const r = l[e] || {}, a = l[t] || {};
  1695. let i, s;
  1696. r.fixed === "left" ? i = n.left[e] : a.fixed === "right" && (s = n.right[t]);
  1697. let p = !1, c = !1, f = !1, x = !1;
  1698. const $ = l[t + 1], b = l[e - 1];
  1699. return o === "rtl" ? i !== void 0 ? x = !(b && b.fixed === "left") : s !== void 0 && (f = !($ && $.fixed === "right")) : i !== void 0 ? p = !($ && $.fixed === "left") : s !== void 0 && (c = !(b && b.fixed === "right")), {
  1700. fixLeft: i,
  1701. fixRight: s,
  1702. lastFixLeft: p,
  1703. firstFixRight: c,
  1704. lastFixRight: f,
  1705. firstFixLeft: x,
  1706. isSticky: n.isSticky
  1707. };
  1708. }
  1709. const rn = {
  1710. mouse: {
  1711. move: "mousemove",
  1712. stop: "mouseup"
  1713. },
  1714. touch: {
  1715. move: "touchmove",
  1716. stop: "touchend"
  1717. }
  1718. }, an = 50, Ho = ue({
  1719. compatConfig: {
  1720. MODE: 3
  1721. },
  1722. name: "DragHandle",
  1723. props: {
  1724. prefixCls: String,
  1725. width: {
  1726. type: Number,
  1727. required: !0
  1728. },
  1729. minWidth: {
  1730. type: Number,
  1731. default: an
  1732. },
  1733. maxWidth: {
  1734. type: Number,
  1735. default: 1 / 0
  1736. },
  1737. column: {
  1738. type: Object,
  1739. default: void 0
  1740. }
  1741. },
  1742. setup(e) {
  1743. let t = 0, l = {
  1744. remove: () => {
  1745. }
  1746. }, n = {
  1747. remove: () => {
  1748. }
  1749. };
  1750. const o = () => {
  1751. l.remove(), n.remove();
  1752. };
  1753. Wl(() => {
  1754. o();
  1755. }), Ee(() => {
  1756. Re(!isNaN(e.width), "Table", "width must be a number when use resizable");
  1757. });
  1758. const {
  1759. onResizeColumn: r
  1760. } = zo(), a = C(() => typeof e.minWidth == "number" && !isNaN(e.minWidth) ? e.minWidth : an), i = C(() => typeof e.maxWidth == "number" && !isNaN(e.maxWidth) ? e.maxWidth : 1 / 0), s = Vl();
  1761. let p = 0;
  1762. const c = ce(!1);
  1763. let f;
  1764. const x = (d) => {
  1765. let T = 0;
  1766. d.touches ? d.touches.length ? T = d.touches[0].pageX : T = d.changedTouches[0].pageX : T = d.pageX;
  1767. const O = t - T;
  1768. let z = Math.max(p - O, a.value);
  1769. z = Math.min(z, i.value), rt.cancel(f), f = rt(() => {
  1770. r(z, e.column.__originColumn__);
  1771. });
  1772. }, $ = (d) => {
  1773. x(d);
  1774. }, b = (d) => {
  1775. c.value = !1, x(d), o();
  1776. }, m = (d, T) => {
  1777. c.value = !0, o(), p = s.vnode.el.parentNode.getBoundingClientRect().width, !(d instanceof MouseEvent && d.which !== 1) && (d.stopPropagation && d.stopPropagation(), t = d.touches ? d.touches[0].pageX : d.pageX, l = We(document.documentElement, T.move, $), n = We(document.documentElement, T.stop, b));
  1778. }, v = (d) => {
  1779. d.stopPropagation(), d.preventDefault(), m(d, rn.mouse);
  1780. }, h = (d) => {
  1781. d.stopPropagation(), d.preventDefault(), m(d, rn.touch);
  1782. }, y = (d) => {
  1783. d.stopPropagation(), d.preventDefault();
  1784. };
  1785. return () => {
  1786. const {
  1787. prefixCls: d
  1788. } = e, T = {
  1789. [Pl ? "onTouchstartPassive" : "onTouchstart"]: (O) => h(O)
  1790. };
  1791. return u("div", G(G({
  1792. class: `${d}-resize-handle ${c.value ? "dragging" : ""}`,
  1793. onMousedown: v
  1794. }, T), {}, {
  1795. onClick: y
  1796. }), [u("div", {
  1797. class: `${d}-resize-handle-line`
  1798. }, null)]);
  1799. };
  1800. }
  1801. }), jo = ue({
  1802. name: "HeaderRow",
  1803. props: ["cells", "stickyOffsets", "flattenColumns", "rowComponent", "cellComponent", "index", "customHeaderRow"],
  1804. setup(e) {
  1805. const t = Ae();
  1806. return () => {
  1807. const {
  1808. prefixCls: l,
  1809. direction: n
  1810. } = t, {
  1811. cells: o,
  1812. stickyOffsets: r,
  1813. flattenColumns: a,
  1814. rowComponent: i,
  1815. cellComponent: s,
  1816. customHeaderRow: p,
  1817. index: c
  1818. } = e;
  1819. let f;
  1820. p && (f = p(o.map(($) => $.column), c));
  1821. const x = ht(o.map(($) => $.column));
  1822. return u(i, f, {
  1823. default: () => [o.map(($, b) => {
  1824. const {
  1825. column: m
  1826. } = $, v = Hn($.colStart, $.colEnd, a, r, n);
  1827. let h;
  1828. m && m.customHeaderCell && (h = $.column.customHeaderCell(m));
  1829. const y = m;
  1830. return u(Ht, G(G(G({}, $), {}, {
  1831. cellType: "header",
  1832. ellipsis: m.ellipsis,
  1833. align: m.align,
  1834. component: s,
  1835. prefixCls: l,
  1836. key: x[b]
  1837. }, v), {}, {
  1838. additionalProps: h,
  1839. rowType: "header",
  1840. column: m
  1841. }), {
  1842. default: () => m.title,
  1843. dragHandle: () => y.resizable ? u(Ho, {
  1844. prefixCls: l,
  1845. width: y.width,
  1846. minWidth: y.minWidth,
  1847. maxWidth: y.maxWidth,
  1848. column: y
  1849. }, null) : null
  1850. });
  1851. })]
  1852. });
  1853. };
  1854. }
  1855. });
  1856. function Lo(e) {
  1857. const t = [];
  1858. function l(o, r) {
  1859. let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
  1860. t[a] = t[a] || [];
  1861. let i = r;
  1862. return o.filter(Boolean).map((p) => {
  1863. const c = {
  1864. key: p.key,
  1865. class: te(p.className, p.class),
  1866. // children: column.title,
  1867. column: p,
  1868. colStart: i
  1869. };
  1870. let f = 1;
  1871. const x = p.children;
  1872. return x && x.length > 0 && (f = l(x, i, a + 1).reduce(($, b) => $ + b, 0), c.hasSubColumns = !0), "colSpan" in p && ({
  1873. colSpan: f
  1874. } = p), "rowSpan" in p && (c.rowSpan = p.rowSpan), c.colSpan = f, c.colEnd = c.colStart + f - 1, t[a].push(c), i += f, f;
  1875. });
  1876. }
  1877. l(e, 0);
  1878. const n = t.length;
  1879. for (let o = 0; o < n; o += 1)
  1880. t[o].forEach((r) => {
  1881. !("rowSpan" in r) && !r.hasSubColumns && (r.rowSpan = n - o);
  1882. });
  1883. return t;
  1884. }
  1885. const sn = ue({
  1886. name: "TableHeader",
  1887. inheritAttrs: !1,
  1888. props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow"],
  1889. setup(e) {
  1890. const t = Ae(), l = C(() => Lo(e.columns));
  1891. return () => {
  1892. const {
  1893. prefixCls: n,
  1894. getComponent: o
  1895. } = t, {
  1896. stickyOffsets: r,
  1897. flattenColumns: a,
  1898. customHeaderRow: i
  1899. } = e, s = o(["header", "wrapper"], "thead"), p = o(["header", "row"], "tr"), c = o(["header", "cell"], "th");
  1900. return u(s, {
  1901. class: `${n}-thead`
  1902. }, {
  1903. default: () => [l.value.map((f, x) => u(jo, {
  1904. key: x,
  1905. flattenColumns: a,
  1906. cells: f,
  1907. stickyOffsets: r,
  1908. rowComponent: p,
  1909. cellComponent: c,
  1910. customHeaderRow: i,
  1911. index: x
  1912. }, null))]
  1913. });
  1914. };
  1915. }
  1916. }), jn = Symbol("ExpandedRowProps"), Wo = (e) => {
  1917. He(jn, e);
  1918. }, Vo = () => Me(jn, {}), Ln = ue({
  1919. name: "ExpandedRow",
  1920. inheritAttrs: !1,
  1921. props: ["prefixCls", "component", "cellComponent", "expanded", "colSpan", "isEmpty"],
  1922. setup(e, t) {
  1923. let {
  1924. slots: l,
  1925. attrs: n
  1926. } = t;
  1927. const o = Ae(), r = Vo(), {
  1928. fixHeader: a,
  1929. fixColumn: i,
  1930. componentWidth: s,
  1931. horizonScroll: p
  1932. } = r;
  1933. return () => {
  1934. const {
  1935. prefixCls: c,
  1936. component: f,
  1937. cellComponent: x,
  1938. expanded: $,
  1939. colSpan: b,
  1940. isEmpty: m
  1941. } = e;
  1942. return u(f, {
  1943. class: n.class,
  1944. style: {
  1945. display: $ ? null : "none"
  1946. }
  1947. }, {
  1948. default: () => [u(Ht, {
  1949. component: x,
  1950. prefixCls: c,
  1951. colSpan: b
  1952. }, {
  1953. default: () => {
  1954. var v;
  1955. let h = (v = l.default) === null || v === void 0 ? void 0 : v.call(l);
  1956. return (m ? p.value : i.value) && (h = u("div", {
  1957. style: {
  1958. width: `${s.value - (a.value ? o.scrollbarSize : 0)}px`,
  1959. position: "sticky",
  1960. left: 0,
  1961. overflow: "hidden"
  1962. },
  1963. class: `${c}-expanded-row-fixed`
  1964. }, [h])), h;
  1965. }
  1966. })]
  1967. });
  1968. };
  1969. }
  1970. }), Xo = ue({
  1971. name: "MeasureCell",
  1972. props: ["columnKey"],
  1973. setup(e, t) {
  1974. let {
  1975. emit: l
  1976. } = t;
  1977. const n = pe();
  1978. return et(() => {
  1979. n.value && l("columnResize", e.columnKey, n.value.offsetWidth);
  1980. }), () => u(Rn, {
  1981. onResize: (o) => {
  1982. let {
  1983. offsetWidth: r
  1984. } = o;
  1985. l("columnResize", e.columnKey, r);
  1986. }
  1987. }, {
  1988. default: () => [u("td", {
  1989. ref: n,
  1990. style: {
  1991. padding: 0,
  1992. border: 0,
  1993. height: 0
  1994. }
  1995. }, [u("div", {
  1996. style: {
  1997. height: 0,
  1998. overflow: "hidden"
  1999. }
  2000. }, [At(" ")])])]
  2001. });
  2002. }
  2003. }), Wn = Symbol("BodyContextProps"), Uo = (e) => {
  2004. He(Wn, e);
  2005. }, Vn = () => Me(Wn, {}), Go = ue({
  2006. name: "BodyRow",
  2007. inheritAttrs: !1,
  2008. props: ["record", "index", "renderIndex", "recordKey", "expandedKeys", "rowComponent", "cellComponent", "customRow", "rowExpandable", "indent", "rowKey", "getRowKey", "childrenColumnName"],
  2009. setup(e, t) {
  2010. let {
  2011. attrs: l
  2012. } = t;
  2013. const n = Ae(), o = Vn(), r = ce(!1), a = C(() => e.expandedKeys && e.expandedKeys.has(e.recordKey));
  2014. Ee(() => {
  2015. a.value && (r.value = !0);
  2016. });
  2017. const i = C(() => o.expandableType === "row" && (!e.rowExpandable || e.rowExpandable(e.record))), s = C(() => o.expandableType === "nest"), p = C(() => e.childrenColumnName && e.record && e.record[e.childrenColumnName]), c = C(() => i.value || s.value), f = (v, h) => {
  2018. o.onTriggerExpand(v, h);
  2019. }, x = C(() => {
  2020. var v;
  2021. return ((v = e.customRow) === null || v === void 0 ? void 0 : v.call(e, e.record, e.index)) || {};
  2022. }), $ = function(v) {
  2023. var h, y;
  2024. o.expandRowByClick && c.value && f(e.record, v);
  2025. for (var d = arguments.length, T = new Array(d > 1 ? d - 1 : 0), O = 1; O < d; O++)
  2026. T[O - 1] = arguments[O];
  2027. (y = (h = x.value) === null || h === void 0 ? void 0 : h.onClick) === null || y === void 0 || y.call(h, v, ...T);
  2028. }, b = C(() => {
  2029. const {
  2030. record: v,
  2031. index: h,
  2032. indent: y
  2033. } = e, {
  2034. rowClassName: d
  2035. } = o;
  2036. return typeof d == "string" ? d : typeof d == "function" ? d(v, h, y) : "";
  2037. }), m = C(() => ht(o.flattenColumns));
  2038. return () => {
  2039. const {
  2040. class: v,
  2041. style: h
  2042. } = l, {
  2043. record: y,
  2044. index: d,
  2045. rowKey: T,
  2046. indent: O = 0,
  2047. rowComponent: z,
  2048. cellComponent: S
  2049. } = e, {
  2050. prefixCls: H,
  2051. fixedInfoList: R,
  2052. transformCellText: E
  2053. } = n, {
  2054. flattenColumns: k,
  2055. expandedRowClassName: N,
  2056. indentSize: M,
  2057. expandIcon: J,
  2058. expandedRowRender: Z,
  2059. expandIconColumnIndex: ee
  2060. } = o, fe = u(z, G(G({}, x.value), {}, {
  2061. "data-row-key": T,
  2062. class: te(v, `${H}-row`, `${H}-row-level-${O}`, b.value, x.value.class),
  2063. style: [h, x.value.style],
  2064. onClick: $
  2065. }), {
  2066. default: () => [k.map((L, j) => {
  2067. const {
  2068. customRender: q,
  2069. dataIndex: w,
  2070. className: K
  2071. } = L, B = m[j], A = R[j];
  2072. let F;
  2073. L.customCell && (F = L.customCell(y, d, L));
  2074. const oe = j === (ee || 0) && s.value ? u(Xe, null, [u("span", {
  2075. style: {
  2076. paddingLeft: `${M * O}px`
  2077. },
  2078. class: `${H}-row-indent indent-level-${O}`
  2079. }, null), J({
  2080. prefixCls: H,
  2081. expanded: a.value,
  2082. expandable: p.value,
  2083. record: y,
  2084. onExpand: f
  2085. })]) : null;
  2086. return u(Ht, G(G({
  2087. cellType: "body",
  2088. class: K,
  2089. ellipsis: L.ellipsis,
  2090. align: L.align,
  2091. component: S,
  2092. prefixCls: H,
  2093. key: B,
  2094. record: y,
  2095. index: d,
  2096. renderIndex: e.renderIndex,
  2097. dataIndex: w,
  2098. customRender: q
  2099. }, A), {}, {
  2100. additionalProps: F,
  2101. column: L,
  2102. transformCellText: E,
  2103. appendNode: oe
  2104. }), null);
  2105. })]
  2106. });
  2107. let le;
  2108. if (i.value && (r.value || a.value)) {
  2109. const L = Z({
  2110. record: y,
  2111. index: d,
  2112. indent: O + 1,
  2113. expanded: a.value
  2114. }), j = N && N(y, d, O);
  2115. le = u(Ln, {
  2116. expanded: a.value,
  2117. class: te(`${H}-expanded-row`, `${H}-expanded-row-level-${O + 1}`, j),
  2118. prefixCls: H,
  2119. component: z,
  2120. cellComponent: S,
  2121. colSpan: k.length,
  2122. isEmpty: !1
  2123. }, {
  2124. default: () => [L]
  2125. });
  2126. }
  2127. return u(Xe, null, [fe, le]);
  2128. };
  2129. }
  2130. });
  2131. function Xn(e, t, l, n, o, r) {
  2132. const a = [];
  2133. a.push({
  2134. record: e,
  2135. indent: t,
  2136. index: r
  2137. });
  2138. const i = o(e), s = n == null ? void 0 : n.has(i);
  2139. if (e && Array.isArray(e[l]) && s)
  2140. for (let p = 0; p < e[l].length; p += 1) {
  2141. const c = Xn(e[l][p], t + 1, l, n, o, p);
  2142. a.push(...c);
  2143. }
  2144. return a;
  2145. }
  2146. function Jo(e, t, l, n) {
  2147. return C(() => {
  2148. const r = t.value, a = l.value, i = e.value;
  2149. if (a != null && a.size) {
  2150. const s = [];
  2151. for (let p = 0; p < (i == null ? void 0 : i.length); p += 1) {
  2152. const c = i[p];
  2153. s.push(...Xn(c, 0, r, a, n.value, p));
  2154. }
  2155. return s;
  2156. }
  2157. return i == null ? void 0 : i.map((s, p) => ({
  2158. record: s,
  2159. indent: 0,
  2160. index: p
  2161. }));
  2162. });
  2163. }
  2164. const Un = Symbol("ResizeContextProps"), qo = (e) => {
  2165. He(Un, e);
  2166. }, Yo = () => Me(Un, {
  2167. onColumnResize: () => {
  2168. }
  2169. }), Qo = ue({
  2170. name: "TableBody",
  2171. props: ["data", "getRowKey", "measureColumnWidth", "expandedKeys", "customRow", "rowExpandable", "childrenColumnName"],
  2172. setup(e, t) {
  2173. let {
  2174. slots: l
  2175. } = t;
  2176. const n = Yo(), o = Ae(), r = Vn(), a = Jo(xe(e, "data"), xe(e, "childrenColumnName"), xe(e, "expandedKeys"), xe(e, "getRowKey")), i = ce(-1), s = ce(-1);
  2177. let p;
  2178. return ko({
  2179. startRow: i,
  2180. endRow: s,
  2181. onHover: (c, f) => {
  2182. clearTimeout(p), p = setTimeout(() => {
  2183. i.value = c, s.value = f;
  2184. }, 100);
  2185. }
  2186. }), () => {
  2187. var c;
  2188. const {
  2189. data: f,
  2190. getRowKey: x,
  2191. measureColumnWidth: $,
  2192. expandedKeys: b,
  2193. customRow: m,
  2194. rowExpandable: v,
  2195. childrenColumnName: h
  2196. } = e, {
  2197. onColumnResize: y
  2198. } = n, {
  2199. prefixCls: d,
  2200. getComponent: T
  2201. } = o, {
  2202. flattenColumns: O
  2203. } = r, z = T(["body", "wrapper"], "tbody"), S = T(["body", "row"], "tr"), H = T(["body", "cell"], "td");
  2204. let R;
  2205. f.length ? R = a.value.map((k, N) => {
  2206. const {
  2207. record: M,
  2208. indent: J,
  2209. index: Z
  2210. } = k, ee = x(M, N);
  2211. return u(Go, {
  2212. key: ee,
  2213. rowKey: ee,
  2214. record: M,
  2215. recordKey: ee,
  2216. index: N,
  2217. renderIndex: Z,
  2218. rowComponent: S,
  2219. cellComponent: H,
  2220. expandedKeys: b,
  2221. customRow: m,
  2222. getRowKey: x,
  2223. rowExpandable: v,
  2224. childrenColumnName: h,
  2225. indent: J
  2226. }, null);
  2227. }) : R = u(Ln, {
  2228. expanded: !0,
  2229. class: `${d}-placeholder`,
  2230. prefixCls: d,
  2231. component: S,
  2232. cellComponent: H,
  2233. colSpan: O.length,
  2234. isEmpty: !0
  2235. }, {
  2236. default: () => [(c = l.emptyNode) === null || c === void 0 ? void 0 : c.call(l)]
  2237. });
  2238. const E = ht(O);
  2239. return u(z, {
  2240. class: `${d}-tbody`
  2241. }, {
  2242. default: () => [$ && u("tr", {
  2243. "aria-hidden": "true",
  2244. class: `${d}-measure-row`,
  2245. style: {
  2246. height: 0,
  2247. fontSize: 0
  2248. }
  2249. }, [E.map((k) => u(Xo, {
  2250. key: k,
  2251. columnKey: k,
  2252. onColumnResize: y
  2253. }, null))]), R]
  2254. });
  2255. };
  2256. }
  2257. }), _e = {};
  2258. var Zo = function(e, t) {
  2259. var l = {};
  2260. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  2261. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  2262. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  2263. return l;
  2264. };
  2265. function Et(e) {
  2266. return e.reduce((t, l) => {
  2267. const {
  2268. fixed: n
  2269. } = l, o = n === !0 ? "left" : n, r = l.children;
  2270. return r && r.length > 0 ? [...t, ...Et(r).map((a) => g({
  2271. fixed: o
  2272. }, a))] : [...t, g(g({}, l), {
  2273. fixed: o
  2274. })];
  2275. }, []);
  2276. }
  2277. function er(e) {
  2278. let t = !0;
  2279. for (let n = 0; n < e.length; n += 1) {
  2280. const o = e[n];
  2281. if (t && o.fixed !== "left")
  2282. t = !1;
  2283. else if (!t && o.fixed === "left") {
  2284. ze(!1, `Index ${n - 1} of \`columns\` missing \`fixed='left'\` prop.`);
  2285. break;
  2286. }
  2287. }
  2288. let l = !0;
  2289. for (let n = e.length - 1; n >= 0; n -= 1) {
  2290. const o = e[n];
  2291. if (l && o.fixed !== "right")
  2292. l = !1;
  2293. else if (!l && o.fixed === "right") {
  2294. ze(!1, `Index ${n + 1} of \`columns\` missing \`fixed='right'\` prop.`);
  2295. break;
  2296. }
  2297. }
  2298. }
  2299. function tr(e) {
  2300. return e.map((t) => {
  2301. const {
  2302. fixed: l
  2303. } = t, n = Zo(t, ["fixed"]);
  2304. let o = l;
  2305. return l === "left" ? o = "right" : l === "right" && (o = "left"), g({
  2306. fixed: o
  2307. }, n);
  2308. });
  2309. }
  2310. function nr(e, t) {
  2311. let {
  2312. prefixCls: l,
  2313. columns: n,
  2314. // children,
  2315. expandable: o,
  2316. expandedKeys: r,
  2317. getRowKey: a,
  2318. onTriggerExpand: i,
  2319. expandIcon: s,
  2320. rowExpandable: p,
  2321. expandIconColumnIndex: c,
  2322. direction: f,
  2323. expandRowByClick: x,
  2324. expandColumnWidth: $,
  2325. expandFixed: b
  2326. } = e;
  2327. const m = Mt(), v = C(() => {
  2328. if (o.value) {
  2329. let d = n.value.slice();
  2330. if (process.env.NODE_ENV !== "production" && c.value >= 0 && ze(!1, "`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."), !d.includes(_e)) {
  2331. const M = c.value || 0;
  2332. M >= 0 && d.splice(M, 0, _e);
  2333. }
  2334. process.env.NODE_ENV !== "production" && d.filter((M) => M === _e).length > 1 && ze(!1, "There exist more than one `EXPAND_COLUMN` in `columns`.");
  2335. const T = d.indexOf(_e);
  2336. d = d.filter((M, J) => M !== _e || J === T);
  2337. const O = n.value[T];
  2338. let z;
  2339. (b.value === "left" || b.value) && !c.value ? z = "left" : (b.value === "right" || b.value) && c.value === n.value.length ? z = "right" : z = O ? O.fixed : null;
  2340. const S = r.value, H = p.value, R = s.value, E = l.value, k = x.value, N = {
  2341. [Ze]: {
  2342. class: `${l.value}-expand-icon-col`,
  2343. columnType: "EXPAND_COLUMN"
  2344. },
  2345. title: Ft(m.value, "expandColumnTitle", {}, () => [""]),
  2346. fixed: z,
  2347. class: `${l.value}-row-expand-icon-cell`,
  2348. width: $.value,
  2349. customRender: (M) => {
  2350. let {
  2351. record: J,
  2352. index: Z
  2353. } = M;
  2354. const ee = a.value(J, Z), fe = S.has(ee), le = H ? H(J) : !0, L = R({
  2355. prefixCls: E,
  2356. expanded: fe,
  2357. expandable: le,
  2358. record: J,
  2359. onExpand: i
  2360. });
  2361. return k ? u("span", {
  2362. onClick: (j) => j.stopPropagation()
  2363. }, [L]) : L;
  2364. }
  2365. };
  2366. return d.map((M) => M === _e ? N : M);
  2367. }
  2368. return process.env.NODE_ENV !== "production" && n.value.includes(_e) && ze(!1, "`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."), n.value.filter((d) => d !== _e);
  2369. }), h = C(() => {
  2370. let d = v.value;
  2371. return t.value && (d = t.value(d)), d.length || (d = [{
  2372. customRender: () => null
  2373. }]), d;
  2374. }), y = C(() => f.value === "rtl" ? tr(Et(h.value)) : Et(h.value));
  2375. return process.env.NODE_ENV !== "production" && Ee(() => {
  2376. setTimeout(() => {
  2377. er(y.value);
  2378. });
  2379. }), [h, y];
  2380. }
  2381. function Gn(e) {
  2382. const t = ce(e);
  2383. let l;
  2384. const n = ce([]);
  2385. function o(r) {
  2386. n.value.push(r), rt.cancel(l), l = rt(() => {
  2387. const a = n.value;
  2388. n.value = [], a.forEach((i) => {
  2389. t.value = i(t.value);
  2390. });
  2391. });
  2392. }
  2393. return tt(() => {
  2394. rt.cancel(l);
  2395. }), [t, o];
  2396. }
  2397. function lr(e) {
  2398. const t = pe(null), l = pe();
  2399. function n() {
  2400. clearTimeout(l.value);
  2401. }
  2402. function o(a) {
  2403. t.value = a, n(), l.value = setTimeout(() => {
  2404. t.value = null, l.value = void 0;
  2405. }, 100);
  2406. }
  2407. function r() {
  2408. return t.value;
  2409. }
  2410. return tt(() => {
  2411. n();
  2412. }), [o, r];
  2413. }
  2414. function or(e, t, l) {
  2415. return C(() => {
  2416. const o = [], r = [];
  2417. let a = 0, i = 0;
  2418. const s = e.value, p = t.value, c = l.value;
  2419. for (let f = 0; f < p; f += 1)
  2420. if (c === "rtl") {
  2421. r[f] = i, i += s[f] || 0;
  2422. const x = p - f - 1;
  2423. o[x] = a, a += s[x] || 0;
  2424. } else {
  2425. o[f] = a, a += s[f] || 0;
  2426. const x = p - f - 1;
  2427. r[x] = i, i += s[x] || 0;
  2428. }
  2429. return {
  2430. left: o,
  2431. right: r
  2432. };
  2433. });
  2434. }
  2435. var rr = function(e, t) {
  2436. var l = {};
  2437. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  2438. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  2439. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  2440. return l;
  2441. };
  2442. function Jn(e) {
  2443. let {
  2444. colWidths: t,
  2445. columns: l,
  2446. columCount: n
  2447. } = e;
  2448. const o = [], r = n || l.length;
  2449. let a = !1;
  2450. for (let i = r - 1; i >= 0; i -= 1) {
  2451. const s = t[i], p = l && l[i], c = p && p[Ze];
  2452. if (s || c || a) {
  2453. const f = c || {}, {
  2454. columnType: x
  2455. } = f, $ = rr(f, ["columnType"]);
  2456. o.unshift(u("col", G({
  2457. key: i,
  2458. style: {
  2459. width: typeof s == "number" ? `${s}px` : s
  2460. }
  2461. }, $), null)), a = !0;
  2462. }
  2463. }
  2464. return u("colgroup", null, [o]);
  2465. }
  2466. function Ot(e, t) {
  2467. let {
  2468. slots: l
  2469. } = t;
  2470. var n;
  2471. return u("div", null, [(n = l.default) === null || n === void 0 ? void 0 : n.call(l)]);
  2472. }
  2473. Ot.displayName = "Panel";
  2474. let ar = 0;
  2475. const ir = ue({
  2476. name: "TableSummary",
  2477. props: ["fixed"],
  2478. setup(e, t) {
  2479. let {
  2480. slots: l
  2481. } = t;
  2482. const n = Ae(), o = `table-summary-uni-key-${++ar}`, r = C(() => e.fixed === "" || e.fixed);
  2483. return Ee(() => {
  2484. n.summaryCollect(o, r.value);
  2485. }), tt(() => {
  2486. n.summaryCollect(o, !1);
  2487. }), () => {
  2488. var a;
  2489. return (a = l.default) === null || a === void 0 ? void 0 : a.call(l);
  2490. };
  2491. }
  2492. }), qn = Symbol("SummaryContextProps"), sr = (e) => {
  2493. He(qn, e);
  2494. }, ma = () => Me(qn, {}), ct = ue({
  2495. name: "TableFooter",
  2496. inheritAttrs: !1,
  2497. props: ["stickyOffsets", "flattenColumns"],
  2498. setup(e, t) {
  2499. let {
  2500. slots: l
  2501. } = t;
  2502. const n = Ae();
  2503. return sr(Qe({
  2504. stickyOffsets: xe(e, "stickyOffsets"),
  2505. flattenColumns: xe(e, "flattenColumns"),
  2506. scrollColumnIndex: C(() => {
  2507. const o = e.flattenColumns.length - 1, r = e.flattenColumns[o];
  2508. return r != null && r.scrollbar ? o : null;
  2509. })
  2510. })), () => {
  2511. var o;
  2512. const {
  2513. prefixCls: r
  2514. } = n;
  2515. return u("tfoot", {
  2516. class: `${r}-summary`
  2517. }, [(o = l.default) === null || o === void 0 ? void 0 : o.call(l)]);
  2518. };
  2519. }
  2520. }), va = ir;
  2521. function cr(e) {
  2522. let {
  2523. prefixCls: t,
  2524. record: l,
  2525. onExpand: n,
  2526. expanded: o,
  2527. expandable: r
  2528. } = e;
  2529. const a = `${t}-row-expand-icon`;
  2530. if (!r)
  2531. return u("span", {
  2532. class: [a, `${t}-row-spaced`]
  2533. }, null);
  2534. const i = (s) => {
  2535. n(l, s), s.stopPropagation();
  2536. };
  2537. return u("span", {
  2538. class: {
  2539. [a]: !0,
  2540. [`${t}-row-expanded`]: o,
  2541. [`${t}-row-collapsed`]: !o
  2542. },
  2543. onClick: i
  2544. }, null);
  2545. }
  2546. function ur(e, t, l) {
  2547. const n = [];
  2548. function o(r) {
  2549. (r || []).forEach((a, i) => {
  2550. n.push(t(a, i)), o(a[l]);
  2551. });
  2552. }
  2553. return o(e), n;
  2554. }
  2555. const dr = ue({
  2556. name: "StickyScrollBar",
  2557. inheritAttrs: !1,
  2558. props: ["offsetScroll", "container", "scrollBodyRef", "scrollBodySizeInfo"],
  2559. emits: ["scroll"],
  2560. setup(e, t) {
  2561. let {
  2562. emit: l,
  2563. expose: n
  2564. } = t;
  2565. const o = Ae(), r = ce(0), a = ce(0), i = ce(0);
  2566. Ee(() => {
  2567. r.value = e.scrollBodySizeInfo.scrollWidth || 0, a.value = e.scrollBodySizeInfo.clientWidth || 0, i.value = r.value && a.value * (a.value / r.value);
  2568. }, {
  2569. flush: "post"
  2570. });
  2571. const s = ce(), [p, c] = Gn({
  2572. scrollLeft: 0,
  2573. isHiddenScrollBar: !0
  2574. }), f = pe({
  2575. delta: 0,
  2576. x: 0
  2577. }), x = ce(!1), $ = () => {
  2578. x.value = !1;
  2579. }, b = (S) => {
  2580. f.value = {
  2581. delta: S.pageX - p.value.scrollLeft,
  2582. x: 0
  2583. }, x.value = !0, S.preventDefault();
  2584. }, m = (S) => {
  2585. const {
  2586. buttons: H
  2587. } = S || (window == null ? void 0 : window.event);
  2588. if (!x.value || H === 0) {
  2589. x.value && (x.value = !1);
  2590. return;
  2591. }
  2592. let R = f.value.x + S.pageX - f.value.x - f.value.delta;
  2593. R <= 0 && (R = 0), R + i.value >= a.value && (R = a.value - i.value), l("scroll", {
  2594. scrollLeft: R / a.value * (r.value + 2)
  2595. }), f.value.x = S.pageX;
  2596. }, v = () => {
  2597. if (!e.scrollBodyRef.value)
  2598. return;
  2599. const S = on(e.scrollBodyRef.value).top, H = S + e.scrollBodyRef.value.offsetHeight, R = e.container === window ? document.documentElement.scrollTop + window.innerHeight : on(e.container).top + e.container.clientHeight;
  2600. H - en() <= R || S >= R - e.offsetScroll ? c((E) => g(g({}, E), {
  2601. isHiddenScrollBar: !0
  2602. })) : c((E) => g(g({}, E), {
  2603. isHiddenScrollBar: !1
  2604. }));
  2605. };
  2606. n({
  2607. setScrollLeft: (S) => {
  2608. c((H) => g(g({}, H), {
  2609. scrollLeft: S / r.value * a.value || 0
  2610. }));
  2611. }
  2612. });
  2613. let y = null, d = null, T = null, O = null;
  2614. et(() => {
  2615. y = We(document.body, "mouseup", $, !1), d = We(document.body, "mousemove", m, !1), T = We(window, "resize", v, !1);
  2616. }), Xl(() => {
  2617. at(() => {
  2618. v();
  2619. });
  2620. }), et(() => {
  2621. setTimeout(() => {
  2622. Fe([i, x], () => {
  2623. v();
  2624. }, {
  2625. immediate: !0,
  2626. flush: "post"
  2627. });
  2628. });
  2629. }), Fe(() => e.container, () => {
  2630. O == null || O.remove(), O = We(e.container, "scroll", v, !1);
  2631. }, {
  2632. immediate: !0,
  2633. flush: "post"
  2634. }), tt(() => {
  2635. y == null || y.remove(), d == null || d.remove(), O == null || O.remove(), T == null || T.remove();
  2636. }), Fe(() => g({}, p.value), (S, H) => {
  2637. S.isHiddenScrollBar !== (H == null ? void 0 : H.isHiddenScrollBar) && !S.isHiddenScrollBar && c((R) => {
  2638. const E = e.scrollBodyRef.value;
  2639. return E ? g(g({}, R), {
  2640. scrollLeft: E.scrollLeft / E.scrollWidth * E.clientWidth
  2641. }) : R;
  2642. });
  2643. }, {
  2644. immediate: !0
  2645. });
  2646. const z = en();
  2647. return () => {
  2648. if (r.value <= a.value || !i.value || p.value.isHiddenScrollBar)
  2649. return null;
  2650. const {
  2651. prefixCls: S
  2652. } = o;
  2653. return u("div", {
  2654. style: {
  2655. height: `${z}px`,
  2656. width: `${a.value}px`,
  2657. bottom: `${e.offsetScroll}px`
  2658. },
  2659. class: `${S}-sticky-scroll`
  2660. }, [u("div", {
  2661. onMousedown: b,
  2662. ref: s,
  2663. class: te(`${S}-sticky-scroll-bar`, {
  2664. [`${S}-sticky-scroll-bar-active`]: x.value
  2665. }),
  2666. style: {
  2667. width: `${i.value}px`,
  2668. transform: `translate3d(${p.value.scrollLeft}px, 0, 0)`
  2669. }
  2670. }, null)]);
  2671. };
  2672. }
  2673. }), cn = Tl() ? window : null;
  2674. function fr(e, t) {
  2675. return C(() => {
  2676. const {
  2677. offsetHeader: l = 0,
  2678. offsetSummary: n = 0,
  2679. offsetScroll: o = 0,
  2680. getContainer: r = () => cn
  2681. } = typeof e.value == "object" ? e.value : {}, a = r() || cn, i = !!e.value;
  2682. return {
  2683. isSticky: i,
  2684. stickyClassName: i ? `${t.value}-sticky-holder` : "",
  2685. offsetHeader: l,
  2686. offsetSummary: n,
  2687. offsetScroll: o,
  2688. container: a
  2689. };
  2690. });
  2691. }
  2692. function pr(e, t) {
  2693. return C(() => {
  2694. const l = [], n = e.value, o = t.value;
  2695. for (let r = 0; r < o; r += 1) {
  2696. const a = n[r];
  2697. if (a !== void 0)
  2698. l[r] = a;
  2699. else
  2700. return null;
  2701. }
  2702. return l;
  2703. });
  2704. }
  2705. const un = ue({
  2706. name: "FixedHolder",
  2707. inheritAttrs: !1,
  2708. props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow", "noData", "maxContentScroll", "colWidths", "columCount", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName"],
  2709. emits: ["scroll"],
  2710. setup(e, t) {
  2711. let {
  2712. attrs: l,
  2713. slots: n,
  2714. emit: o
  2715. } = t;
  2716. const r = Ae(), a = C(() => r.isSticky && !e.fixHeader ? 0 : r.scrollbarSize), i = pe(), s = (m) => {
  2717. const {
  2718. currentTarget: v,
  2719. deltaX: h
  2720. } = m;
  2721. h && (o("scroll", {
  2722. currentTarget: v,
  2723. scrollLeft: v.scrollLeft + h
  2724. }), m.preventDefault());
  2725. }, p = pe();
  2726. et(() => {
  2727. at(() => {
  2728. p.value = We(i.value, "wheel", s);
  2729. });
  2730. }), tt(() => {
  2731. var m;
  2732. (m = p.value) === null || m === void 0 || m.remove();
  2733. });
  2734. const c = C(() => e.flattenColumns.every((m) => m.width && m.width !== 0 && m.width !== "0px")), f = pe([]), x = pe([]);
  2735. Ee(() => {
  2736. const m = e.flattenColumns[e.flattenColumns.length - 1], v = {
  2737. fixed: m ? m.fixed : null,
  2738. scrollbar: !0,
  2739. customHeaderCell: () => ({
  2740. class: `${r.prefixCls}-cell-scrollbar`
  2741. })
  2742. };
  2743. f.value = a.value ? [...e.columns, v] : e.columns, x.value = a.value ? [...e.flattenColumns, v] : e.flattenColumns;
  2744. });
  2745. const $ = C(() => {
  2746. const {
  2747. stickyOffsets: m,
  2748. direction: v
  2749. } = e, {
  2750. right: h,
  2751. left: y
  2752. } = m;
  2753. return g(g({}, m), {
  2754. left: v === "rtl" ? [...y.map((d) => d + a.value), 0] : y,
  2755. right: v === "rtl" ? h : [...h.map((d) => d + a.value), 0],
  2756. isSticky: r.isSticky
  2757. });
  2758. }), b = pr(xe(e, "colWidths"), xe(e, "columCount"));
  2759. return () => {
  2760. var m;
  2761. const {
  2762. noData: v,
  2763. columCount: h,
  2764. stickyTopOffset: y,
  2765. stickyBottomOffset: d,
  2766. stickyClassName: T,
  2767. maxContentScroll: O
  2768. } = e, {
  2769. isSticky: z
  2770. } = r;
  2771. return u("div", {
  2772. style: g({
  2773. overflow: "hidden"
  2774. }, z ? {
  2775. top: `${y}px`,
  2776. bottom: `${d}px`
  2777. } : {}),
  2778. ref: i,
  2779. class: te(l.class, {
  2780. [T]: !!T
  2781. })
  2782. }, [u("table", {
  2783. style: {
  2784. tableLayout: "fixed",
  2785. visibility: v || b.value ? null : "hidden"
  2786. }
  2787. }, [(!v || !O || c.value) && u(Jn, {
  2788. colWidths: b.value ? [...b.value, a.value] : [],
  2789. columCount: h + 1,
  2790. columns: x.value
  2791. }, null), (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g(g({}, e), {
  2792. stickyOffsets: $.value,
  2793. columns: f.value,
  2794. flattenColumns: x.value
  2795. }))])]);
  2796. };
  2797. }
  2798. });
  2799. function dn(e) {
  2800. for (var t = arguments.length, l = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
  2801. l[n - 1] = arguments[n];
  2802. return Qe(io(l.map((o) => [o, xe(e, o)])));
  2803. }
  2804. const mr = [], vr = {}, Bt = "rc-table-internal-hook", hr = ue({
  2805. name: "VcTable",
  2806. inheritAttrs: !1,
  2807. props: ["prefixCls", "data", "columns", "rowKey", "tableLayout", "scroll", "rowClassName", "title", "footer", "id", "showHeader", "components", "customRow", "customHeaderRow", "direction", "expandFixed", "expandColumnWidth", "expandedRowKeys", "defaultExpandedRowKeys", "expandedRowRender", "expandRowByClick", "expandIcon", "onExpand", "onExpandedRowsChange", "onUpdate:expandedRowKeys", "defaultExpandAllRows", "indentSize", "expandIconColumnIndex", "expandedRowClassName", "childrenColumnName", "rowExpandable", "sticky", "transformColumns", "internalHooks", "internalRefs", "canExpandable", "onUpdateInternalRefs", "transformCellText"],
  2808. emits: ["expand", "expandedRowsChange", "updateInternalRefs", "update:expandedRowKeys"],
  2809. setup(e, t) {
  2810. let {
  2811. attrs: l,
  2812. slots: n,
  2813. emit: o
  2814. } = t;
  2815. const r = C(() => e.data || mr), a = C(() => !!r.value.length), i = C(() => Oo(e.components, {})), s = (I, P) => Kn(i.value, I) || P, p = C(() => {
  2816. const I = e.rowKey;
  2817. return typeof I == "function" ? I : (P) => {
  2818. const Q = P && P[I];
  2819. return process.env.NODE_ENV !== "production" && ze(Q !== void 0, "Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."), Q;
  2820. };
  2821. }), c = C(() => e.expandIcon || cr), f = C(() => e.childrenColumnName || "children"), x = C(() => e.expandedRowRender ? "row" : e.canExpandable || r.value.some((I) => I && typeof I == "object" && I[f.value]) ? "nest" : !1), $ = ce([]);
  2822. Ee(() => {
  2823. e.defaultExpandedRowKeys && ($.value = e.defaultExpandedRowKeys), e.defaultExpandAllRows && ($.value = ur(r.value, p.value, f.value));
  2824. })();
  2825. const m = C(() => new Set(e.expandedRowKeys || $.value || [])), v = (I) => {
  2826. const P = p.value(I, r.value.indexOf(I));
  2827. let Q;
  2828. const de = m.value.has(P);
  2829. de ? (m.value.delete(P), Q = [...m.value]) : Q = [...m.value, P], $.value = Q, o("expand", !de, I), o("update:expandedRowKeys", Q), o("expandedRowsChange", Q);
  2830. };
  2831. process.env.NODE_ENV !== "production" && e.expandedRowRender && r.value.some((I) => Array.isArray(I == null ? void 0 : I[f.value])) && ze(!1, "`expandedRowRender` should not use with nested Table");
  2832. const h = pe(0), [y, d] = nr(g(g({}, $t(e)), {
  2833. // children,
  2834. expandable: C(() => !!e.expandedRowRender),
  2835. expandedKeys: m,
  2836. getRowKey: p,
  2837. onTriggerExpand: v,
  2838. expandIcon: c
  2839. }), C(() => e.internalHooks === Bt ? e.transformColumns : null)), T = C(() => ({
  2840. columns: y.value,
  2841. flattenColumns: d.value
  2842. })), O = pe(), z = pe(), S = pe(), H = pe({
  2843. scrollWidth: 0,
  2844. clientWidth: 0
  2845. }), R = pe(), [E, k] = Ve(!1), [N, M] = Ve(!1), [J, Z] = Gn(/* @__PURE__ */ new Map()), ee = C(() => ht(d.value)), fe = C(() => ee.value.map((I) => J.value.get(I))), le = C(() => d.value.length), L = or(fe, le, xe(e, "direction")), j = C(() => e.scroll && Tt(e.scroll.y)), q = C(() => e.scroll && Tt(e.scroll.x) || !!e.expandFixed), w = C(() => q.value && d.value.some((I) => {
  2846. let {
  2847. fixed: P
  2848. } = I;
  2849. return P;
  2850. })), K = pe(), B = fr(xe(e, "sticky"), xe(e, "prefixCls")), A = Qe({}), F = C(() => {
  2851. const I = Object.values(A)[0];
  2852. return (j.value || B.value.isSticky) && I;
  2853. }), oe = (I, P) => {
  2854. P ? A[I] = P : delete A[I];
  2855. }, V = pe({}), ge = pe({}), be = pe({});
  2856. Ee(() => {
  2857. j.value && (ge.value = {
  2858. overflowY: "scroll",
  2859. maxHeight: tn(e.scroll.y)
  2860. }), q.value && (V.value = {
  2861. overflowX: "auto"
  2862. }, j.value || (ge.value = {
  2863. overflowY: "hidden"
  2864. }), be.value = {
  2865. width: e.scroll.x === !0 ? "auto" : tn(e.scroll.x),
  2866. minWidth: "100%"
  2867. });
  2868. });
  2869. const Se = (I, P) => {
  2870. Ol(O.value) && Z((Q) => {
  2871. if (Q.get(I) !== P) {
  2872. const de = new Map(Q);
  2873. return de.set(I, P), de;
  2874. }
  2875. return Q;
  2876. });
  2877. }, [Te, Oe] = lr();
  2878. function ye(I, P) {
  2879. if (!P)
  2880. return;
  2881. if (typeof P == "function") {
  2882. P(I);
  2883. return;
  2884. }
  2885. const Q = P.$el || P;
  2886. Q.scrollLeft !== I && (Q.scrollLeft = I);
  2887. }
  2888. const $e = (I) => {
  2889. let {
  2890. currentTarget: P,
  2891. scrollLeft: Q
  2892. } = I;
  2893. var de;
  2894. const we = e.direction === "rtl", me = typeof Q == "number" ? Q : P.scrollLeft, Ce = P || vr;
  2895. if ((!Oe() || Oe() === Ce) && (Te(Ce), ye(me, z.value), ye(me, S.value), ye(me, R.value), ye(me, (de = K.value) === null || de === void 0 ? void 0 : de.setScrollLeft)), P) {
  2896. const {
  2897. scrollWidth: ve,
  2898. clientWidth: Pe
  2899. } = P;
  2900. we ? (k(-me < ve - Pe), M(-me > 0)) : (k(me > 0), M(me < ve - Pe));
  2901. }
  2902. }, _ = () => {
  2903. q.value && S.value ? $e({
  2904. currentTarget: S.value
  2905. }) : (k(!1), M(!1));
  2906. };
  2907. let Y;
  2908. const D = (I) => {
  2909. I !== h.value && (_(), h.value = O.value ? O.value.offsetWidth : I);
  2910. }, W = (I) => {
  2911. let {
  2912. width: P
  2913. } = I;
  2914. if (clearTimeout(Y), h.value === 0) {
  2915. D(P);
  2916. return;
  2917. }
  2918. Y = setTimeout(() => {
  2919. D(P);
  2920. }, 100);
  2921. };
  2922. Fe([q, () => e.data, () => e.columns], () => {
  2923. q.value && _();
  2924. }, {
  2925. flush: "post"
  2926. });
  2927. const [X, re] = Ve(0);
  2928. Do(), et(() => {
  2929. at(() => {
  2930. var I, P;
  2931. _(), re(Rl(S.value).width), H.value = {
  2932. scrollWidth: ((I = S.value) === null || I === void 0 ? void 0 : I.scrollWidth) || 0,
  2933. clientWidth: ((P = S.value) === null || P === void 0 ? void 0 : P.clientWidth) || 0
  2934. };
  2935. });
  2936. }), Ul(() => {
  2937. at(() => {
  2938. var I, P;
  2939. const Q = ((I = S.value) === null || I === void 0 ? void 0 : I.scrollWidth) || 0, de = ((P = S.value) === null || P === void 0 ? void 0 : P.clientWidth) || 0;
  2940. (H.value.scrollWidth !== Q || H.value.clientWidth !== de) && (H.value = {
  2941. scrollWidth: Q,
  2942. clientWidth: de
  2943. });
  2944. });
  2945. }), Ee(() => {
  2946. e.internalHooks === Bt && e.internalRefs && e.onUpdateInternalRefs({
  2947. body: S.value ? S.value.$el || S.value : null
  2948. });
  2949. }, {
  2950. flush: "post"
  2951. });
  2952. const U = C(() => e.tableLayout ? e.tableLayout : w.value ? e.scroll.x === "max-content" ? "auto" : "fixed" : j.value || B.value.isSticky || d.value.some((I) => {
  2953. let {
  2954. ellipsis: P
  2955. } = I;
  2956. return P;
  2957. }) ? "fixed" : "auto"), ne = () => {
  2958. var I;
  2959. return a.value ? null : ((I = n.emptyText) === null || I === void 0 ? void 0 : I.call(n)) || "No Data";
  2960. };
  2961. Ro(Qe(g(g({}, $t(dn(e, "prefixCls", "direction", "transformCellText"))), {
  2962. getComponent: s,
  2963. scrollbarSize: X,
  2964. fixedInfoList: C(() => d.value.map((I, P) => Hn(P, P, d.value, L.value, e.direction))),
  2965. isSticky: C(() => B.value.isSticky),
  2966. summaryCollect: oe
  2967. }))), Uo(Qe(g(g({}, $t(dn(e, "rowClassName", "expandedRowClassName", "expandRowByClick", "expandedRowRender", "expandIconColumnIndex", "indentSize"))), {
  2968. columns: y,
  2969. flattenColumns: d,
  2970. tableLayout: U,
  2971. expandIcon: c,
  2972. expandableType: x,
  2973. onTriggerExpand: v
  2974. }))), qo({
  2975. onColumnResize: Se
  2976. }), Wo({
  2977. componentWidth: h,
  2978. fixHeader: j,
  2979. fixColumn: w,
  2980. horizonScroll: q
  2981. });
  2982. const he = () => u(Qo, {
  2983. data: r.value,
  2984. measureColumnWidth: j.value || q.value || B.value.isSticky,
  2985. expandedKeys: m.value,
  2986. rowExpandable: e.rowExpandable,
  2987. getRowKey: p.value,
  2988. customRow: e.customRow,
  2989. childrenColumnName: f.value
  2990. }, {
  2991. emptyNode: ne
  2992. }), ae = () => u(Jn, {
  2993. colWidths: d.value.map((I) => {
  2994. let {
  2995. width: P
  2996. } = I;
  2997. return P;
  2998. }),
  2999. columns: d.value
  3000. }, null);
  3001. return () => {
  3002. var I;
  3003. const {
  3004. prefixCls: P,
  3005. scroll: Q,
  3006. tableLayout: de,
  3007. direction: we,
  3008. // Additional Part
  3009. title: me = n.title,
  3010. footer: Ce = n.footer,
  3011. // Customize
  3012. id: ve,
  3013. showHeader: Pe,
  3014. customHeaderRow: Ie
  3015. } = e, {
  3016. isSticky: nt,
  3017. offsetHeader: st,
  3018. offsetSummary: il,
  3019. offsetScroll: sl,
  3020. stickyClassName: cl,
  3021. container: ul
  3022. } = B.value, Lt = s(["table"], "table"), xt = s(["body"]), Ge = (I = n.summary) === null || I === void 0 ? void 0 : I.call(n, {
  3023. pageData: r.value
  3024. });
  3025. let bt = () => null;
  3026. const yt = {
  3027. colWidths: fe.value,
  3028. columCount: d.value.length,
  3029. stickyOffsets: L.value,
  3030. customHeaderRow: Ie,
  3031. fixHeader: j.value,
  3032. scroll: Q
  3033. };
  3034. if (process.env.NODE_ENV !== "production" && typeof xt == "function" && a.value && !j.value && ze(!1, "`components.body` with render props is only work on `scroll.y`."), j.value || nt) {
  3035. let Ct = () => null;
  3036. typeof xt == "function" ? (Ct = () => xt(r.value, {
  3037. scrollbarSize: X.value,
  3038. ref: S,
  3039. onScroll: $e
  3040. }), yt.colWidths = d.value.map((Je, fl) => {
  3041. let {
  3042. width: Xt
  3043. } = Je;
  3044. const St = fl === y.value.length - 1 ? Xt - X.value : Xt;
  3045. return typeof St == "number" && !Number.isNaN(St) ? St : (ze(!1, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
  3046. })) : Ct = () => u("div", {
  3047. style: g(g({}, V.value), ge.value),
  3048. onScroll: $e,
  3049. ref: S,
  3050. class: te(`${P}-body`)
  3051. }, [u(Lt, {
  3052. style: g(g({}, be.value), {
  3053. tableLayout: U.value
  3054. })
  3055. }, {
  3056. default: () => [ae(), he(), !F.value && Ge && u(ct, {
  3057. stickyOffsets: L.value,
  3058. flattenColumns: d.value
  3059. }, {
  3060. default: () => [Ge]
  3061. })]
  3062. })]);
  3063. const Vt = g(g(g({
  3064. noData: !r.value.length,
  3065. maxContentScroll: q.value && Q.x === "max-content"
  3066. }, yt), T.value), {
  3067. direction: we,
  3068. stickyClassName: cl,
  3069. onScroll: $e
  3070. });
  3071. bt = () => u(Xe, null, [Pe !== !1 && u(un, G(G({}, Vt), {}, {
  3072. stickyTopOffset: st,
  3073. class: `${P}-header`,
  3074. ref: z
  3075. }), {
  3076. default: (Je) => u(Xe, null, [u(sn, Je, null), F.value === "top" && u(ct, Je, {
  3077. default: () => [Ge]
  3078. })])
  3079. }), Ct(), F.value && F.value !== "top" && u(un, G(G({}, Vt), {}, {
  3080. stickyBottomOffset: il,
  3081. class: `${P}-summary`,
  3082. ref: R
  3083. }), {
  3084. default: (Je) => u(ct, Je, {
  3085. default: () => [Ge]
  3086. })
  3087. }), nt && S.value && u(dr, {
  3088. ref: K,
  3089. offsetScroll: sl,
  3090. scrollBodyRef: S,
  3091. onScroll: $e,
  3092. container: ul,
  3093. scrollBodySizeInfo: H.value
  3094. }, null)]);
  3095. } else
  3096. bt = () => u("div", {
  3097. style: g(g({}, V.value), ge.value),
  3098. class: te(`${P}-content`),
  3099. onScroll: $e,
  3100. ref: S
  3101. }, [u(Lt, {
  3102. style: g(g({}, be.value), {
  3103. tableLayout: U.value
  3104. })
  3105. }, {
  3106. default: () => [ae(), Pe !== !1 && u(sn, G(G({}, yt), T.value), null), he(), Ge && u(ct, {
  3107. stickyOffsets: L.value,
  3108. flattenColumns: d.value
  3109. }, {
  3110. default: () => [Ge]
  3111. })]
  3112. })]);
  3113. const dl = El(l, {
  3114. aria: !0,
  3115. data: !0
  3116. }), Wt = () => u("div", G(G({}, dl), {}, {
  3117. class: te(P, {
  3118. [`${P}-rtl`]: we === "rtl",
  3119. [`${P}-ping-left`]: E.value,
  3120. [`${P}-ping-right`]: N.value,
  3121. [`${P}-layout-fixed`]: de === "fixed",
  3122. [`${P}-fixed-header`]: j.value,
  3123. /** No used but for compatible */
  3124. [`${P}-fixed-column`]: w.value,
  3125. [`${P}-scroll-horizontal`]: q.value,
  3126. [`${P}-has-fix-left`]: d.value[0] && d.value[0].fixed,
  3127. [`${P}-has-fix-right`]: d.value[le.value - 1] && d.value[le.value - 1].fixed === "right",
  3128. [l.class]: l.class
  3129. }),
  3130. style: l.style,
  3131. id: ve,
  3132. ref: O
  3133. }), [me && u(Ot, {
  3134. class: `${P}-title`
  3135. }, {
  3136. default: () => [me(r.value)]
  3137. }), u("div", {
  3138. class: `${P}-container`
  3139. }, [bt()]), Ce && u(Ot, {
  3140. class: `${P}-footer`
  3141. }, {
  3142. default: () => [Ce(r.value)]
  3143. })]);
  3144. return q.value ? u(Rn, {
  3145. onResize: W
  3146. }, {
  3147. default: Wt
  3148. }) : Wt();
  3149. };
  3150. }
  3151. });
  3152. function gr() {
  3153. const e = g({}, arguments.length <= 0 ? void 0 : arguments[0]);
  3154. for (let t = 1; t < arguments.length; t++) {
  3155. const l = t < 0 || arguments.length <= t ? void 0 : arguments[t];
  3156. l && Object.keys(l).forEach((n) => {
  3157. const o = l[n];
  3158. o !== void 0 && (e[n] = o);
  3159. });
  3160. }
  3161. return e;
  3162. }
  3163. const Nt = 10;
  3164. function xr(e, t) {
  3165. const l = {
  3166. current: e.current,
  3167. pageSize: e.pageSize
  3168. };
  3169. return Object.keys(t && typeof t == "object" ? t : {}).forEach((o) => {
  3170. const r = e[o];
  3171. typeof r != "function" && (l[o] = r);
  3172. }), l;
  3173. }
  3174. function br(e, t, l) {
  3175. const n = C(() => t.value && typeof t.value == "object" ? t.value : {}), o = C(() => n.value.total || 0), [r, a] = Ve(() => ({
  3176. current: "defaultCurrent" in n.value ? n.value.defaultCurrent : 1,
  3177. pageSize: "defaultPageSize" in n.value ? n.value.defaultPageSize : Nt
  3178. })), i = C(() => {
  3179. const c = gr(r.value, n.value, {
  3180. total: o.value > 0 ? o.value : e.value
  3181. }), f = Math.ceil((o.value || e.value) / c.pageSize);
  3182. return c.current > f && (c.current = f || 1), c;
  3183. }), s = (c, f) => {
  3184. t.value !== !1 && a({
  3185. current: c != null ? c : 1,
  3186. pageSize: f || i.value.pageSize
  3187. });
  3188. }, p = (c, f) => {
  3189. var x, $;
  3190. t.value && (($ = (x = n.value).onChange) === null || $ === void 0 || $.call(x, c, f)), s(c, f), l(c, f || i.value.pageSize);
  3191. };
  3192. return [C(() => t.value === !1 ? {} : g(g({}, i.value), {
  3193. onChange: p
  3194. })), s];
  3195. }
  3196. function yr(e, t, l) {
  3197. const n = ce({});
  3198. Fe([e, t, l], () => {
  3199. const r = /* @__PURE__ */ new Map(), a = l.value, i = t.value;
  3200. function s(p) {
  3201. p.forEach((c, f) => {
  3202. const x = a(c, f);
  3203. r.set(x, c), c && typeof c == "object" && i in c && s(c[i] || []);
  3204. });
  3205. }
  3206. s(e.value), n.value = {
  3207. kvMap: r
  3208. };
  3209. }, {
  3210. deep: !0,
  3211. immediate: !0
  3212. });
  3213. function o(r) {
  3214. return n.value.kvMap.get(r);
  3215. }
  3216. return [o];
  3217. }
  3218. const Be = {}, fn = "SELECT_ALL", pn = "SELECT_INVERT", mn = "SELECT_NONE", Cr = [];
  3219. function Yn(e, t) {
  3220. let l = [];
  3221. return (t || []).forEach((n) => {
  3222. l.push(n), n && typeof n == "object" && e in n && (l = [...l, ...Yn(e, n[e])]);
  3223. }), l;
  3224. }
  3225. function Sr(e, t) {
  3226. const l = C(() => {
  3227. const R = e.value || {}, {
  3228. checkStrictly: E = !0
  3229. } = R;
  3230. return g(g({}, R), {
  3231. checkStrictly: E
  3232. });
  3233. }), [n, o] = no(l.value.selectedRowKeys || l.value.defaultSelectedRowKeys || Cr, {
  3234. value: C(() => l.value.selectedRowKeys)
  3235. }), r = ce(/* @__PURE__ */ new Map()), a = (R) => {
  3236. if (l.value.preserveSelectedRowKeys) {
  3237. const E = /* @__PURE__ */ new Map();
  3238. R.forEach((k) => {
  3239. let N = t.getRecordByKey(k);
  3240. !N && r.value.has(k) && (N = r.value.get(k)), E.set(k, N);
  3241. }), r.value = E;
  3242. }
  3243. };
  3244. Ee(() => {
  3245. a(n.value);
  3246. });
  3247. const i = C(() => l.value.checkStrictly ? null : Ql(t.data.value, {
  3248. externalGetKey: t.getRowKey.value,
  3249. childrenPropName: t.childrenColumnName.value
  3250. }).keyEntities), s = C(() => Yn(t.childrenColumnName.value, t.pageData.value)), p = C(() => {
  3251. const R = /* @__PURE__ */ new Map(), E = t.getRowKey.value, k = l.value.getCheckboxProps;
  3252. return s.value.forEach((N, M) => {
  3253. const J = E(N, M), Z = (k ? k(N) : null) || {};
  3254. R.set(J, Z), process.env.NODE_ENV !== "production" && ("checked" in Z || "defaultChecked" in Z) && Re(!1, "Table", "Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.");
  3255. }), R;
  3256. }), {
  3257. maxLevel: c,
  3258. levelEntities: f
  3259. } = Zl(i), x = (R) => {
  3260. var E;
  3261. return !!(!((E = p.value.get(t.getRowKey.value(R))) === null || E === void 0) && E.disabled);
  3262. }, $ = C(() => {
  3263. if (l.value.checkStrictly)
  3264. return [n.value || [], []];
  3265. const {
  3266. checkedKeys: R,
  3267. halfCheckedKeys: E
  3268. } = wt(n.value, !0, i.value, c.value, f.value, x);
  3269. return [R || [], E];
  3270. }), b = C(() => $.value[0]), m = C(() => $.value[1]), v = C(() => {
  3271. const R = l.value.type === "radio" ? b.value.slice(0, 1) : b.value;
  3272. return new Set(R);
  3273. }), h = C(() => l.value.type === "radio" ? /* @__PURE__ */ new Set() : new Set(m.value)), [y, d] = Ve(null), T = (R) => {
  3274. let E, k;
  3275. a(R);
  3276. const {
  3277. preserveSelectedRowKeys: N,
  3278. onChange: M
  3279. } = l.value, {
  3280. getRecordByKey: J
  3281. } = t;
  3282. N ? (E = R, k = R.map((Z) => r.value.get(Z))) : (E = [], k = [], R.forEach((Z) => {
  3283. const ee = J(Z);
  3284. ee !== void 0 && (E.push(Z), k.push(ee));
  3285. })), o(E), M == null || M(E, k);
  3286. }, O = (R, E, k, N) => {
  3287. const {
  3288. onSelect: M
  3289. } = l.value, {
  3290. getRecordByKey: J
  3291. } = t || {};
  3292. if (M) {
  3293. const Z = k.map((ee) => J(ee));
  3294. M(J(R), E, Z, N);
  3295. }
  3296. T(k);
  3297. }, z = C(() => {
  3298. const {
  3299. onSelectInvert: R,
  3300. onSelectNone: E,
  3301. selections: k,
  3302. hideSelectAll: N
  3303. } = l.value, {
  3304. data: M,
  3305. pageData: J,
  3306. getRowKey: Z,
  3307. locale: ee
  3308. } = t;
  3309. return !k || N ? null : (k === !0 ? [fn, pn, mn] : k).map((le) => le === fn ? {
  3310. key: "all",
  3311. text: ee.value.selectionAll,
  3312. onSelect() {
  3313. T(M.value.map((L, j) => Z.value(L, j)).filter((L) => {
  3314. const j = p.value.get(L);
  3315. return !(j != null && j.disabled) || v.value.has(L);
  3316. }));
  3317. }
  3318. } : le === pn ? {
  3319. key: "invert",
  3320. text: ee.value.selectInvert,
  3321. onSelect() {
  3322. const L = new Set(v.value);
  3323. J.value.forEach((q, w) => {
  3324. const K = Z.value(q, w), B = p.value.get(K);
  3325. B != null && B.disabled || (L.has(K) ? L.delete(K) : L.add(K));
  3326. });
  3327. const j = Array.from(L);
  3328. R && (Re(!1, "Table", "`onSelectInvert` will be removed in future. Please use `onChange` instead."), R(j)), T(j);
  3329. }
  3330. } : le === mn ? {
  3331. key: "none",
  3332. text: ee.value.selectNone,
  3333. onSelect() {
  3334. E == null || E(), T(Array.from(v.value).filter((L) => {
  3335. const j = p.value.get(L);
  3336. return j == null ? void 0 : j.disabled;
  3337. }));
  3338. }
  3339. } : le);
  3340. }), S = C(() => s.value.length);
  3341. return [(R) => {
  3342. var E;
  3343. const {
  3344. onSelectAll: k,
  3345. onSelectMultiple: N,
  3346. columnWidth: M,
  3347. type: J,
  3348. fixed: Z,
  3349. renderCell: ee,
  3350. hideSelectAll: fe,
  3351. checkStrictly: le
  3352. } = l.value, {
  3353. prefixCls: L,
  3354. getRecordByKey: j,
  3355. getRowKey: q,
  3356. expandType: w,
  3357. getPopupContainer: K
  3358. } = t;
  3359. if (!e.value)
  3360. return process.env.NODE_ENV !== "production" && Re(!R.includes(Be), "Table", "`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."), R.filter((D) => D !== Be);
  3361. let B = R.slice();
  3362. const A = new Set(v.value), F = s.value.map(q.value).filter((D) => !p.value.get(D).disabled), oe = F.every((D) => A.has(D)), V = F.some((D) => A.has(D)), ge = () => {
  3363. const D = [];
  3364. oe ? F.forEach((X) => {
  3365. A.delete(X), D.push(X);
  3366. }) : F.forEach((X) => {
  3367. A.has(X) || (A.add(X), D.push(X));
  3368. });
  3369. const W = Array.from(A);
  3370. k == null || k(!oe, W.map((X) => j(X)), D.map((X) => j(X))), T(W);
  3371. };
  3372. let be;
  3373. if (J !== "radio") {
  3374. let D;
  3375. if (z.value) {
  3376. const ne = u(ft, {
  3377. getPopupContainer: K.value
  3378. }, {
  3379. default: () => [z.value.map((he, ae) => {
  3380. const {
  3381. key: I,
  3382. text: P,
  3383. onSelect: Q
  3384. } = he;
  3385. return u(ft.Item, {
  3386. key: I || ae,
  3387. onClick: () => {
  3388. Q == null || Q(F);
  3389. }
  3390. }, {
  3391. default: () => [P]
  3392. });
  3393. })]
  3394. });
  3395. D = u("div", {
  3396. class: `${L.value}-selection-extra`
  3397. }, [u(En, {
  3398. overlay: ne,
  3399. getPopupContainer: K.value
  3400. }, {
  3401. default: () => [u("span", null, [u(Bl, null, null)])]
  3402. })]);
  3403. }
  3404. const W = s.value.map((ne, he) => {
  3405. const ae = q.value(ne, he), I = p.value.get(ae) || {};
  3406. return g({
  3407. checked: A.has(ae)
  3408. }, I);
  3409. }).filter((ne) => {
  3410. let {
  3411. disabled: he
  3412. } = ne;
  3413. return he;
  3414. }), X = !!W.length && W.length === S.value, re = X && W.every((ne) => {
  3415. let {
  3416. checked: he
  3417. } = ne;
  3418. return he;
  3419. }), U = X && W.some((ne) => {
  3420. let {
  3421. checked: he
  3422. } = ne;
  3423. return he;
  3424. });
  3425. be = !fe && u("div", {
  3426. class: `${L.value}-selection`
  3427. }, [u(mt, {
  3428. checked: X ? re : !!S.value && oe,
  3429. indeterminate: X ? !re && U : !oe && V,
  3430. onChange: ge,
  3431. disabled: S.value === 0 || X,
  3432. "aria-label": D ? "Custom selection" : "Select all",
  3433. skipGroup: !0
  3434. }, null), D]);
  3435. }
  3436. let Se;
  3437. J === "radio" ? Se = (D) => {
  3438. let {
  3439. record: W,
  3440. index: X
  3441. } = D;
  3442. const re = q.value(W, X), U = A.has(re);
  3443. return {
  3444. node: u(kn, G(G({}, p.value.get(re)), {}, {
  3445. checked: U,
  3446. onClick: (ne) => ne.stopPropagation(),
  3447. onChange: (ne) => {
  3448. A.has(re) || O(re, !0, [re], ne.nativeEvent);
  3449. }
  3450. }), null),
  3451. checked: U
  3452. };
  3453. } : Se = (D) => {
  3454. let {
  3455. record: W,
  3456. index: X
  3457. } = D;
  3458. var re;
  3459. const U = q.value(W, X), ne = A.has(U), he = h.value.has(U), ae = p.value.get(U);
  3460. let I;
  3461. return w.value === "nest" ? (I = he, Re(typeof (ae == null ? void 0 : ae.indeterminate) != "boolean", "Table", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")) : I = (re = ae == null ? void 0 : ae.indeterminate) !== null && re !== void 0 ? re : he, {
  3462. node: u(mt, G(G({}, ae), {}, {
  3463. indeterminate: I,
  3464. checked: ne,
  3465. skipGroup: !0,
  3466. onClick: (P) => P.stopPropagation(),
  3467. onChange: (P) => {
  3468. let {
  3469. nativeEvent: Q
  3470. } = P;
  3471. const {
  3472. shiftKey: de
  3473. } = Q;
  3474. let we = -1, me = -1;
  3475. if (de && le) {
  3476. const Ce = /* @__PURE__ */ new Set([y.value, U]);
  3477. F.some((ve, Pe) => {
  3478. if (Ce.has(ve))
  3479. if (we === -1)
  3480. we = Pe;
  3481. else
  3482. return me = Pe, !0;
  3483. return !1;
  3484. });
  3485. }
  3486. if (me !== -1 && we !== me && le) {
  3487. const Ce = F.slice(we, me + 1), ve = [];
  3488. ne ? Ce.forEach((Ie) => {
  3489. A.has(Ie) && (ve.push(Ie), A.delete(Ie));
  3490. }) : Ce.forEach((Ie) => {
  3491. A.has(Ie) || (ve.push(Ie), A.add(Ie));
  3492. });
  3493. const Pe = Array.from(A);
  3494. N == null || N(!ne, Pe.map((Ie) => j(Ie)), ve.map((Ie) => j(Ie))), T(Pe);
  3495. } else {
  3496. const Ce = b.value;
  3497. if (le) {
  3498. const ve = ne ? eo(Ce, U) : to(Ce, U);
  3499. O(U, !ne, ve, Q);
  3500. } else {
  3501. const ve = wt([...Ce, U], !0, i.value, c.value, f.value, x), {
  3502. checkedKeys: Pe,
  3503. halfCheckedKeys: Ie
  3504. } = ve;
  3505. let nt = Pe;
  3506. if (ne) {
  3507. const st = new Set(Pe);
  3508. st.delete(U), nt = wt(Array.from(st), {
  3509. halfCheckedKeys: Ie
  3510. }, i.value, c.value, f.value, x).checkedKeys;
  3511. }
  3512. O(U, !ne, nt, Q);
  3513. }
  3514. }
  3515. d(U);
  3516. }
  3517. }), null),
  3518. checked: ne
  3519. };
  3520. };
  3521. const Te = (D) => {
  3522. let {
  3523. record: W,
  3524. index: X
  3525. } = D;
  3526. const {
  3527. node: re,
  3528. checked: U
  3529. } = Se({
  3530. record: W,
  3531. index: X
  3532. });
  3533. return ee ? ee(U, W, X, re) : re;
  3534. };
  3535. if (!B.includes(Be))
  3536. if (B.findIndex((D) => {
  3537. var W;
  3538. return ((W = D[Ze]) === null || W === void 0 ? void 0 : W.columnType) === "EXPAND_COLUMN";
  3539. }) === 0) {
  3540. const [D, ...W] = B;
  3541. B = [D, Be, ...W];
  3542. } else
  3543. B = [Be, ...B];
  3544. const Oe = B.indexOf(Be);
  3545. process.env.NODE_ENV !== "production" && B.filter((D) => D === Be).length > 1 && Re(!1, "Table", "Multiple `SELECTION_COLUMN` exist in `columns`."), B = B.filter((D, W) => D !== Be || W === Oe);
  3546. const ye = B[Oe - 1], $e = B[Oe + 1];
  3547. let _ = Z;
  3548. _ === void 0 && (($e == null ? void 0 : $e.fixed) !== void 0 ? _ = $e.fixed : (ye == null ? void 0 : ye.fixed) !== void 0 && (_ = ye.fixed)), _ && ye && ((E = ye[Ze]) === null || E === void 0 ? void 0 : E.columnType) === "EXPAND_COLUMN" && ye.fixed === void 0 && (ye.fixed = _);
  3549. const Y = {
  3550. fixed: _,
  3551. width: M,
  3552. className: `${L.value}-selection-column`,
  3553. title: l.value.columnTitle || be,
  3554. customRender: Te,
  3555. [Ze]: {
  3556. class: `${L.value}-selection-col`
  3557. }
  3558. };
  3559. return B.map((D) => D === Be ? Y : D);
  3560. }, v];
  3561. }
  3562. var $r = function(e, t) {
  3563. var l = {};
  3564. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  3565. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  3566. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  3567. return l;
  3568. };
  3569. function Ue(e, t) {
  3570. return "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex : t;
  3571. }
  3572. function it(e, t) {
  3573. return t ? `${t}-${e}` : `${e}`;
  3574. }
  3575. function jt(e, t) {
  3576. return typeof e == "function" ? e(t) : e;
  3577. }
  3578. function Qn() {
  3579. let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  3580. const t = Tn(e), l = [];
  3581. return t.forEach((n) => {
  3582. var o, r, a, i;
  3583. if (!n)
  3584. return;
  3585. const s = n.key, p = ((o = n.props) === null || o === void 0 ? void 0 : o.style) || {}, c = ((r = n.props) === null || r === void 0 ? void 0 : r.class) || "", f = n.props || {};
  3586. for (const [v, h] of Object.entries(f))
  3587. f[Nl(v)] = h;
  3588. const x = n.children || {}, {
  3589. default: $
  3590. } = x, b = $r(x, ["default"]), m = g(g(g({}, b), f), {
  3591. style: p,
  3592. class: c
  3593. });
  3594. if (s && (m.key = s), !((a = n.type) === null || a === void 0) && a.__ANT_TABLE_COLUMN_GROUP)
  3595. m.children = Qn(typeof $ == "function" ? $() : $);
  3596. else {
  3597. const v = (i = n.children) === null || i === void 0 ? void 0 : i.default;
  3598. m.customRender = m.customRender || v;
  3599. }
  3600. l.push(m);
  3601. }), l;
  3602. }
  3603. const dt = "ascend", It = "descend";
  3604. function vt(e) {
  3605. return typeof e.sorter == "object" && typeof e.sorter.multiple == "number" ? e.sorter.multiple : !1;
  3606. }
  3607. function vn(e) {
  3608. return typeof e == "function" ? e : e && typeof e == "object" && e.compare ? e.compare : !1;
  3609. }
  3610. function wr(e, t) {
  3611. return t ? e[e.indexOf(t) + 1] : e[0];
  3612. }
  3613. function zt(e, t, l) {
  3614. let n = [];
  3615. function o(r, a) {
  3616. n.push({
  3617. column: r,
  3618. key: Ue(r, a),
  3619. multiplePriority: vt(r),
  3620. sortOrder: r.sortOrder
  3621. });
  3622. }
  3623. return (e || []).forEach((r, a) => {
  3624. const i = it(a, l);
  3625. r.children ? ("sortOrder" in r && o(r, i), n = [...n, ...zt(r.children, t, i)]) : r.sorter && ("sortOrder" in r ? o(r, i) : t && r.defaultSortOrder && n.push({
  3626. column: r,
  3627. key: Ue(r, i),
  3628. multiplePriority: vt(r),
  3629. sortOrder: r.defaultSortOrder
  3630. }));
  3631. }), n;
  3632. }
  3633. function Zn(e, t, l, n, o, r, a, i) {
  3634. return (t || []).map((s, p) => {
  3635. const c = it(p, i);
  3636. let f = s;
  3637. if (f.sorter) {
  3638. const x = f.sortDirections || o, $ = f.showSorterTooltip === void 0 ? a : f.showSorterTooltip, b = Ue(f, c), m = l.find((R) => {
  3639. let {
  3640. key: E
  3641. } = R;
  3642. return E === b;
  3643. }), v = m ? m.sortOrder : null, h = wr(x, v), y = x.includes(dt) && u(zl, {
  3644. class: te(`${e}-column-sorter-up`, {
  3645. active: v === dt
  3646. }),
  3647. role: "presentation"
  3648. }, null), d = x.includes(It) && u(kl, {
  3649. role: "presentation",
  3650. class: te(`${e}-column-sorter-down`, {
  3651. active: v === It
  3652. })
  3653. }, null), {
  3654. cancelSort: T,
  3655. triggerAsc: O,
  3656. triggerDesc: z
  3657. } = r || {};
  3658. let S = T;
  3659. h === It ? S = z : h === dt && (S = O);
  3660. const H = typeof $ == "object" ? $ : {
  3661. title: S
  3662. };
  3663. f = g(g({}, f), {
  3664. className: te(f.className, {
  3665. [`${e}-column-sort`]: v
  3666. }),
  3667. title: (R) => {
  3668. const E = u("div", {
  3669. class: `${e}-column-sorters`
  3670. }, [u("span", {
  3671. class: `${e}-column-title`
  3672. }, [jt(s.title, R)]), u("span", {
  3673. class: te(`${e}-column-sorter`, {
  3674. [`${e}-column-sorter-full`]: !!(y && d)
  3675. })
  3676. }, [u("span", {
  3677. class: `${e}-column-sorter-inner`
  3678. }, [y, d])])]);
  3679. return $ ? u(_l, H, {
  3680. default: () => [E]
  3681. }) : E;
  3682. },
  3683. customHeaderCell: (R) => {
  3684. const E = s.customHeaderCell && s.customHeaderCell(R) || {}, k = E.onClick, N = E.onKeydown;
  3685. return E.onClick = (M) => {
  3686. n({
  3687. column: s,
  3688. key: b,
  3689. sortOrder: h,
  3690. multiplePriority: vt(s)
  3691. }), k && k(M);
  3692. }, E.onKeydown = (M) => {
  3693. M.keyCode === On.ENTER && (n({
  3694. column: s,
  3695. key: b,
  3696. sortOrder: h,
  3697. multiplePriority: vt(s)
  3698. }), N == null || N(M));
  3699. }, v && (E["aria-sort"] = v === "ascend" ? "ascending" : "descending"), E.class = te(E.class, `${e}-column-has-sorters`), E.tabindex = 0, E;
  3700. }
  3701. });
  3702. }
  3703. return "children" in f && (f = g(g({}, f), {
  3704. children: Zn(e, f.children, l, n, o, r, a, c)
  3705. })), f;
  3706. });
  3707. }
  3708. function hn(e) {
  3709. const {
  3710. column: t,
  3711. sortOrder: l
  3712. } = e;
  3713. return {
  3714. column: t,
  3715. order: l,
  3716. field: t.dataIndex,
  3717. columnKey: t.key
  3718. };
  3719. }
  3720. function gn(e) {
  3721. const t = e.filter((l) => {
  3722. let {
  3723. sortOrder: n
  3724. } = l;
  3725. return n;
  3726. }).map(hn);
  3727. return t.length === 0 && e.length ? g(g({}, hn(e[e.length - 1])), {
  3728. column: void 0
  3729. }) : t.length <= 1 ? t[0] || {} : t;
  3730. }
  3731. function kt(e, t, l) {
  3732. const n = t.slice().sort((a, i) => i.multiplePriority - a.multiplePriority), o = e.slice(), r = n.filter((a) => {
  3733. let {
  3734. column: {
  3735. sorter: i
  3736. },
  3737. sortOrder: s
  3738. } = a;
  3739. return vn(i) && s;
  3740. });
  3741. return r.length ? o.sort((a, i) => {
  3742. for (let s = 0; s < r.length; s += 1) {
  3743. const p = r[s], {
  3744. column: {
  3745. sorter: c
  3746. },
  3747. sortOrder: f
  3748. } = p, x = vn(c);
  3749. if (x && f) {
  3750. const $ = x(a, i, f);
  3751. if ($ !== 0)
  3752. return f === dt ? $ : -$;
  3753. }
  3754. }
  3755. return 0;
  3756. }).map((a) => {
  3757. const i = a[l];
  3758. return i ? g(g({}, a), {
  3759. [l]: kt(i, t, l)
  3760. }) : a;
  3761. }) : o;
  3762. }
  3763. function Ir(e) {
  3764. let {
  3765. prefixCls: t,
  3766. mergedColumns: l,
  3767. onSorterChange: n,
  3768. sortDirections: o,
  3769. tableLocale: r,
  3770. showSorterTooltip: a
  3771. } = e;
  3772. const [i, s] = Ve(zt(l.value, !0)), p = C(() => {
  3773. let b = !0;
  3774. const m = zt(l.value, !1);
  3775. if (!m.length)
  3776. return i.value;
  3777. const v = [];
  3778. function h(d) {
  3779. b ? v.push(d) : v.push(g(g({}, d), {
  3780. sortOrder: null
  3781. }));
  3782. }
  3783. let y = null;
  3784. return m.forEach((d) => {
  3785. y === null ? (h(d), d.sortOrder && (d.multiplePriority === !1 ? b = !1 : y = !0)) : (y && d.multiplePriority !== !1 || (b = !1), h(d));
  3786. }), v;
  3787. }), c = C(() => {
  3788. const b = p.value.map((m) => {
  3789. let {
  3790. column: v,
  3791. sortOrder: h
  3792. } = m;
  3793. return {
  3794. column: v,
  3795. order: h
  3796. };
  3797. });
  3798. return {
  3799. sortColumns: b,
  3800. // Legacy
  3801. sortColumn: b[0] && b[0].column,
  3802. sortOrder: b[0] && b[0].order
  3803. };
  3804. });
  3805. function f(b) {
  3806. let m;
  3807. b.multiplePriority === !1 || !p.value.length || p.value[0].multiplePriority === !1 ? m = [b] : m = [...p.value.filter((v) => {
  3808. let {
  3809. key: h
  3810. } = v;
  3811. return h !== b.key;
  3812. }), b], s(m), n(gn(m), m);
  3813. }
  3814. const x = (b) => Zn(t.value, b, p.value, f, o.value, r.value, a.value), $ = C(() => gn(p.value));
  3815. return [x, p, c, $];
  3816. }
  3817. const Pr = (e) => {
  3818. const {
  3819. keyCode: t
  3820. } = e;
  3821. t === On.ENTER && e.stopPropagation();
  3822. }, Tr = (e, t) => {
  3823. let {
  3824. slots: l
  3825. } = t;
  3826. var n;
  3827. return u("div", {
  3828. onClick: (o) => o.stopPropagation(),
  3829. onKeydown: Pr
  3830. }, [(n = l.default) === null || n === void 0 ? void 0 : n.call(l)]);
  3831. }, xn = ue({
  3832. compatConfig: {
  3833. MODE: 3
  3834. },
  3835. name: "FilterSearch",
  3836. inheritAttrs: !1,
  3837. props: {
  3838. value: Ke(),
  3839. onChange: se(),
  3840. filterSearch: De([Boolean, Function]),
  3841. tablePrefixCls: Ke(),
  3842. locale: Ye()
  3843. },
  3844. setup(e) {
  3845. return () => {
  3846. const {
  3847. value: t,
  3848. onChange: l,
  3849. filterSearch: n,
  3850. tablePrefixCls: o,
  3851. locale: r
  3852. } = e;
  3853. return n ? u("div", {
  3854. class: `${o}-filter-dropdown-search`
  3855. }, [u(lo, {
  3856. placeholder: r.filterSearchPlaceholder,
  3857. onChange: l,
  3858. value: t,
  3859. htmlSize: 1,
  3860. class: `${o}-filter-dropdown-search-input`
  3861. }, {
  3862. prefix: () => u(Dl, null, null)
  3863. })]) : null;
  3864. };
  3865. }
  3866. });
  3867. function bn(e, t) {
  3868. let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  3869. const n = /* @__PURE__ */ new Set();
  3870. function o(r, a) {
  3871. let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
  3872. const s = n.has(r);
  3873. if (Kl(!s, "Warning: There may be circular references"), s)
  3874. return !1;
  3875. if (r === a)
  3876. return !0;
  3877. if (l && i > 1)
  3878. return !1;
  3879. n.add(r);
  3880. const p = i + 1;
  3881. if (Array.isArray(r)) {
  3882. if (!Array.isArray(a) || r.length !== a.length)
  3883. return !1;
  3884. for (let c = 0; c < r.length; c++)
  3885. if (!o(r[c], a[c], p))
  3886. return !1;
  3887. return !0;
  3888. }
  3889. if (r && a && typeof r == "object" && typeof a == "object") {
  3890. const c = Object.keys(r);
  3891. return c.length !== Object.keys(a).length ? !1 : c.every((f) => o(r[f], a[f], p));
  3892. }
  3893. return !1;
  3894. }
  3895. return o(e, t);
  3896. }
  3897. const {
  3898. SubMenu: Rr,
  3899. Item: Er
  3900. } = ft;
  3901. function Or(e) {
  3902. return e.some((t) => {
  3903. let {
  3904. children: l
  3905. } = t;
  3906. return l && l.length > 0;
  3907. });
  3908. }
  3909. function el(e, t) {
  3910. return typeof t == "string" || typeof t == "number" ? t == null ? void 0 : t.toString().toLowerCase().includes(e.trim().toLowerCase()) : !1;
  3911. }
  3912. function tl(e) {
  3913. let {
  3914. filters: t,
  3915. prefixCls: l,
  3916. filteredKeys: n,
  3917. filterMultiple: o,
  3918. searchValue: r,
  3919. filterSearch: a
  3920. } = e;
  3921. return t.map((i, s) => {
  3922. const p = String(i.value);
  3923. if (i.children)
  3924. return u(Rr, {
  3925. key: p || s,
  3926. title: i.text,
  3927. popupClassName: `${l}-dropdown-submenu`
  3928. }, {
  3929. default: () => [tl({
  3930. filters: i.children,
  3931. prefixCls: l,
  3932. filteredKeys: n,
  3933. filterMultiple: o,
  3934. searchValue: r,
  3935. filterSearch: a
  3936. })]
  3937. });
  3938. const c = o ? mt : kn, f = u(Er, {
  3939. key: i.value !== void 0 ? p : s
  3940. }, {
  3941. default: () => [u(c, {
  3942. checked: n.includes(p)
  3943. }, null), u("span", null, [i.text])]
  3944. });
  3945. return r.trim() ? typeof a == "function" ? a(r, i) ? f : void 0 : el(r, i.text) ? f : void 0 : f;
  3946. });
  3947. }
  3948. const Br = ue({
  3949. name: "FilterDropdown",
  3950. props: ["tablePrefixCls", "prefixCls", "dropdownPrefixCls", "column", "filterState", "filterMultiple", "filterMode", "filterSearch", "columnKey", "triggerFilter", "locale", "getPopupContainer"],
  3951. setup(e, t) {
  3952. let {
  3953. slots: l
  3954. } = t;
  3955. const n = Mt(), o = C(() => {
  3956. var w;
  3957. return (w = e.filterMode) !== null && w !== void 0 ? w : "menu";
  3958. }), r = C(() => {
  3959. var w;
  3960. return (w = e.filterSearch) !== null && w !== void 0 ? w : !1;
  3961. }), a = C(() => e.column.filterDropdownOpen || e.column.filterDropdownVisible), i = C(() => e.column.onFilterDropdownOpenChange || e.column.onFilterDropdownVisibleChange);
  3962. process.env.NODE_ENV !== "production" && [["filterDropdownVisible", "filterDropdownOpen", e.column.filterDropdownVisible], ["onFilterDropdownVisibleChange", "onFilterDropdownOpenChange", e.column.onFilterDropdownVisibleChange]].forEach((w) => {
  3963. let [K, B, A] = w;
  3964. Re(A == null, "Table", `\`${K}\` is deprecated. Please use \`${B}\` instead.`);
  3965. });
  3966. const s = ce(!1), p = C(() => {
  3967. var w;
  3968. return !!(e.filterState && (!((w = e.filterState.filteredKeys) === null || w === void 0) && w.length || e.filterState.forceFiltered));
  3969. }), c = C(() => {
  3970. var w;
  3971. return gt((w = e.column) === null || w === void 0 ? void 0 : w.filters);
  3972. }), f = C(() => {
  3973. const {
  3974. filterDropdown: w,
  3975. slots: K = {},
  3976. customFilterDropdown: B
  3977. } = e.column;
  3978. return w || K.filterDropdown && n.value[K.filterDropdown] || B && n.value.customFilterDropdown;
  3979. }), x = C(() => {
  3980. const {
  3981. filterIcon: w,
  3982. slots: K = {}
  3983. } = e.column;
  3984. return w || K.filterIcon && n.value[K.filterIcon] || n.value.customFilterIcon;
  3985. }), $ = (w) => {
  3986. var K;
  3987. s.value = w, (K = i.value) === null || K === void 0 || K.call(i, w);
  3988. }, b = C(() => typeof a.value == "boolean" ? a.value : s.value), m = C(() => {
  3989. var w;
  3990. return (w = e.filterState) === null || w === void 0 ? void 0 : w.filteredKeys;
  3991. }), v = ce([]), h = (w) => {
  3992. let {
  3993. selectedKeys: K
  3994. } = w;
  3995. v.value = K;
  3996. }, y = (w, K) => {
  3997. let {
  3998. node: B,
  3999. checked: A
  4000. } = K;
  4001. e.filterMultiple ? h({
  4002. selectedKeys: w
  4003. }) : h({
  4004. selectedKeys: A && B.key ? [B.key] : []
  4005. });
  4006. };
  4007. Fe(m, () => {
  4008. s.value && h({
  4009. selectedKeys: m.value || []
  4010. });
  4011. }, {
  4012. immediate: !0
  4013. });
  4014. const d = ce([]), T = ce(), O = (w) => {
  4015. T.value = setTimeout(() => {
  4016. d.value = w;
  4017. });
  4018. }, z = () => {
  4019. clearTimeout(T.value);
  4020. };
  4021. tt(() => {
  4022. clearTimeout(T.value);
  4023. });
  4024. const S = ce(""), H = (w) => {
  4025. const {
  4026. value: K
  4027. } = w.target;
  4028. S.value = K;
  4029. };
  4030. Fe(s, () => {
  4031. s.value || (S.value = "");
  4032. });
  4033. const R = (w) => {
  4034. const {
  4035. column: K,
  4036. columnKey: B,
  4037. filterState: A
  4038. } = e, F = w && w.length ? w : null;
  4039. if (F === null && (!A || !A.filteredKeys) || bn(F, A == null ? void 0 : A.filteredKeys, !0))
  4040. return null;
  4041. e.triggerFilter({
  4042. column: K,
  4043. key: B,
  4044. filteredKeys: F
  4045. });
  4046. }, E = () => {
  4047. $(!1), R(v.value);
  4048. }, k = function() {
  4049. let {
  4050. confirm: w,
  4051. closeDropdown: K
  4052. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
  4053. confirm: !1,
  4054. closeDropdown: !1
  4055. };
  4056. w && R([]), K && $(!1), S.value = "", e.column.filterResetToDefaultFilteredValue ? v.value = (e.column.defaultFilteredValue || []).map((B) => String(B)) : v.value = [];
  4057. }, N = function() {
  4058. let {
  4059. closeDropdown: w
  4060. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
  4061. closeDropdown: !0
  4062. };
  4063. w && $(!1), R(v.value);
  4064. }, M = (w) => {
  4065. w && m.value !== void 0 && (v.value = m.value || []), $(w), !w && !f.value && E();
  4066. }, {
  4067. direction: J
  4068. } = Kt("", e), Z = (w) => {
  4069. if (w.target.checked) {
  4070. const K = c.value;
  4071. v.value = K;
  4072. } else
  4073. v.value = [];
  4074. }, ee = (w) => {
  4075. let {
  4076. filters: K
  4077. } = w;
  4078. return (K || []).map((B, A) => {
  4079. const F = String(B.value), oe = {
  4080. title: B.text,
  4081. key: B.value !== void 0 ? F : A
  4082. };
  4083. return B.children && (oe.children = ee({
  4084. filters: B.children
  4085. })), oe;
  4086. });
  4087. }, fe = (w) => {
  4088. var K;
  4089. return g(g({}, w), {
  4090. text: w.title,
  4091. value: w.key,
  4092. children: ((K = w.children) === null || K === void 0 ? void 0 : K.map((B) => fe(B))) || []
  4093. });
  4094. }, le = C(() => ee({
  4095. filters: e.column.filters
  4096. })), L = C(() => te({
  4097. [`${e.dropdownPrefixCls}-menu-without-submenu`]: !Or(e.column.filters || [])
  4098. })), j = () => {
  4099. const w = v.value, {
  4100. column: K,
  4101. locale: B,
  4102. tablePrefixCls: A,
  4103. filterMultiple: F,
  4104. dropdownPrefixCls: oe,
  4105. getPopupContainer: V,
  4106. prefixCls: ge
  4107. } = e;
  4108. return (K.filters || []).length === 0 ? u(ln, {
  4109. image: ln.PRESENTED_IMAGE_SIMPLE,
  4110. description: B.filterEmptyText,
  4111. imageStyle: {
  4112. height: 24
  4113. },
  4114. style: {
  4115. margin: 0,
  4116. padding: "16px 0"
  4117. }
  4118. }, null) : o.value === "tree" ? u(Xe, null, [u(xn, {
  4119. filterSearch: r.value,
  4120. value: S.value,
  4121. onChange: H,
  4122. tablePrefixCls: A,
  4123. locale: B
  4124. }, null), u("div", {
  4125. class: `${A}-filter-dropdown-tree`
  4126. }, [F ? u(mt, {
  4127. class: `${A}-filter-dropdown-checkall`,
  4128. onChange: Z,
  4129. checked: w.length === c.value.length,
  4130. indeterminate: w.length > 0 && w.length < c.value.length
  4131. }, {
  4132. default: () => [B.filterCheckall]
  4133. }) : null, u(oo, {
  4134. checkable: !0,
  4135. selectable: !1,
  4136. blockNode: !0,
  4137. multiple: F,
  4138. checkStrictly: !F,
  4139. class: `${oe}-menu`,
  4140. onCheck: y,
  4141. checkedKeys: w,
  4142. selectedKeys: w,
  4143. showIcon: !1,
  4144. treeData: le.value,
  4145. autoExpandParent: !0,
  4146. defaultExpandAll: !0,
  4147. filterTreeNode: S.value.trim() ? (be) => typeof r.value == "function" ? r.value(S.value, fe(be)) : el(S.value, be.title) : void 0
  4148. }, null)])]) : u(Xe, null, [u(xn, {
  4149. filterSearch: r.value,
  4150. value: S.value,
  4151. onChange: H,
  4152. tablePrefixCls: A,
  4153. locale: B
  4154. }, null), u(ft, {
  4155. multiple: F,
  4156. prefixCls: `${oe}-menu`,
  4157. class: L.value,
  4158. onClick: z,
  4159. onSelect: h,
  4160. onDeselect: h,
  4161. selectedKeys: w,
  4162. getPopupContainer: V,
  4163. openKeys: d.value,
  4164. onOpenChange: O
  4165. }, {
  4166. default: () => tl({
  4167. filters: K.filters || [],
  4168. filterSearch: r.value,
  4169. prefixCls: ge,
  4170. filteredKeys: v.value,
  4171. filterMultiple: F,
  4172. searchValue: S.value
  4173. })
  4174. })]);
  4175. }, q = C(() => {
  4176. const w = v.value;
  4177. return e.column.filterResetToDefaultFilteredValue ? bn((e.column.defaultFilteredValue || []).map((K) => String(K)), w, !0) : w.length === 0;
  4178. });
  4179. return () => {
  4180. var w;
  4181. const {
  4182. tablePrefixCls: K,
  4183. prefixCls: B,
  4184. column: A,
  4185. dropdownPrefixCls: F,
  4186. locale: oe,
  4187. getPopupContainer: V
  4188. } = e;
  4189. let ge;
  4190. typeof f.value == "function" ? ge = f.value({
  4191. prefixCls: `${F}-custom`,
  4192. setSelectedKeys: (Te) => h({
  4193. selectedKeys: Te
  4194. }),
  4195. selectedKeys: v.value,
  4196. confirm: N,
  4197. clearFilters: k,
  4198. filters: A.filters,
  4199. visible: b.value,
  4200. column: A.__originColumn__,
  4201. close: () => {
  4202. $(!1);
  4203. }
  4204. }) : f.value ? ge = f.value : ge = u(Xe, null, [j(), u("div", {
  4205. class: `${B}-dropdown-btns`
  4206. }, [u(nn, {
  4207. type: "link",
  4208. size: "small",
  4209. disabled: q.value,
  4210. onClick: () => k()
  4211. }, {
  4212. default: () => [oe.filterReset]
  4213. }), u(nn, {
  4214. type: "primary",
  4215. size: "small",
  4216. onClick: E
  4217. }, {
  4218. default: () => [oe.filterConfirm]
  4219. })])]);
  4220. const be = u(Tr, {
  4221. class: `${B}-dropdown`
  4222. }, {
  4223. default: () => [ge]
  4224. });
  4225. let Se;
  4226. return typeof x.value == "function" ? Se = x.value({
  4227. filtered: p.value,
  4228. column: A.__originColumn__
  4229. }) : x.value ? Se = x.value : Se = u(Fl, null, null), u("div", {
  4230. class: `${B}-column`
  4231. }, [u("span", {
  4232. class: `${K}-column-title`
  4233. }, [(w = l.default) === null || w === void 0 ? void 0 : w.call(l)]), u(En, {
  4234. overlay: be,
  4235. trigger: ["click"],
  4236. open: b.value,
  4237. onOpenChange: M,
  4238. getPopupContainer: V,
  4239. placement: J.value === "rtl" ? "bottomLeft" : "bottomRight"
  4240. }, {
  4241. default: () => [u("span", {
  4242. role: "button",
  4243. tabindex: -1,
  4244. class: te(`${B}-trigger`, {
  4245. active: p.value
  4246. }),
  4247. onClick: (Te) => {
  4248. Te.stopPropagation();
  4249. }
  4250. }, [Se])]
  4251. })]);
  4252. };
  4253. }
  4254. });
  4255. function _t(e, t, l) {
  4256. let n = [];
  4257. return (e || []).forEach((o, r) => {
  4258. var a, i;
  4259. const s = it(r, l), p = o.filterDropdown || ((a = o == null ? void 0 : o.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || o.customFilterDropdown;
  4260. if (o.filters || p || "onFilter" in o)
  4261. if ("filteredValue" in o) {
  4262. let c = o.filteredValue;
  4263. p || (c = (i = c == null ? void 0 : c.map(String)) !== null && i !== void 0 ? i : c), n.push({
  4264. column: o,
  4265. key: Ue(o, s),
  4266. filteredKeys: c,
  4267. forceFiltered: o.filtered
  4268. });
  4269. } else
  4270. n.push({
  4271. column: o,
  4272. key: Ue(o, s),
  4273. filteredKeys: t && o.defaultFilteredValue ? o.defaultFilteredValue : void 0,
  4274. forceFiltered: o.filtered
  4275. });
  4276. "children" in o && (n = [...n, ..._t(o.children, t, s)]);
  4277. }), n;
  4278. }
  4279. function nl(e, t, l, n, o, r, a, i) {
  4280. return l.map((s, p) => {
  4281. var c;
  4282. const f = it(p, i), {
  4283. filterMultiple: x = !0,
  4284. filterMode: $,
  4285. filterSearch: b
  4286. } = s;
  4287. let m = s;
  4288. const v = s.filterDropdown || ((c = s == null ? void 0 : s.slots) === null || c === void 0 ? void 0 : c.filterDropdown) || s.customFilterDropdown;
  4289. if (m.filters || v) {
  4290. const h = Ue(m, f), y = n.find((d) => {
  4291. let {
  4292. key: T
  4293. } = d;
  4294. return h === T;
  4295. });
  4296. m = g(g({}, m), {
  4297. title: (d) => u(Br, {
  4298. tablePrefixCls: e,
  4299. prefixCls: `${e}-filter`,
  4300. dropdownPrefixCls: t,
  4301. column: m,
  4302. columnKey: h,
  4303. filterState: y,
  4304. filterMultiple: x,
  4305. filterMode: $,
  4306. filterSearch: b,
  4307. triggerFilter: r,
  4308. locale: o,
  4309. getPopupContainer: a
  4310. }, {
  4311. default: () => [jt(s.title, d)]
  4312. })
  4313. });
  4314. }
  4315. return "children" in m && (m = g(g({}, m), {
  4316. children: nl(e, t, m.children, n, o, r, a, f)
  4317. })), m;
  4318. });
  4319. }
  4320. function gt(e) {
  4321. let t = [];
  4322. return (e || []).forEach((l) => {
  4323. let {
  4324. value: n,
  4325. children: o
  4326. } = l;
  4327. t.push(n), o && (t = [...t, ...gt(o)]);
  4328. }), t;
  4329. }
  4330. function yn(e) {
  4331. const t = {};
  4332. return e.forEach((l) => {
  4333. let {
  4334. key: n,
  4335. filteredKeys: o,
  4336. column: r
  4337. } = l;
  4338. var a;
  4339. const i = r.filterDropdown || ((a = r == null ? void 0 : r.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || r.customFilterDropdown, {
  4340. filters: s
  4341. } = r;
  4342. if (i)
  4343. t[n] = o || null;
  4344. else if (Array.isArray(o)) {
  4345. const p = gt(s);
  4346. t[n] = p.filter((c) => o.includes(String(c)));
  4347. } else
  4348. t[n] = null;
  4349. }), t;
  4350. }
  4351. function Cn(e, t) {
  4352. return t.reduce((l, n) => {
  4353. const {
  4354. column: {
  4355. onFilter: o,
  4356. filters: r
  4357. },
  4358. filteredKeys: a
  4359. } = n;
  4360. return o && a && a.length ? l.filter((i) => a.some((s) => {
  4361. const p = gt(r), c = p.findIndex((x) => String(x) === String(s)), f = c !== -1 ? p[c] : s;
  4362. return o(f, i);
  4363. })) : l;
  4364. }, e);
  4365. }
  4366. function ll(e) {
  4367. return e.flatMap((t) => "children" in t ? [t, ...ll(t.children || [])] : [t]);
  4368. }
  4369. function Nr(e) {
  4370. let {
  4371. prefixCls: t,
  4372. dropdownPrefixCls: l,
  4373. mergedColumns: n,
  4374. locale: o,
  4375. onFilterChange: r,
  4376. getPopupContainer: a
  4377. } = e;
  4378. const i = C(() => ll(n.value)), [s, p] = Ve(_t(i.value, !0)), c = C(() => {
  4379. const b = _t(i.value, !1);
  4380. if (b.length === 0)
  4381. return b;
  4382. let m = !0, v = !0;
  4383. if (b.forEach((h) => {
  4384. let {
  4385. filteredKeys: y
  4386. } = h;
  4387. y !== void 0 ? m = !1 : v = !1;
  4388. }), m) {
  4389. const h = (i.value || []).map((y, d) => Ue(y, it(d)));
  4390. return s.value.filter((y) => {
  4391. let {
  4392. key: d
  4393. } = y;
  4394. return h.includes(d);
  4395. }).map((y) => {
  4396. const d = i.value[h.findIndex((T) => T === y.key)];
  4397. return g(g({}, y), {
  4398. column: g(g({}, y.column), d),
  4399. forceFiltered: d.filtered
  4400. });
  4401. });
  4402. }
  4403. return Re(v, "Table", "Columns should all contain `filteredValue` or not contain `filteredValue`."), b;
  4404. }), f = C(() => yn(c.value)), x = (b) => {
  4405. const m = c.value.filter((v) => {
  4406. let {
  4407. key: h
  4408. } = v;
  4409. return h !== b.key;
  4410. });
  4411. m.push(b), p(m), r(yn(m), m);
  4412. };
  4413. return [(b) => nl(t.value, l.value, b, c.value, o.value, x, a.value), c, f];
  4414. }
  4415. function ol(e, t) {
  4416. return e.map((l) => {
  4417. const n = g({}, l);
  4418. return n.title = jt(n.title, t), "children" in n && (n.children = ol(n.children, t)), n;
  4419. });
  4420. }
  4421. function zr(e) {
  4422. return [(l) => ol(l, e.value)];
  4423. }
  4424. function kr(e) {
  4425. return function(l) {
  4426. let {
  4427. prefixCls: n,
  4428. onExpand: o,
  4429. record: r,
  4430. expanded: a,
  4431. expandable: i
  4432. } = l;
  4433. const s = `${n}-row-expand-icon`;
  4434. return u("button", {
  4435. type: "button",
  4436. onClick: (p) => {
  4437. o(r, p), p.stopPropagation();
  4438. },
  4439. class: te(s, {
  4440. [`${s}-spaced`]: !i,
  4441. [`${s}-expanded`]: i && a,
  4442. [`${s}-collapsed`]: i && !a
  4443. }),
  4444. "aria-label": a ? e.collapse : e.expand,
  4445. "aria-expanded": a
  4446. }, null);
  4447. };
  4448. }
  4449. function rl(e, t) {
  4450. const l = t.value;
  4451. return e.map((n) => {
  4452. var o;
  4453. if (n === Be || n === _e) return n;
  4454. const r = g({}, n), {
  4455. slots: a = {}
  4456. } = r;
  4457. return r.__originColumn__ = n, Re(!("slots" in r), "Table", "`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."), Object.keys(a).forEach((i) => {
  4458. const s = a[i];
  4459. r[i] === void 0 && l[s] && (r[i] = l[s]);
  4460. }), t.value.headerCell && !(!((o = n.slots) === null || o === void 0) && o.title) && (r.title = Ft(t.value, "headerCell", {
  4461. title: n.title,
  4462. column: n
  4463. }, () => [n.title])), "children" in r && Array.isArray(r.children) && (r.children = rl(r.children, t)), r;
  4464. });
  4465. }
  4466. function _r(e) {
  4467. return [(l) => rl(l, e)];
  4468. }
  4469. const Dr = (e) => {
  4470. const {
  4471. componentCls: t
  4472. } = e, l = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`, n = (o, r, a) => ({
  4473. [`&${t}-${o}`]: {
  4474. [`> ${t}-container`]: {
  4475. [`> ${t}-content, > ${t}-body`]: {
  4476. "> table > tbody > tr > td": {
  4477. [`> ${t}-expanded-row-fixed`]: {
  4478. margin: `-${r}px -${a + e.lineWidth}px`
  4479. }
  4480. }
  4481. }
  4482. }
  4483. }
  4484. });
  4485. return {
  4486. [`${t}-wrapper`]: {
  4487. [`${t}${t}-bordered`]: g(g(g({
  4488. // ============================ Title =============================
  4489. [`> ${t}-title`]: {
  4490. border: l,
  4491. borderBottom: 0
  4492. },
  4493. // ============================ Content ============================
  4494. [`> ${t}-container`]: {
  4495. borderInlineStart: l,
  4496. [`
  4497. > ${t}-content,
  4498. > ${t}-header,
  4499. > ${t}-body,
  4500. > ${t}-summary
  4501. `]: {
  4502. "> table": {
  4503. // ============================= Cell =============================
  4504. "\n > thead > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ": {
  4505. borderInlineEnd: l
  4506. },
  4507. // ============================ Header ============================
  4508. "> thead": {
  4509. "> tr:not(:last-child) > th": {
  4510. borderBottom: l
  4511. },
  4512. "> tr > th::before": {
  4513. backgroundColor: "transparent !important"
  4514. }
  4515. },
  4516. // Fixed right should provides additional border
  4517. "\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ": {
  4518. [`> ${t}-cell-fix-right-first::after`]: {
  4519. borderInlineEnd: l
  4520. }
  4521. },
  4522. // ========================== Expandable ==========================
  4523. "> tbody > tr > td": {
  4524. [`> ${t}-expanded-row-fixed`]: {
  4525. margin: `-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal + e.lineWidth}px`,
  4526. "&::after": {
  4527. position: "absolute",
  4528. top: 0,
  4529. insetInlineEnd: e.lineWidth,
  4530. bottom: 0,
  4531. borderInlineEnd: l,
  4532. content: '""'
  4533. }
  4534. }
  4535. }
  4536. }
  4537. },
  4538. [`
  4539. > ${t}-content,
  4540. > ${t}-header
  4541. `]: {
  4542. "> table": {
  4543. borderTop: l
  4544. }
  4545. }
  4546. },
  4547. // ============================ Scroll ============================
  4548. [`&${t}-scroll-horizontal`]: {
  4549. [`> ${t}-container > ${t}-body`]: {
  4550. "> table > tbody": {
  4551. [`
  4552. > tr${t}-expanded-row,
  4553. > tr${t}-placeholder
  4554. `]: {
  4555. "> td": {
  4556. borderInlineEnd: 0
  4557. }
  4558. }
  4559. }
  4560. }
  4561. }
  4562. }, n("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle)), n("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall)), {
  4563. // ============================ Footer ============================
  4564. [`> ${t}-footer`]: {
  4565. border: l,
  4566. borderTop: 0
  4567. }
  4568. }),
  4569. // ============================ Nested ============================
  4570. [`${t}-cell`]: {
  4571. [`${t}-container:first-child`]: {
  4572. // :first-child to avoid the case when bordered and title is set
  4573. borderTop: 0
  4574. },
  4575. // https://github.com/ant-design/ant-design/issues/35577
  4576. "&-scrollbar:not([rowspan])": {
  4577. boxShadow: `0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`
  4578. }
  4579. }
  4580. }
  4581. };
  4582. }, Kr = (e) => {
  4583. const {
  4584. componentCls: t
  4585. } = e;
  4586. return {
  4587. [`${t}-wrapper`]: {
  4588. [`${t}-cell-ellipsis`]: g(g({}, Al), {
  4589. wordBreak: "keep-all",
  4590. // Fixed first or last should special process
  4591. [`
  4592. &${t}-cell-fix-left-last,
  4593. &${t}-cell-fix-right-first
  4594. `]: {
  4595. overflow: "visible",
  4596. [`${t}-cell-content`]: {
  4597. display: "block",
  4598. overflow: "hidden",
  4599. textOverflow: "ellipsis"
  4600. }
  4601. },
  4602. [`${t}-column-title`]: {
  4603. overflow: "hidden",
  4604. textOverflow: "ellipsis",
  4605. wordBreak: "keep-all"
  4606. }
  4607. })
  4608. }
  4609. };
  4610. }, Fr = (e) => {
  4611. const {
  4612. componentCls: t
  4613. } = e;
  4614. return {
  4615. [`${t}-wrapper`]: {
  4616. [`${t}-tbody > tr${t}-placeholder`]: {
  4617. textAlign: "center",
  4618. color: e.colorTextDisabled,
  4619. "&:hover > td": {
  4620. background: e.colorBgContainer
  4621. }
  4622. }
  4623. }
  4624. };
  4625. }, Ar = (e) => {
  4626. const {
  4627. componentCls: t,
  4628. antCls: l,
  4629. controlInteractiveSize: n,
  4630. motionDurationSlow: o,
  4631. lineWidth: r,
  4632. paddingXS: a,
  4633. lineType: i,
  4634. tableBorderColor: s,
  4635. tableExpandIconBg: p,
  4636. tableExpandColumnWidth: c,
  4637. borderRadius: f,
  4638. fontSize: x,
  4639. fontSizeSM: $,
  4640. lineHeight: b,
  4641. tablePaddingVertical: m,
  4642. tablePaddingHorizontal: v,
  4643. tableExpandedRowBg: h,
  4644. paddingXXS: y
  4645. } = e, d = n / 2 - r, T = d * 2 + r * 3, O = `${r}px ${i} ${s}`, z = y - r;
  4646. return {
  4647. [`${t}-wrapper`]: {
  4648. [`${t}-expand-icon-col`]: {
  4649. width: c
  4650. },
  4651. [`${t}-row-expand-icon-cell`]: {
  4652. textAlign: "center",
  4653. [`${t}-row-expand-icon`]: {
  4654. display: "inline-flex",
  4655. float: "none",
  4656. verticalAlign: "sub"
  4657. }
  4658. },
  4659. [`${t}-row-indent`]: {
  4660. height: 1,
  4661. float: "left"
  4662. },
  4663. [`${t}-row-expand-icon`]: g(g({}, ao(e)), {
  4664. position: "relative",
  4665. float: "left",
  4666. boxSizing: "border-box",
  4667. width: T,
  4668. height: T,
  4669. padding: 0,
  4670. color: "inherit",
  4671. lineHeight: `${T}px`,
  4672. background: p,
  4673. border: O,
  4674. borderRadius: f,
  4675. transform: `scale(${n / T})`,
  4676. transition: `all ${o}`,
  4677. userSelect: "none",
  4678. "&:focus, &:hover, &:active": {
  4679. borderColor: "currentcolor"
  4680. },
  4681. "&::before, &::after": {
  4682. position: "absolute",
  4683. background: "currentcolor",
  4684. transition: `transform ${o} ease-out`,
  4685. content: '""'
  4686. },
  4687. "&::before": {
  4688. top: d,
  4689. insetInlineEnd: z,
  4690. insetInlineStart: z,
  4691. height: r
  4692. },
  4693. "&::after": {
  4694. top: z,
  4695. bottom: z,
  4696. insetInlineStart: d,
  4697. width: r,
  4698. transform: "rotate(90deg)"
  4699. },
  4700. // Motion effect
  4701. "&-collapsed::before": {
  4702. transform: "rotate(-180deg)"
  4703. },
  4704. "&-collapsed::after": {
  4705. transform: "rotate(0deg)"
  4706. },
  4707. "&-spaced": {
  4708. "&::before, &::after": {
  4709. display: "none",
  4710. content: "none"
  4711. },
  4712. background: "transparent",
  4713. border: 0,
  4714. visibility: "hidden"
  4715. }
  4716. }),
  4717. [`${t}-row-indent + ${t}-row-expand-icon`]: {
  4718. marginTop: (x * b - r * 3) / 2 - Math.ceil(($ * 1.4 - r * 3) / 2),
  4719. marginInlineEnd: a
  4720. },
  4721. [`tr${t}-expanded-row`]: {
  4722. "&, &:hover": {
  4723. "> td": {
  4724. background: h
  4725. }
  4726. },
  4727. // https://github.com/ant-design/ant-design/issues/25573
  4728. [`${l}-descriptions-view`]: {
  4729. display: "flex",
  4730. table: {
  4731. flex: "auto",
  4732. width: "auto"
  4733. }
  4734. }
  4735. },
  4736. // With fixed
  4737. [`${t}-expanded-row-fixed`]: {
  4738. position: "relative",
  4739. margin: `-${m}px -${v}px`,
  4740. padding: `${m}px ${v}px`
  4741. }
  4742. }
  4743. };
  4744. }, Mr = (e) => {
  4745. const {
  4746. componentCls: t,
  4747. antCls: l,
  4748. iconCls: n,
  4749. tableFilterDropdownWidth: o,
  4750. tableFilterDropdownSearchWidth: r,
  4751. paddingXXS: a,
  4752. paddingXS: i,
  4753. colorText: s,
  4754. lineWidth: p,
  4755. lineType: c,
  4756. tableBorderColor: f,
  4757. tableHeaderIconColor: x,
  4758. fontSizeSM: $,
  4759. tablePaddingHorizontal: b,
  4760. borderRadius: m,
  4761. motionDurationSlow: v,
  4762. colorTextDescription: h,
  4763. colorPrimary: y,
  4764. tableHeaderFilterActiveBg: d,
  4765. colorTextDisabled: T,
  4766. tableFilterDropdownBg: O,
  4767. tableFilterDropdownHeight: z,
  4768. controlItemBgHover: S,
  4769. controlItemBgActive: H,
  4770. boxShadowSecondary: R
  4771. } = e, E = `${l}-dropdown`, k = `${t}-filter-dropdown`, N = `${l}-tree`, M = `${p}px ${c} ${f}`;
  4772. return [
  4773. {
  4774. [`${t}-wrapper`]: {
  4775. [`${t}-filter-column`]: {
  4776. display: "flex",
  4777. justifyContent: "space-between"
  4778. },
  4779. [`${t}-filter-trigger`]: {
  4780. position: "relative",
  4781. display: "flex",
  4782. alignItems: "center",
  4783. marginBlock: -a,
  4784. marginInline: `${a}px ${-b / 2}px`,
  4785. padding: `0 ${a}px`,
  4786. color: x,
  4787. fontSize: $,
  4788. borderRadius: m,
  4789. cursor: "pointer",
  4790. transition: `all ${v}`,
  4791. "&:hover": {
  4792. color: h,
  4793. background: d
  4794. },
  4795. "&.active": {
  4796. color: y
  4797. }
  4798. }
  4799. }
  4800. },
  4801. {
  4802. // Dropdown
  4803. [`${l}-dropdown`]: {
  4804. [k]: g(g({}, Dt(e)), {
  4805. minWidth: o,
  4806. backgroundColor: O,
  4807. borderRadius: m,
  4808. boxShadow: R,
  4809. // Reset menu
  4810. [`${E}-menu`]: {
  4811. // https://github.com/ant-design/ant-design/issues/4916
  4812. // https://github.com/ant-design/ant-design/issues/19542
  4813. maxHeight: z,
  4814. overflowX: "hidden",
  4815. border: 0,
  4816. boxShadow: "none",
  4817. "&:empty::after": {
  4818. display: "block",
  4819. padding: `${i}px 0`,
  4820. color: T,
  4821. fontSize: $,
  4822. textAlign: "center",
  4823. content: '"Not Found"'
  4824. }
  4825. },
  4826. [`${k}-tree`]: {
  4827. paddingBlock: `${i}px 0`,
  4828. paddingInline: i,
  4829. [N]: {
  4830. padding: 0
  4831. },
  4832. [`${N}-treenode ${N}-node-content-wrapper:hover`]: {
  4833. backgroundColor: S
  4834. },
  4835. [`${N}-treenode-checkbox-checked ${N}-node-content-wrapper`]: {
  4836. "&, &:hover": {
  4837. backgroundColor: H
  4838. }
  4839. }
  4840. },
  4841. [`${k}-search`]: {
  4842. padding: i,
  4843. borderBottom: M,
  4844. "&-input": {
  4845. input: {
  4846. minWidth: r
  4847. },
  4848. [n]: {
  4849. color: T
  4850. }
  4851. }
  4852. },
  4853. [`${k}-checkall`]: {
  4854. width: "100%",
  4855. marginBottom: a,
  4856. marginInlineStart: a
  4857. },
  4858. // Operation
  4859. [`${k}-btns`]: {
  4860. display: "flex",
  4861. justifyContent: "space-between",
  4862. padding: `${i - p}px ${i}px`,
  4863. overflow: "hidden",
  4864. backgroundColor: "inherit",
  4865. borderTop: M
  4866. }
  4867. })
  4868. }
  4869. },
  4870. // Dropdown Menu & SubMenu
  4871. {
  4872. // submenu of table filter dropdown
  4873. [`${l}-dropdown ${k}, ${k}-submenu`]: {
  4874. // Checkbox
  4875. [`${l}-checkbox-wrapper + span`]: {
  4876. paddingInlineStart: i,
  4877. color: s
  4878. },
  4879. "> ul": {
  4880. maxHeight: "calc(100vh - 130px)",
  4881. overflowX: "hidden",
  4882. overflowY: "auto"
  4883. }
  4884. }
  4885. }
  4886. ];
  4887. }, Hr = (e) => {
  4888. const {
  4889. componentCls: t,
  4890. lineWidth: l,
  4891. colorSplit: n,
  4892. motionDurationSlow: o,
  4893. zIndexTableFixed: r,
  4894. tableBg: a,
  4895. zIndexTableSticky: i
  4896. } = e, s = n;
  4897. return {
  4898. [`${t}-wrapper`]: {
  4899. [`
  4900. ${t}-cell-fix-left,
  4901. ${t}-cell-fix-right
  4902. `]: {
  4903. position: "sticky !important",
  4904. zIndex: r,
  4905. background: a
  4906. },
  4907. [`
  4908. ${t}-cell-fix-left-first::after,
  4909. ${t}-cell-fix-left-last::after
  4910. `]: {
  4911. position: "absolute",
  4912. top: 0,
  4913. right: {
  4914. _skip_check_: !0,
  4915. value: 0
  4916. },
  4917. bottom: -l,
  4918. width: 30,
  4919. transform: "translateX(100%)",
  4920. transition: `box-shadow ${o}`,
  4921. content: '""',
  4922. pointerEvents: "none"
  4923. },
  4924. [`${t}-cell-fix-left-all::after`]: {
  4925. display: "none"
  4926. },
  4927. [`
  4928. ${t}-cell-fix-right-first::after,
  4929. ${t}-cell-fix-right-last::after
  4930. `]: {
  4931. position: "absolute",
  4932. top: 0,
  4933. bottom: -l,
  4934. left: {
  4935. _skip_check_: !0,
  4936. value: 0
  4937. },
  4938. width: 30,
  4939. transform: "translateX(-100%)",
  4940. transition: `box-shadow ${o}`,
  4941. content: '""',
  4942. pointerEvents: "none"
  4943. },
  4944. [`${t}-container`]: {
  4945. "&::before, &::after": {
  4946. position: "absolute",
  4947. top: 0,
  4948. bottom: 0,
  4949. zIndex: i + 1,
  4950. width: 30,
  4951. transition: `box-shadow ${o}`,
  4952. content: '""',
  4953. pointerEvents: "none"
  4954. },
  4955. "&::before": {
  4956. insetInlineStart: 0
  4957. },
  4958. "&::after": {
  4959. insetInlineEnd: 0
  4960. }
  4961. },
  4962. [`${t}-ping-left`]: {
  4963. [`&:not(${t}-has-fix-left) ${t}-container`]: {
  4964. position: "relative",
  4965. "&::before": {
  4966. boxShadow: `inset 10px 0 8px -8px ${s}`
  4967. }
  4968. },
  4969. [`
  4970. ${t}-cell-fix-left-first::after,
  4971. ${t}-cell-fix-left-last::after
  4972. `]: {
  4973. boxShadow: `inset 10px 0 8px -8px ${s}`
  4974. },
  4975. [`${t}-cell-fix-left-last::before`]: {
  4976. backgroundColor: "transparent !important"
  4977. }
  4978. },
  4979. [`${t}-ping-right`]: {
  4980. [`&:not(${t}-has-fix-right) ${t}-container`]: {
  4981. position: "relative",
  4982. "&::after": {
  4983. boxShadow: `inset -10px 0 8px -8px ${s}`
  4984. }
  4985. },
  4986. [`
  4987. ${t}-cell-fix-right-first::after,
  4988. ${t}-cell-fix-right-last::after
  4989. `]: {
  4990. boxShadow: `inset -10px 0 8px -8px ${s}`
  4991. }
  4992. }
  4993. }
  4994. };
  4995. }, jr = (e) => {
  4996. const {
  4997. componentCls: t,
  4998. antCls: l
  4999. } = e;
  5000. return {
  5001. [`${t}-wrapper`]: {
  5002. // ========================== Pagination ==========================
  5003. [`${t}-pagination${l}-pagination`]: {
  5004. margin: `${e.margin}px 0`
  5005. },
  5006. [`${t}-pagination`]: {
  5007. display: "flex",
  5008. flexWrap: "wrap",
  5009. rowGap: e.paddingXS,
  5010. "> *": {
  5011. flex: "none"
  5012. },
  5013. "&-left": {
  5014. justifyContent: "flex-start"
  5015. },
  5016. "&-center": {
  5017. justifyContent: "center"
  5018. },
  5019. "&-right": {
  5020. justifyContent: "flex-end"
  5021. }
  5022. }
  5023. }
  5024. };
  5025. }, Lr = (e) => {
  5026. const {
  5027. componentCls: t,
  5028. tableRadius: l
  5029. } = e;
  5030. return {
  5031. [`${t}-wrapper`]: {
  5032. [t]: {
  5033. // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
  5034. [`${t}-title, ${t}-header`]: {
  5035. borderRadius: `${l}px ${l}px 0 0`
  5036. },
  5037. [`${t}-title + ${t}-container`]: {
  5038. borderStartStartRadius: 0,
  5039. borderStartEndRadius: 0,
  5040. table: {
  5041. borderRadius: 0,
  5042. "> thead > tr:first-child": {
  5043. "th:first-child": {
  5044. borderRadius: 0
  5045. },
  5046. "th:last-child": {
  5047. borderRadius: 0
  5048. }
  5049. }
  5050. }
  5051. },
  5052. "&-container": {
  5053. borderStartStartRadius: l,
  5054. borderStartEndRadius: l,
  5055. "table > thead > tr:first-child": {
  5056. "> *:first-child": {
  5057. borderStartStartRadius: l
  5058. },
  5059. "> *:last-child": {
  5060. borderStartEndRadius: l
  5061. }
  5062. }
  5063. },
  5064. "&-footer": {
  5065. borderRadius: `0 0 ${l}px ${l}px`
  5066. }
  5067. }
  5068. }
  5069. };
  5070. }, Wr = (e) => {
  5071. const {
  5072. componentCls: t
  5073. } = e;
  5074. return {
  5075. [`${t}-wrapper-rtl`]: {
  5076. direction: "rtl",
  5077. table: {
  5078. direction: "rtl"
  5079. },
  5080. [`${t}-pagination-left`]: {
  5081. justifyContent: "flex-end"
  5082. },
  5083. [`${t}-pagination-right`]: {
  5084. justifyContent: "flex-start"
  5085. },
  5086. [`${t}-row-expand-icon`]: {
  5087. "&::after": {
  5088. transform: "rotate(-90deg)"
  5089. },
  5090. "&-collapsed::before": {
  5091. transform: "rotate(180deg)"
  5092. },
  5093. "&-collapsed::after": {
  5094. transform: "rotate(0deg)"
  5095. }
  5096. }
  5097. }
  5098. };
  5099. }, Vr = (e) => {
  5100. const {
  5101. componentCls: t,
  5102. antCls: l,
  5103. iconCls: n,
  5104. fontSizeIcon: o,
  5105. paddingXS: r,
  5106. tableHeaderIconColor: a,
  5107. tableHeaderIconColorHover: i
  5108. } = e;
  5109. return {
  5110. [`${t}-wrapper`]: {
  5111. // ========================== Selections ==========================
  5112. [`${t}-selection-col`]: {
  5113. width: e.tableSelectionColumnWidth
  5114. },
  5115. [`${t}-bordered ${t}-selection-col`]: {
  5116. width: e.tableSelectionColumnWidth + r * 2
  5117. },
  5118. [`
  5119. table tr th${t}-selection-column,
  5120. table tr td${t}-selection-column
  5121. `]: {
  5122. paddingInlineEnd: e.paddingXS,
  5123. paddingInlineStart: e.paddingXS,
  5124. textAlign: "center",
  5125. [`${l}-radio-wrapper`]: {
  5126. marginInlineEnd: 0
  5127. }
  5128. },
  5129. [`table tr th${t}-selection-column${t}-cell-fix-left`]: {
  5130. zIndex: e.zIndexTableFixed + 1
  5131. },
  5132. [`table tr th${t}-selection-column::after`]: {
  5133. backgroundColor: "transparent !important"
  5134. },
  5135. [`${t}-selection`]: {
  5136. position: "relative",
  5137. display: "inline-flex",
  5138. flexDirection: "column"
  5139. },
  5140. [`${t}-selection-extra`]: {
  5141. position: "absolute",
  5142. top: 0,
  5143. zIndex: 1,
  5144. cursor: "pointer",
  5145. transition: `all ${e.motionDurationSlow}`,
  5146. marginInlineStart: "100%",
  5147. paddingInlineStart: `${e.tablePaddingHorizontal / 4}px`,
  5148. [n]: {
  5149. color: a,
  5150. fontSize: o,
  5151. verticalAlign: "baseline",
  5152. "&:hover": {
  5153. color: i
  5154. }
  5155. }
  5156. }
  5157. }
  5158. };
  5159. }, Xr = (e) => {
  5160. const {
  5161. componentCls: t
  5162. } = e, l = (n, o, r, a) => ({
  5163. [`${t}${t}-${n}`]: {
  5164. fontSize: a,
  5165. [`
  5166. ${t}-title,
  5167. ${t}-footer,
  5168. ${t}-thead > tr > th,
  5169. ${t}-tbody > tr > td,
  5170. tfoot > tr > th,
  5171. tfoot > tr > td
  5172. `]: {
  5173. padding: `${o}px ${r}px`
  5174. },
  5175. [`${t}-filter-trigger`]: {
  5176. marginInlineEnd: `-${r / 2}px`
  5177. },
  5178. [`${t}-expanded-row-fixed`]: {
  5179. margin: `-${o}px -${r}px`
  5180. },
  5181. [`${t}-tbody`]: {
  5182. // ========================= Nest Table ===========================
  5183. [`${t}-wrapper:only-child ${t}`]: {
  5184. marginBlock: `-${o}px`,
  5185. marginInline: `${e.tableExpandColumnWidth - r}px -${r}px`
  5186. }
  5187. },
  5188. // https://github.com/ant-design/ant-design/issues/35167
  5189. [`${t}-selection-column`]: {
  5190. paddingInlineStart: `${r / 4}px`
  5191. }
  5192. }
  5193. });
  5194. return {
  5195. [`${t}-wrapper`]: g(g({}, l("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle, e.tableFontSizeMiddle)), l("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall, e.tableFontSizeSmall))
  5196. };
  5197. }, Ur = (e) => {
  5198. const {
  5199. componentCls: t
  5200. } = e;
  5201. return {
  5202. [`${t}-wrapper ${t}-resize-handle`]: {
  5203. position: "absolute",
  5204. top: 0,
  5205. height: "100% !important",
  5206. bottom: 0,
  5207. left: " auto !important",
  5208. right: " -8px",
  5209. cursor: "col-resize",
  5210. touchAction: "none",
  5211. userSelect: "auto",
  5212. width: "16px",
  5213. zIndex: 1,
  5214. "&-line": {
  5215. display: "block",
  5216. width: "1px",
  5217. marginLeft: "7px",
  5218. height: "100% !important",
  5219. backgroundColor: e.colorPrimary,
  5220. opacity: 0
  5221. },
  5222. "&:hover &-line": {
  5223. opacity: 1
  5224. }
  5225. },
  5226. [`${t}-wrapper ${t}-resize-handle.dragging`]: {
  5227. overflow: "hidden",
  5228. [`${t}-resize-handle-line`]: {
  5229. opacity: 1
  5230. },
  5231. "&:before": {
  5232. position: "absolute",
  5233. top: 0,
  5234. bottom: 0,
  5235. content: '" "',
  5236. width: "200vw",
  5237. transform: "translateX(-50%)",
  5238. opacity: 0
  5239. }
  5240. }
  5241. };
  5242. }, Gr = (e) => {
  5243. const {
  5244. componentCls: t,
  5245. marginXXS: l,
  5246. fontSizeIcon: n,
  5247. tableHeaderIconColor: o,
  5248. tableHeaderIconColorHover: r
  5249. } = e;
  5250. return {
  5251. [`${t}-wrapper`]: {
  5252. [`${t}-thead th${t}-column-has-sorters`]: {
  5253. outline: "none",
  5254. cursor: "pointer",
  5255. transition: `all ${e.motionDurationSlow}`,
  5256. "&:hover": {
  5257. background: e.tableHeaderSortHoverBg,
  5258. "&::before": {
  5259. backgroundColor: "transparent !important"
  5260. }
  5261. },
  5262. "&:focus-visible": {
  5263. color: e.colorPrimary
  5264. },
  5265. // https://github.com/ant-design/ant-design/issues/30969
  5266. [`
  5267. &${t}-cell-fix-left:hover,
  5268. &${t}-cell-fix-right:hover
  5269. `]: {
  5270. background: e.tableFixedHeaderSortActiveBg
  5271. }
  5272. },
  5273. [`${t}-thead th${t}-column-sort`]: {
  5274. background: e.tableHeaderSortBg,
  5275. "&::before": {
  5276. backgroundColor: "transparent !important"
  5277. }
  5278. },
  5279. [`td${t}-column-sort`]: {
  5280. background: e.tableBodySortBg
  5281. },
  5282. [`${t}-column-title`]: {
  5283. position: "relative",
  5284. zIndex: 1,
  5285. flex: 1
  5286. },
  5287. [`${t}-column-sorters`]: {
  5288. display: "flex",
  5289. flex: "auto",
  5290. alignItems: "center",
  5291. justifyContent: "space-between",
  5292. "&::after": {
  5293. position: "absolute",
  5294. inset: 0,
  5295. width: "100%",
  5296. height: "100%",
  5297. content: '""'
  5298. }
  5299. },
  5300. [`${t}-column-sorter`]: {
  5301. marginInlineStart: l,
  5302. color: o,
  5303. fontSize: 0,
  5304. transition: `color ${e.motionDurationSlow}`,
  5305. "&-inner": {
  5306. display: "inline-flex",
  5307. flexDirection: "column",
  5308. alignItems: "center"
  5309. },
  5310. "&-up, &-down": {
  5311. fontSize: n,
  5312. "&.active": {
  5313. color: e.colorPrimary
  5314. }
  5315. },
  5316. [`${t}-column-sorter-up + ${t}-column-sorter-down`]: {
  5317. marginTop: "-0.3em"
  5318. }
  5319. },
  5320. [`${t}-column-sorters:hover ${t}-column-sorter`]: {
  5321. color: r
  5322. }
  5323. }
  5324. };
  5325. }, Jr = (e) => {
  5326. const {
  5327. componentCls: t,
  5328. opacityLoading: l,
  5329. tableScrollThumbBg: n,
  5330. tableScrollThumbBgHover: o,
  5331. tableScrollThumbSize: r,
  5332. tableScrollBg: a,
  5333. zIndexTableSticky: i
  5334. } = e, s = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;
  5335. return {
  5336. [`${t}-wrapper`]: {
  5337. [`${t}-sticky`]: {
  5338. "&-holder": {
  5339. position: "sticky",
  5340. zIndex: i,
  5341. background: e.colorBgContainer
  5342. },
  5343. "&-scroll": {
  5344. position: "sticky",
  5345. bottom: 0,
  5346. height: `${r}px !important`,
  5347. zIndex: i,
  5348. display: "flex",
  5349. alignItems: "center",
  5350. background: a,
  5351. borderTop: s,
  5352. opacity: l,
  5353. "&:hover": {
  5354. transformOrigin: "center bottom"
  5355. },
  5356. // fake scrollbar style of sticky
  5357. "&-bar": {
  5358. height: r,
  5359. backgroundColor: n,
  5360. borderRadius: 100,
  5361. transition: `all ${e.motionDurationSlow}, transform none`,
  5362. position: "absolute",
  5363. bottom: 0,
  5364. "&:hover, &-active": {
  5365. backgroundColor: o
  5366. }
  5367. }
  5368. }
  5369. }
  5370. }
  5371. };
  5372. }, Sn = (e) => {
  5373. const {
  5374. componentCls: t,
  5375. lineWidth: l,
  5376. tableBorderColor: n
  5377. } = e, o = `${l}px ${e.lineType} ${n}`;
  5378. return {
  5379. [`${t}-wrapper`]: {
  5380. [`${t}-summary`]: {
  5381. position: "relative",
  5382. zIndex: e.zIndexTableFixed,
  5383. background: e.tableBg,
  5384. "> tr": {
  5385. "> th, > td": {
  5386. borderBottom: o
  5387. }
  5388. }
  5389. },
  5390. [`div${t}-summary`]: {
  5391. boxShadow: `0 -${l}px 0 ${n}`
  5392. }
  5393. }
  5394. };
  5395. }, qr = (e) => {
  5396. const {
  5397. componentCls: t,
  5398. fontWeightStrong: l,
  5399. tablePaddingVertical: n,
  5400. tablePaddingHorizontal: o,
  5401. lineWidth: r,
  5402. lineType: a,
  5403. tableBorderColor: i,
  5404. tableFontSize: s,
  5405. tableBg: p,
  5406. tableRadius: c,
  5407. tableHeaderTextColor: f,
  5408. motionDurationMid: x,
  5409. tableHeaderBg: $,
  5410. tableHeaderCellSplitColor: b,
  5411. tableRowHoverBg: m,
  5412. tableSelectedRowBg: v,
  5413. tableSelectedRowHoverBg: h,
  5414. tableFooterTextColor: y,
  5415. tableFooterBg: d,
  5416. paddingContentVerticalLG: T
  5417. } = e, O = `${r}px ${a} ${i}`;
  5418. return {
  5419. [`${t}-wrapper`]: g(g({
  5420. clear: "both",
  5421. maxWidth: "100%"
  5422. }, Ml()), {
  5423. [t]: g(g({}, Dt(e)), {
  5424. fontSize: s,
  5425. background: p,
  5426. borderRadius: `${c}px ${c}px 0 0`
  5427. }),
  5428. // https://github.com/ant-design/ant-design/issues/17611
  5429. table: {
  5430. width: "100%",
  5431. textAlign: "start",
  5432. borderRadius: `${c}px ${c}px 0 0`,
  5433. borderCollapse: "separate",
  5434. borderSpacing: 0
  5435. },
  5436. // ============================= Cell =============================
  5437. [`
  5438. ${t}-thead > tr > th,
  5439. ${t}-tbody > tr > td,
  5440. tfoot > tr > th,
  5441. tfoot > tr > td
  5442. `]: {
  5443. position: "relative",
  5444. padding: `${T}px ${o}px`,
  5445. overflowWrap: "break-word"
  5446. },
  5447. // ============================ Title =============================
  5448. [`${t}-title`]: {
  5449. padding: `${n}px ${o}px`
  5450. },
  5451. // ============================ Header ============================
  5452. [`${t}-thead`]: {
  5453. "\n > tr > th,\n > tr > td\n ": {
  5454. position: "relative",
  5455. color: f,
  5456. fontWeight: l,
  5457. textAlign: "start",
  5458. background: $,
  5459. borderBottom: O,
  5460. transition: `background ${x} ease`,
  5461. "&[colspan]:not([colspan='1'])": {
  5462. textAlign: "center"
  5463. },
  5464. [`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]: {
  5465. position: "absolute",
  5466. top: "50%",
  5467. insetInlineEnd: 0,
  5468. width: 1,
  5469. height: "1.6em",
  5470. backgroundColor: b,
  5471. transform: "translateY(-50%)",
  5472. transition: `background-color ${x}`,
  5473. content: '""'
  5474. }
  5475. },
  5476. "> tr:not(:last-child) > th[colspan]": {
  5477. borderBottom: 0
  5478. }
  5479. },
  5480. // ============================ Body ============================
  5481. // Borderless Table has unique hover style, which would be implemented with `borderTop`.
  5482. [`${t}:not(${t}-bordered)`]: {
  5483. [`${t}-tbody`]: {
  5484. "> tr": {
  5485. "> td": {
  5486. borderTop: O,
  5487. borderBottom: "transparent"
  5488. },
  5489. "&:last-child > td": {
  5490. borderBottom: O
  5491. },
  5492. [`&:first-child > td,
  5493. &${t}-measure-row + tr > td`]: {
  5494. borderTop: "none",
  5495. borderTopColor: "transparent"
  5496. }
  5497. }
  5498. }
  5499. },
  5500. // Bordered Table remains simple `borderBottom`.
  5501. // Ref issue: https://github.com/ant-design/ant-design/issues/38724
  5502. [`${t}${t}-bordered`]: {
  5503. [`${t}-tbody`]: {
  5504. "> tr": {
  5505. "> td": {
  5506. borderBottom: O
  5507. }
  5508. }
  5509. }
  5510. },
  5511. [`${t}-tbody`]: {
  5512. "> tr": {
  5513. "> td": {
  5514. transition: `background ${x}, border-color ${x}`,
  5515. // ========================= Nest Table ===========================
  5516. [`
  5517. > ${t}-wrapper:only-child,
  5518. > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
  5519. `]: {
  5520. [t]: {
  5521. marginBlock: `-${n}px`,
  5522. marginInline: `${e.tableExpandColumnWidth - o}px -${o}px`,
  5523. [`${t}-tbody > tr:last-child > td`]: {
  5524. borderBottom: 0,
  5525. "&:first-child, &:last-child": {
  5526. borderRadius: 0
  5527. }
  5528. }
  5529. }
  5530. }
  5531. },
  5532. [`
  5533. &${t}-row:hover > td,
  5534. > td${t}-cell-row-hover
  5535. `]: {
  5536. background: m
  5537. },
  5538. [`&${t}-row-selected`]: {
  5539. "> td": {
  5540. background: v
  5541. },
  5542. "&:hover > td": {
  5543. background: h
  5544. }
  5545. }
  5546. }
  5547. },
  5548. // ============================ Footer ============================
  5549. [`${t}-footer`]: {
  5550. padding: `${n}px ${o}px`,
  5551. color: y,
  5552. background: d
  5553. }
  5554. })
  5555. };
  5556. }, Yr = $n("Table", (e) => {
  5557. const {
  5558. controlItemBgActive: t,
  5559. controlItemBgActiveHover: l,
  5560. colorTextPlaceholder: n,
  5561. colorTextHeading: o,
  5562. colorSplit: r,
  5563. colorBorderSecondary: a,
  5564. fontSize: i,
  5565. padding: s,
  5566. paddingXS: p,
  5567. paddingSM: c,
  5568. controlHeight: f,
  5569. colorFillAlter: x,
  5570. colorIcon: $,
  5571. colorIconHover: b,
  5572. opacityLoading: m,
  5573. colorBgContainer: v,
  5574. borderRadiusLG: h,
  5575. colorFillContent: y,
  5576. colorFillSecondary: d,
  5577. controlInteractiveSize: T
  5578. } = e, O = new ot($), z = new ot(b), S = t, H = 2, R = new ot(d).onBackground(v).toHexString(), E = new ot(y).onBackground(v).toHexString(), k = new ot(x).onBackground(v).toHexString(), N = wn(e, {
  5579. tableFontSize: i,
  5580. tableBg: v,
  5581. tableRadius: h,
  5582. tablePaddingVertical: s,
  5583. tablePaddingHorizontal: s,
  5584. tablePaddingVerticalMiddle: c,
  5585. tablePaddingHorizontalMiddle: p,
  5586. tablePaddingVerticalSmall: p,
  5587. tablePaddingHorizontalSmall: p,
  5588. tableBorderColor: a,
  5589. tableHeaderTextColor: o,
  5590. tableHeaderBg: k,
  5591. tableFooterTextColor: o,
  5592. tableFooterBg: k,
  5593. tableHeaderCellSplitColor: a,
  5594. tableHeaderSortBg: R,
  5595. tableHeaderSortHoverBg: E,
  5596. tableHeaderIconColor: O.clone().setAlpha(O.getAlpha() * m).toRgbString(),
  5597. tableHeaderIconColorHover: z.clone().setAlpha(z.getAlpha() * m).toRgbString(),
  5598. tableBodySortBg: k,
  5599. tableFixedHeaderSortActiveBg: R,
  5600. tableHeaderFilterActiveBg: y,
  5601. tableFilterDropdownBg: v,
  5602. tableRowHoverBg: k,
  5603. tableSelectedRowBg: S,
  5604. tableSelectedRowHoverBg: l,
  5605. zIndexTableFixed: H,
  5606. zIndexTableSticky: H + 1,
  5607. tableFontSizeMiddle: i,
  5608. tableFontSizeSmall: i,
  5609. tableSelectionColumnWidth: f,
  5610. tableExpandIconBg: v,
  5611. tableExpandColumnWidth: T + 2 * e.padding,
  5612. tableExpandedRowBg: x,
  5613. // Dropdown
  5614. tableFilterDropdownWidth: 120,
  5615. tableFilterDropdownHeight: 264,
  5616. tableFilterDropdownSearchWidth: 140,
  5617. // Virtual Scroll Bar
  5618. tableScrollThumbSize: 8,
  5619. tableScrollThumbBg: n,
  5620. tableScrollThumbBgHover: o,
  5621. tableScrollBg: r
  5622. });
  5623. return [qr(N), jr(N), Sn(N), Gr(N), Mr(N), Dr(N), Lr(N), Ar(N), Sn(N), Fr(N), Vr(N), Hr(N), Jr(N), Kr(N), Xr(N), Ur(N), Wr(N)];
  5624. }), Qr = [], al = () => ({
  5625. prefixCls: Ke(),
  5626. columns: qe(),
  5627. rowKey: De([String, Function]),
  5628. tableLayout: Ke(),
  5629. rowClassName: De([String, Function]),
  5630. title: se(),
  5631. footer: se(),
  5632. id: Ke(),
  5633. showHeader: Ne(),
  5634. components: Ye(),
  5635. customRow: se(),
  5636. customHeaderRow: se(),
  5637. direction: Ke(),
  5638. expandFixed: De([Boolean, String]),
  5639. expandColumnWidth: Number,
  5640. expandedRowKeys: qe(),
  5641. defaultExpandedRowKeys: qe(),
  5642. expandedRowRender: se(),
  5643. expandRowByClick: Ne(),
  5644. expandIcon: se(),
  5645. onExpand: se(),
  5646. onExpandedRowsChange: se(),
  5647. "onUpdate:expandedRowKeys": se(),
  5648. defaultExpandAllRows: Ne(),
  5649. indentSize: Number,
  5650. /** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
  5651. expandIconColumnIndex: Number,
  5652. showExpandColumn: Ne(),
  5653. expandedRowClassName: se(),
  5654. childrenColumnName: Ke(),
  5655. rowExpandable: se(),
  5656. sticky: De([Boolean, Object]),
  5657. dropdownPrefixCls: String,
  5658. dataSource: qe(),
  5659. pagination: De([Boolean, Object]),
  5660. loading: De([Boolean, Object]),
  5661. size: Ke(),
  5662. bordered: Ne(),
  5663. locale: Ye(),
  5664. onChange: se(),
  5665. onResizeColumn: se(),
  5666. rowSelection: Ye(),
  5667. getPopupContainer: se(),
  5668. scroll: Ye(),
  5669. sortDirections: qe(),
  5670. showSorterTooltip: De([Boolean, Object], !0),
  5671. transformCellText: se()
  5672. }), Zr = ue({
  5673. name: "InternalTable",
  5674. inheritAttrs: !1,
  5675. props: Bn(g(g({}, al()), {
  5676. contextSlots: Ye()
  5677. }), {
  5678. rowKey: "key"
  5679. }),
  5680. setup(e, t) {
  5681. let {
  5682. attrs: l,
  5683. slots: n,
  5684. expose: o,
  5685. emit: r
  5686. } = t;
  5687. Re(!(typeof e.rowKey == "function" && e.rowKey.length > 1), "Table", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."), Bo(C(() => e.contextSlots)), No({
  5688. onResizeColumn: (_, Y) => {
  5689. r("resizeColumn", _, Y);
  5690. }
  5691. });
  5692. const a = In(), i = C(() => {
  5693. const _ = new Set(Object.keys(a.value).filter((Y) => a.value[Y]));
  5694. return e.columns.filter((Y) => !Y.responsive || Y.responsive.some((D) => _.has(D)));
  5695. }), {
  5696. size: s,
  5697. renderEmpty: p,
  5698. direction: c,
  5699. prefixCls: f,
  5700. configProvider: x
  5701. } = Kt("table", e), [$, b] = Yr(f), m = C(() => {
  5702. var _;
  5703. return e.transformCellText || ((_ = x.transformCellText) === null || _ === void 0 ? void 0 : _.value);
  5704. }), [v] = Pn("Table", Hl.Table, xe(e, "locale")), h = C(() => e.dataSource || Qr), y = C(() => x.getPrefixCls("dropdown", e.dropdownPrefixCls)), d = C(() => e.childrenColumnName || "children"), T = C(() => h.value.some((_) => _ == null ? void 0 : _[d.value]) ? "nest" : e.expandedRowRender ? "row" : null), O = Qe({
  5705. body: null
  5706. }), z = (_) => {
  5707. g(O, _);
  5708. }, S = C(() => typeof e.rowKey == "function" ? e.rowKey : (_) => _ == null ? void 0 : _[e.rowKey]), [H] = yr(h, d, S), R = {}, E = function(_, Y) {
  5709. let D = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  5710. const {
  5711. pagination: W,
  5712. scroll: X,
  5713. onChange: re
  5714. } = e, U = g(g({}, R), _);
  5715. D && (R.resetPagination(), U.pagination.current && (U.pagination.current = 1), W && W.onChange && W.onChange(1, U.pagination.pageSize)), X && X.scrollToFirstRowOnChange !== !1 && O.body && ro(0, {
  5716. getContainer: () => O.body
  5717. }), re == null || re(U.pagination, U.filters, U.sorter, {
  5718. currentDataSource: Cn(kt(h.value, U.sorterStates, d.value), U.filterStates),
  5719. action: Y
  5720. });
  5721. }, k = (_, Y) => {
  5722. E({
  5723. sorter: _,
  5724. sorterStates: Y
  5725. }, "sort", !1);
  5726. }, [N, M, J, Z] = Ir({
  5727. prefixCls: f,
  5728. mergedColumns: i,
  5729. onSorterChange: k,
  5730. sortDirections: C(() => e.sortDirections || ["ascend", "descend"]),
  5731. tableLocale: v,
  5732. showSorterTooltip: xe(e, "showSorterTooltip")
  5733. }), ee = C(() => kt(h.value, M.value, d.value)), fe = (_, Y) => {
  5734. E({
  5735. filters: _,
  5736. filterStates: Y
  5737. }, "filter", !0);
  5738. }, [le, L, j] = Nr({
  5739. prefixCls: f,
  5740. locale: v,
  5741. dropdownPrefixCls: y,
  5742. mergedColumns: i,
  5743. onFilterChange: fe,
  5744. getPopupContainer: xe(e, "getPopupContainer")
  5745. }), q = C(() => Cn(ee.value, L.value)), [w] = _r(xe(e, "contextSlots")), K = C(() => {
  5746. const _ = {}, Y = j.value;
  5747. return Object.keys(Y).forEach((D) => {
  5748. Y[D] !== null && (_[D] = Y[D]);
  5749. }), g(g({}, J.value), {
  5750. filters: _
  5751. });
  5752. }), [B] = zr(K), A = (_, Y) => {
  5753. E({
  5754. pagination: g(g({}, R.pagination), {
  5755. current: _,
  5756. pageSize: Y
  5757. })
  5758. }, "paginate");
  5759. }, [F, oe] = br(C(() => q.value.length), xe(e, "pagination"), A);
  5760. Ee(() => {
  5761. R.sorter = Z.value, R.sorterStates = M.value, R.filters = j.value, R.filterStates = L.value, R.pagination = e.pagination === !1 ? {} : xr(F.value, e.pagination), R.resetPagination = oe;
  5762. });
  5763. const V = C(() => {
  5764. if (e.pagination === !1 || !F.value.pageSize)
  5765. return q.value;
  5766. const {
  5767. current: _ = 1,
  5768. total: Y,
  5769. pageSize: D = Nt
  5770. } = F.value;
  5771. return Re(_ > 0, "Table", "`current` should be positive number."), q.value.length < Y ? q.value.length > D ? q.value.slice((_ - 1) * D, _ * D) : q.value : q.value.slice((_ - 1) * D, _ * D);
  5772. });
  5773. Ee(() => {
  5774. at(() => {
  5775. const {
  5776. total: _,
  5777. pageSize: Y = Nt
  5778. } = F.value;
  5779. q.value.length < _ && q.value.length > Y && Re(!1, "Table", "`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.");
  5780. });
  5781. }, {
  5782. flush: "post"
  5783. });
  5784. const ge = C(() => e.showExpandColumn === !1 ? -1 : T.value === "nest" && e.expandIconColumnIndex === void 0 ? e.rowSelection ? 1 : 0 : e.expandIconColumnIndex > 0 && e.rowSelection ? e.expandIconColumnIndex - 1 : e.expandIconColumnIndex), be = pe();
  5785. Fe(() => e.rowSelection, () => {
  5786. be.value = e.rowSelection ? g({}, e.rowSelection) : e.rowSelection;
  5787. }, {
  5788. deep: !0,
  5789. immediate: !0
  5790. });
  5791. const [Se, Te] = Sr(be, {
  5792. prefixCls: f,
  5793. data: q,
  5794. pageData: V,
  5795. getRowKey: S,
  5796. getRecordByKey: H,
  5797. expandType: T,
  5798. childrenColumnName: d,
  5799. locale: v,
  5800. getPopupContainer: C(() => e.getPopupContainer)
  5801. }), Oe = (_, Y, D) => {
  5802. let W;
  5803. const {
  5804. rowClassName: X
  5805. } = e;
  5806. return typeof X == "function" ? W = te(X(_, Y, D)) : W = te(X), te({
  5807. [`${f.value}-row-selected`]: Te.value.has(S.value(_, Y))
  5808. }, W);
  5809. };
  5810. o({
  5811. selectedKeySet: Te
  5812. });
  5813. const ye = C(() => typeof e.indentSize == "number" ? e.indentSize : 15), $e = (_) => B(Se(le(N(w(_)))));
  5814. return () => {
  5815. var _;
  5816. const {
  5817. expandIcon: Y = n.expandIcon || kr(v.value),
  5818. pagination: D,
  5819. loading: W,
  5820. bordered: X
  5821. } = e;
  5822. let re, U;
  5823. if (D !== !1 && (!((_ = F.value) === null || _ === void 0) && _.total)) {
  5824. let I;
  5825. F.value.size ? I = F.value.size : I = s.value === "small" || s.value === "middle" ? "small" : void 0;
  5826. const P = (we) => u(To, G(G({}, F.value), {}, {
  5827. class: [`${f.value}-pagination ${f.value}-pagination-${we}`, F.value.class],
  5828. size: I
  5829. }), null), Q = c.value === "rtl" ? "left" : "right", {
  5830. position: de
  5831. } = F.value;
  5832. if (de !== null && Array.isArray(de)) {
  5833. const we = de.find((ve) => ve.includes("top")), me = de.find((ve) => ve.includes("bottom")), Ce = de.every((ve) => `${ve}` == "none");
  5834. !we && !me && !Ce && (U = P(Q)), we && (re = P(we.toLowerCase().replace("top", ""))), me && (U = P(me.toLowerCase().replace("bottom", "")));
  5835. } else
  5836. U = P(Q);
  5837. }
  5838. let ne;
  5839. typeof W == "boolean" ? ne = {
  5840. spinning: W
  5841. } : typeof W == "object" && (ne = g({
  5842. spinning: !0
  5843. }, W));
  5844. const he = te(`${f.value}-wrapper`, {
  5845. [`${f.value}-wrapper-rtl`]: c.value === "rtl"
  5846. }, l.class, b.value), ae = jl(e, ["columns"]);
  5847. return $(u("div", {
  5848. class: he,
  5849. style: l.style
  5850. }, [u(Gl, G({
  5851. spinning: !1
  5852. }, ne), {
  5853. default: () => [re, u(hr, G(G(G({}, l), ae), {}, {
  5854. expandedRowKeys: e.expandedRowKeys,
  5855. defaultExpandedRowKeys: e.defaultExpandedRowKeys,
  5856. expandIconColumnIndex: ge.value,
  5857. indentSize: ye.value,
  5858. expandIcon: Y,
  5859. columns: i.value,
  5860. direction: c.value,
  5861. prefixCls: f.value,
  5862. class: te({
  5863. [`${f.value}-middle`]: s.value === "middle",
  5864. [`${f.value}-small`]: s.value === "small",
  5865. [`${f.value}-bordered`]: X,
  5866. [`${f.value}-empty`]: h.value.length === 0
  5867. }),
  5868. data: V.value,
  5869. rowKey: S.value,
  5870. rowClassName: Oe,
  5871. internalHooks: Bt,
  5872. internalRefs: O,
  5873. onUpdateInternalRefs: z,
  5874. transformColumns: $e,
  5875. transformCellText: m.value
  5876. }), g(g({}, n), {
  5877. emptyText: () => {
  5878. var I, P;
  5879. return ((I = n.emptyText) === null || I === void 0 ? void 0 : I.call(n)) || ((P = e.locale) === null || P === void 0 ? void 0 : P.emptyText) || p("Table");
  5880. }
  5881. })), U]
  5882. })]));
  5883. };
  5884. }
  5885. }), ha = ue({
  5886. name: "ATable",
  5887. inheritAttrs: !1,
  5888. props: Bn(al(), {
  5889. rowKey: "key"
  5890. }),
  5891. slots: Object,
  5892. setup(e, t) {
  5893. let {
  5894. attrs: l,
  5895. slots: n,
  5896. expose: o
  5897. } = t;
  5898. const r = pe();
  5899. return o({
  5900. table: r
  5901. }), () => {
  5902. var a;
  5903. const i = e.columns || Qn((a = n.default) === null || a === void 0 ? void 0 : a.call(n));
  5904. return u(Zr, G(G(G({
  5905. ref: r
  5906. }, l), e), {}, {
  5907. columns: i || [],
  5908. expandedRowRender: n.expandedRowRender || e.expandedRowRender,
  5909. contextSlots: g({}, n)
  5910. }), n);
  5911. };
  5912. }
  5913. });
  5914. export {
  5915. Ht as C,
  5916. _e as E,
  5917. va as F,
  5918. Be as S,
  5919. ha as T,
  5920. ma as a,
  5921. mn as b,
  5922. pn as c,
  5923. fn as d,
  5924. Hn as g,
  5925. al as t,
  5926. Ae as u
  5927. };