index.js 691 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848
  1. var av = Object.defineProperty;
  2. var ov = (e, t, n) => t in e ? av(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
  3. var qa = (e, t, n) => ov(e, typeof t != "symbol" ? t + "" : t, n);
  4. import * as d from "react";
  5. import me, { forwardRef as $t, useRef as Ce, createElement as Xt, createContext as hu, useMemo as Ht, useContext as Sn, useState as rt, useCallback as Ot, useEffect as lt, isValidElement as pc, cloneElement as hc, version as iv, useLayoutEffect as gc, useImperativeHandle as yc, Fragment as uv } from "react";
  6. import nr, { createPortal as $a, unstable_batchedUpdates as lv, flushSync as Di } from "react-dom";
  7. function Aa(e) {
  8. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  9. }
  10. function bc(e) {
  11. if (e.__esModule) return e;
  12. var t = e.default;
  13. if (typeof t == "function") {
  14. var n = function r() {
  15. return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
  16. };
  17. n.prototype = t.prototype;
  18. } else n = {};
  19. return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
  20. var a = Object.getOwnPropertyDescriptor(e, r);
  21. Object.defineProperty(n, r, a.get ? a : {
  22. enumerable: !0,
  23. get: function() {
  24. return e[r];
  25. }
  26. });
  27. }), n;
  28. }
  29. var ii = { exports: {} }, ta = {};
  30. /**
  31. * @license React
  32. * react-jsx-runtime.production.min.js
  33. *
  34. * Copyright (c) Facebook, Inc. and its affiliates.
  35. *
  36. * This source code is licensed under the MIT license found in the
  37. * LICENSE file in the root directory of this source tree.
  38. */
  39. var rl;
  40. function sv() {
  41. if (rl) return ta;
  42. rl = 1;
  43. var e = me, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
  44. function i(u, l, c) {
  45. var s, v = {}, C = null, p = null;
  46. c !== void 0 && (C = "" + c), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (p = l.ref);
  47. for (s in l) r.call(l, s) && !o.hasOwnProperty(s) && (v[s] = l[s]);
  48. if (u && u.defaultProps) for (s in l = u.defaultProps, l) v[s] === void 0 && (v[s] = l[s]);
  49. return { $$typeof: t, type: u, key: C, ref: p, props: v, _owner: a.current };
  50. }
  51. return ta.Fragment = n, ta.jsx = i, ta.jsxs = i, ta;
  52. }
  53. var al;
  54. function cv() {
  55. return al || (al = 1, ii.exports = sv()), ii.exports;
  56. }
  57. var q = cv();
  58. function Cc(e) {
  59. var t, n, r = "";
  60. if (typeof e == "string" || typeof e == "number") r += e;
  61. else if (typeof e == "object") if (Array.isArray(e)) {
  62. var a = e.length;
  63. for (t = 0; t < a; t++) e[t] && (n = Cc(e[t])) && (r && (r += " "), r += n);
  64. } else for (n in e) e[n] && (r && (r += " "), r += n);
  65. return r;
  66. }
  67. function jt() {
  68. for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = Cc(e)) && (r && (r += " "), r += t);
  69. return r;
  70. }
  71. const dv = "univer-avatar", fv = "univer-avatar-square", vv = "univer-avatar-circle", mv = "univer-avatar-middle", pv = "univer-avatar-small", hv = "univer-avatar-image", Dr = {
  72. avatar: dv,
  73. avatarSquare: fv,
  74. avatarCircle: vv,
  75. avatarMiddle: mv,
  76. avatarSmall: pv,
  77. avatarImage: hv
  78. };
  79. function OO(e) {
  80. const {
  81. children: t,
  82. style: n,
  83. title: r,
  84. alt: a,
  85. shape: o = "circle",
  86. size: i = "middle",
  87. src: u,
  88. fit: l = "fill",
  89. onError: c,
  90. onLoad: s
  91. } = e, v = typeof i == "number" ? {
  92. width: `${i}px`,
  93. height: `${i}px`,
  94. lineHeight: `${i}px`
  95. } : {}, C = jt(Dr.avatar, {
  96. [Dr.avatarCircle]: o === "circle",
  97. [Dr.avatarSquare]: o === "square",
  98. [Dr.avatarImage]: u,
  99. [Dr.avatarMiddle]: i === "middle",
  100. [Dr.avatarSmall]: i === "small"
  101. }), p = { objectFit: l };
  102. return u ? /* @__PURE__ */ q.jsxs("span", { className: C, style: { ...v, ...n, ...p }, children: [
  103. /* @__PURE__ */ q.jsx("img", { src: u, title: r, alt: a, onError: c, onLoad: s }),
  104. t
  105. ] }) : /* @__PURE__ */ q.jsx("span", { className: C, style: { ...v, ...n }, children: t });
  106. }
  107. const gv = "univer-button", yv = "univer-button-default", bv = "univer-button-primary", Cv = "univer-button-text", Sv = "univer-button-link", wv = "univer-button-small", xv = "univer-button-middle", Ev = "univer-button-large", Rv = "univer-button-block", An = {
  108. button: gv,
  109. buttonDefault: yv,
  110. buttonPrimary: bv,
  111. buttonText: Cv,
  112. buttonLink: Sv,
  113. buttonSmall: wv,
  114. buttonMiddle: xv,
  115. buttonLarge: Ev,
  116. buttonBlock: Rv
  117. };
  118. function Po(e) {
  119. const {
  120. children: t,
  121. className: n,
  122. style: r,
  123. type: a = "default",
  124. size: o = "middle",
  125. block: i,
  126. htmlType: u,
  127. disabled: l = !1,
  128. onClick: c,
  129. ...s
  130. } = e, v = jt(
  131. An.button,
  132. {
  133. [An.buttonPrimary]: a === "primary",
  134. [An.buttonDefault]: a === "default",
  135. [An.buttonText]: a === "text",
  136. [An.buttonLink]: a === "link",
  137. [An.buttonSmall]: o === "small",
  138. [An.buttonMiddle]: o === "middle",
  139. [An.buttonLarge]: o === "large",
  140. [An.buttonBlock]: i
  141. },
  142. n
  143. );
  144. return /* @__PURE__ */ q.jsx(
  145. "button",
  146. {
  147. className: v,
  148. style: r,
  149. type: u,
  150. onClick: c,
  151. disabled: l,
  152. ...s,
  153. children: t
  154. }
  155. );
  156. }
  157. var Cn = function() {
  158. return Cn = Object.assign || function(e) {
  159. for (var t, n = 1, r = arguments.length; n < r; n++) {
  160. t = arguments[n];
  161. for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
  162. }
  163. return e;
  164. }, Cn.apply(this, arguments);
  165. }, Pv = function(e, t) {
  166. var n = {};
  167. for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  168. if (e != null && typeof Object.getOwnPropertySymbols == "function")
  169. for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
  170. t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
  171. return n;
  172. }, Zt = $t(function(e, t) {
  173. var n = e.icon, r = e.id, a = e.className, o = e.extend, i = Pv(e, ["icon", "id", "className", "extend"]), u = "univerjs-icon univerjs-icon-".concat(r, " ").concat(a || "").trim(), l = Ce("_".concat(Dv()));
  174. return Sc(n, "".concat(r), { defIds: n.defIds, idSuffix: l.current }, Cn({ ref: t, className: u }, i), o);
  175. });
  176. function Sc(e, t, n, r, a) {
  177. return Xt(e.tag, Cn(Cn({ key: t }, Mv(e, n, a)), r), (kv(e, n).children || []).map(function(o, i) {
  178. return Sc(o, "".concat(t, "-").concat(e.tag, "-").concat(i), n, void 0, a);
  179. }));
  180. }
  181. function Mv(e, t, n) {
  182. var r = Cn({}, e.attrs);
  183. n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
  184. var a = t.defIds;
  185. return !a || a.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(function(o) {
  186. var i = o[0], u = o[1];
  187. typeof u == "string" && (r[i] = u.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
  188. })), r;
  189. }
  190. function kv(e, t) {
  191. var n, r = t.defIds;
  192. return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? Cn(Cn({}, e), { children: e.children.map(function(a) {
  193. return typeof a.attrs.id == "string" && r && r.indexOf(a.attrs.id) > -1 ? Cn(Cn({}, a), { attrs: Cn(Cn({}, a.attrs), { id: a.attrs.id + t.idSuffix }) }) : a;
  194. }) }) : e;
  195. }
  196. function Dv() {
  197. return Math.random().toString(36).substring(2, 8);
  198. }
  199. Zt.displayName = "UniverIcon";
  200. var Nv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327 12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327zM4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327 4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327 7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898zM8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592 12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592zM4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592 4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592 7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wc = $t(function(e, t) {
  201. return Xt(Zt, Object.assign({}, e, {
  202. id: "calendar-single",
  203. ref: t,
  204. icon: Nv
  205. }));
  206. });
  207. wc.displayName = "CalendarSingle";
  208. var Iv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ao = $t(function(e, t) {
  209. return Xt(Zt, Object.assign({}, e, {
  210. id: "check-mark-single",
  211. ref: t,
  212. icon: Iv
  213. }));
  214. });
  215. Ao.displayName = "CheckMarkSingle";
  216. var Ov = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.52892 2.86201C7.78927 2.60166 8.21138 2.60166 8.47173 2.86201L11.1384 5.52868C11.3987 5.78903 11.3987 6.21114 11.1384 6.47149C10.878 6.73184 10.4559 6.73184 10.1956 6.47149L8.00033 4.27622L5.80506 6.47149C5.54471 6.73184 5.1226 6.73184 4.86225 6.47149C4.6019 6.21114 4.6019 5.78903 4.86225 5.52868L7.52892 2.86201ZM4.86225 9.52868C5.1226 9.26833 5.54471 9.26833 5.80506 9.52868L8.00033 11.7239L10.1956 9.52868C10.4559 9.26833 10.878 9.26833 11.1384 9.52868C11.3987 9.78903 11.3987 10.2111 11.1384 10.4715L8.47173 13.1382C8.21138 13.3985 7.78927 13.3985 7.52892 13.1382L4.86225 10.4715C4.6019 10.2111 4.6019 9.78903 4.86225 9.52868Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, xc = $t(function(e, t) {
  217. return Xt(Zt, Object.assign({}, e, {
  218. id: "chevron-sort-single",
  219. ref: t,
  220. icon: Ov
  221. }));
  222. });
  223. xc.displayName = "ChevronSortSingle";
  224. var _v = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z" } }] }, gu = $t(function(e, t) {
  225. return Xt(Zt, Object.assign({}, e, {
  226. id: "close-single",
  227. ref: t,
  228. icon: _v
  229. }));
  230. });
  231. gu.displayName = "CloseSingle";
  232. var Lv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_371_77", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#DCDCDC", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_371_77)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z" } }] }] }, Ec = $t(function(e, t) {
  233. return Xt(Zt, Object.assign({}, e, {
  234. id: "dropdown-single",
  235. ref: t,
  236. icon: Lv
  237. }));
  238. });
  239. Ec.displayName = "DropdownSingle";
  240. var Tv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rc = $t(function(e, t) {
  241. return Xt(Zt, Object.assign({}, e, {
  242. id: "error-single",
  243. ref: t,
  244. icon: Tv
  245. }));
  246. });
  247. Rc.displayName = "ErrorSingle";
  248. var $v = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Pc = $t(function(e, t) {
  249. return Xt(Zt, Object.assign({}, e, {
  250. id: "increase-single",
  251. ref: t,
  252. icon: $v
  253. }));
  254. });
  255. Pc.displayName = "IncreaseSingle";
  256. var Av = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z" } }] }, Mc = $t(function(e, t) {
  257. return Xt(Zt, Object.assign({}, e, {
  258. id: "info-single",
  259. ref: t,
  260. icon: Av
  261. }));
  262. });
  263. Mc.displayName = "InfoSingle";
  264. var jv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M8.00695 14.9998C8.00461 14.9999 8.00227 14.9999 7.99993 14.9999C4.13397 14.9999 1 11.8659 1 7.99995C1 4.13624 4.13035 1.00365 7.99321 1.00003C7.9955 1.00001 7.99779 1 8.00008 1C11.866 1 15 4.13397 15 7.99993C15 11.8636 11.8697 14.9961 8.00695 14.9998ZM13.3569 8.01503C13.3568 8.01001 13.3568 8.00499 13.3568 7.99995C13.3568 5.04144 10.9584 2.64309 7.99993 2.64309C5.04645 2.64309 2.65123 5.03327 2.64308 7.98484C2.64317 7.98986 2.64322 7.99489 2.64322 7.99993C2.64322 10.9584 5.04157 13.3568 8.00008 13.3568C10.9536 13.3568 13.3488 10.9666 13.3569 8.01503Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M7.17852 1.82153C7.17852 1.36781 7.54633 1 8.00005 1C11.866 1 15 4.13397 15 7.99993C15 11.8659 11.866 14.9999 8.00005 14.9999C4.1341 14.9999 1.00012 11.8659 1.00012 7.99993C1.00012 7.54621 1.36793 7.1784 1.82165 7.1784C2.27537 7.1784 2.64318 7.54621 2.64318 7.99993C2.64318 10.9584 5.04153 13.3568 8.00005 13.3568C10.9586 13.3568 13.3569 10.9584 13.3569 7.99993C13.3569 5.04141 10.9586 2.64306 8.00005 2.64306C7.54633 2.64306 7.17852 2.27525 7.17852 1.82153Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, kc = $t(function(e, t) {
  265. return Xt(Zt, Object.assign({}, e, {
  266. id: "loading",
  267. ref: t,
  268. icon: jv
  269. }));
  270. });
  271. kc.displayName = "Loading";
  272. var Fv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Dc = $t(function(e, t) {
  273. return Xt(Zt, Object.assign({}, e, {
  274. id: "more-down-single",
  275. ref: t,
  276. icon: Fv
  277. }));
  278. });
  279. Dc.displayName = "MoreDownSingle";
  280. var zv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Nc = $t(function(e, t) {
  281. return Xt(Zt, Object.assign({}, e, {
  282. id: "more-left-single",
  283. ref: t,
  284. icon: zv
  285. }));
  286. });
  287. Nc.displayName = "MoreLeftSingle";
  288. var Hv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ic = $t(function(e, t) {
  289. return Xt(Zt, Object.assign({}, e, {
  290. id: "more-right-single",
  291. ref: t,
  292. icon: Hv
  293. }));
  294. });
  295. Ic.displayName = "MoreRightSingle";
  296. var Vv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oc = $t(function(e, t) {
  297. return Xt(Zt, Object.assign({}, e, {
  298. id: "more-up-single",
  299. ref: t,
  300. icon: Vv
  301. }));
  302. });
  303. Oc.displayName = "MoreUpSingle";
  304. var Wv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.3999 7.9999C1.3999 7.66853 1.66853 7.3999 1.9999 7.3999H13.9999C14.3313 7.3999 14.5999 7.66853 14.5999 7.9999C14.5999 8.33127 14.3313 8.5999 13.9999 8.5999H1.9999C1.66853 8.5999 1.3999 8.33127 1.3999 7.9999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _c = $t(function(e, t) {
  305. return Xt(Zt, Object.assign({}, e, {
  306. id: "reduce-single",
  307. ref: t,
  308. icon: Wv
  309. }));
  310. });
  311. _c.displayName = "ReduceSingle";
  312. var Bv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Lc = $t(function(e, t) {
  313. return Xt(Zt, Object.assign({}, e, {
  314. id: "success-single",
  315. ref: t,
  316. icon: Bv
  317. }));
  318. });
  319. Lc.displayName = "SuccessSingle";
  320. var Uv = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Tc = $t(function(e, t) {
  321. return Xt(Zt, Object.assign({}, e, {
  322. id: "warning-single",
  323. ref: t,
  324. icon: Uv
  325. }));
  326. });
  327. Tc.displayName = "WarningSingle";
  328. var Ka = {}, ol;
  329. function qv() {
  330. if (ol) return Ka;
  331. ol = 1, Object.defineProperty(Ka, "__esModule", {
  332. value: !0
  333. }), Ka.default = e;
  334. function e() {
  335. return !!(typeof window < "u" && window.document && window.document.createElement);
  336. }
  337. return Ka;
  338. }
  339. var Kv = qv();
  340. const Kr = /* @__PURE__ */ Aa(Kv), In = hu({
  341. mountContainer: Kr() ? document.body : null
  342. });
  343. function _O(e) {
  344. const { children: t, locale: n, mountContainer: r } = e, a = Ht(() => ({
  345. locale: n,
  346. mountContainer: r
  347. }), [n, r]);
  348. return /* @__PURE__ */ q.jsx(In.Provider, { value: a, children: t });
  349. }
  350. const Yv = "univer-cascader-list", Gv = "univer-cascader-list-board", Xv = "univer-cascader-list-item-active", Zv = "univer-cascader-list-option", Qv = "univer-cascader-list-check-mark", Jv = "univer-cascader-list-item", em = "univer-cascader-list-empty", Un = {
  351. cascaderList: Yv,
  352. cascaderListBoard: Gv,
  353. cascaderListItemActive: Xv,
  354. cascaderListOption: Zv,
  355. cascaderListCheckMark: Qv,
  356. cascaderListItem: Jv,
  357. cascaderListEmpty: em
  358. };
  359. function LO(e) {
  360. const { value: t, options: n = [], onChange: r } = e, { locale: a } = Sn(In), o = Ht(() => {
  361. const u = [n];
  362. return t.forEach((l, c) => {
  363. const s = u[c].find((v) => v.value === l);
  364. s != null && s.children && u.push(s.children);
  365. }), u;
  366. }, [t]);
  367. function i(u, l) {
  368. if (l === t[u])
  369. return;
  370. if (t[u + 1]) {
  371. const s = t.slice(0, u + 1);
  372. s[u] = l, r(s);
  373. return;
  374. }
  375. const c = [...t];
  376. c[u] = l, r(c);
  377. }
  378. return /* @__PURE__ */ q.jsxs("section", { className: Un.cascaderList, children: [
  379. o.map(
  380. (u, l) => u.length ? /* @__PURE__ */ q.jsx("ul", { className: Un.cascaderListBoard, children: u.map((c) => /* @__PURE__ */ q.jsx(
  381. "li",
  382. {
  383. className: jt(Un.cascaderListItem, {
  384. [Un.cascaderListItemActive]: c.value === t[l]
  385. }),
  386. children: /* @__PURE__ */ q.jsxs(
  387. "a",
  388. {
  389. className: Un.cascaderListOption,
  390. onClick: () => i(l, c.value),
  391. children: [
  392. /* @__PURE__ */ q.jsx("span", { className: Un.cascaderListCheckMark, children: c.value === t[l] && /* @__PURE__ */ q.jsx(Ao, {}) }),
  393. /* @__PURE__ */ q.jsx("span", { children: c.label })
  394. ]
  395. }
  396. )
  397. },
  398. c.value
  399. )) }, l) : /* @__PURE__ */ q.jsx("section", { className: Un.cascaderListEmpty, children: a == null ? void 0 : a.CascaderList.empty }, l)
  400. ),
  401. t.length <= 0 && /* @__PURE__ */ q.jsx("section", { className: Un.cascaderListEmpty, children: a == null ? void 0 : a.CascaderList.empty })
  402. ] });
  403. }
  404. const tm = "univer-checkbox", nm = "univer-checkbox-target-input", rm = "univer-checkbox-target-inner", am = "univer-checkbox-disabled", om = "univer-checkbox-indeterminate", im = "univer-checkbox-target", Nr = {
  405. checkbox: tm,
  406. checkboxTargetInput: nm,
  407. checkboxTargetInner: rm,
  408. checkboxDisabled: am,
  409. checkboxIndeterminate: om,
  410. checkboxTarget: im
  411. };
  412. function um(e) {
  413. const { children: t, className: n, style: r, checked: a = !1, indeterminate: o = !1, value: i, disabled: u = !1, onChange: l, contentClassName: c } = e, s = Ce(null);
  414. function v(p) {
  415. var m, b;
  416. if (p.stopPropagation(), !(!l || u))
  417. if (typeof i < "u")
  418. l == null || l(i);
  419. else {
  420. const f = (b = (m = s == null ? void 0 : s.current) == null ? void 0 : m.checked) != null ? b : !1;
  421. l == null || l(f);
  422. }
  423. }
  424. const C = jt(n, Nr.checkbox, {
  425. [Nr.checkboxDisabled]: u,
  426. [Nr.checkboxIndeterminate]: o && !a
  427. });
  428. return /* @__PURE__ */ q.jsxs("label", { className: C, style: r, children: [
  429. /* @__PURE__ */ q.jsxs("span", { className: Nr.checkboxTarget, children: [
  430. /* @__PURE__ */ q.jsx(
  431. "input",
  432. {
  433. ref: s,
  434. className: Nr.checkboxTargetInput,
  435. type: "checkbox",
  436. checked: a,
  437. disabled: u,
  438. onChange: v
  439. }
  440. ),
  441. /* @__PURE__ */ q.jsx("span", { className: Nr.checkboxTargetInner })
  442. ] }),
  443. /* @__PURE__ */ q.jsx("span", { className: c, children: t })
  444. ] });
  445. }
  446. const lm = "univer-checkbox-group", sm = "univer-checkbox-group-direction-vertical", il = {
  447. checkboxGroup: lm,
  448. checkboxGroupDirectionVertical: sm
  449. };
  450. function TO(e) {
  451. const { children: t, className: n, style: r, value: a, disabled: o, direction: i = "horizontal", onChange: u } = e, l = (s) => {
  452. a.includes(s) ? u(a.filter((v) => v !== s)) : u([...a, s]);
  453. }, c = jt(n, il.checkboxGroup, {
  454. [il.checkboxGroupDirectionVertical]: i === "vertical"
  455. });
  456. return /* @__PURE__ */ q.jsx("div", { className: c, style: r, children: me.Children.map(t, (s, v) => me.isValidElement(s) ? me.cloneElement(s, {
  457. key: v,
  458. children: s.props.children,
  459. checked: s.props.value ? a.includes(s.props.value) : !1,
  460. disabled: o != null ? o : s.props.disabled,
  461. onChange: l
  462. }) : s) });
  463. }
  464. const Da = (e, t, n) => {
  465. t = t / 100, n = n / 100;
  466. const r = n * t, a = r * (1 - Math.abs(e / 60 % 2 - 1)), o = n - r;
  467. let i = 0, u = 0, l = 0;
  468. return e >= 0 && e < 60 ? (i = r, u = a, l = 0) : e >= 60 && e < 120 ? (i = a, u = r, l = 0) : e >= 120 && e < 180 ? (i = 0, u = r, l = a) : e >= 180 && e < 240 ? (i = 0, u = a, l = r) : e >= 240 && e < 300 ? (i = a, u = 0, l = r) : e >= 300 && e < 360 && (i = r, u = 0, l = a), [
  469. Math.round((i + o) * 255),
  470. Math.round((u + o) * 255),
  471. Math.round((l + o) * 255)
  472. ];
  473. }, $c = (e, t, n) => {
  474. const r = (a) => a.toString(16).padStart(2, "0");
  475. return `#${r(e)}${r(t)}${r(n)}`;
  476. }, Ac = (e, t, n) => {
  477. e /= 255, t /= 255, n /= 255;
  478. const r = Math.max(e, t, n), a = Math.min(e, t, n), o = r - a;
  479. let i = 0, u = 0;
  480. const l = r;
  481. return r !== 0 && (u = o / r), o !== 0 && (r === e ? i = (t - n) / o + (t < n ? 6 : 0) : r === t ? i = (n - e) / o + 2 : r === n && (i = (e - t) / o + 4), i *= 60), [
  482. i,
  483. u * 100,
  484. l * 100
  485. ];
  486. }, yu = (e) => {
  487. const [t, n, r] = e.match(/\w\w/g).map((a) => Number.parseInt(a, 16));
  488. return Ac(t, n, r);
  489. }, bu = (e, t, n) => {
  490. const [r, a, o] = Da(e, t, n);
  491. return $c(r, a, o);
  492. }, ul = (e, t, n) => {
  493. const r = (2 - t / 100) * n / 2, a = r && r < 50 ? t * n / (r * 2) : t + r;
  494. return [e, a, r];
  495. }, cm = (e, t, n) => {
  496. t /= 100, n /= 100;
  497. const r = n + t * Math.min(n, 1 - n), a = r === 0 ? 0 : 2 * (1 - n / r);
  498. return [
  499. e,
  500. // Hue remains the same
  501. Math.round(a * 100),
  502. // Convert S back to percentage
  503. Math.round(r * 100)
  504. // Convert V back to percentage
  505. ];
  506. }, dm = ({ hsv: e, alpha: t, onChange: n, onChanged: r }) => {
  507. const [a, o] = rt(!1), i = Ce(null), u = Ce(null), l = Ht(() => {
  508. var m, b;
  509. return (b = (m = u.current) == null ? void 0 : m.clientWidth) != null ? b : 0;
  510. }, [u.current]), c = Ot((m) => {
  511. const b = i.current;
  512. if (!b) return;
  513. const f = b.getBoundingClientRect(), h = f.width - l, g = Math.max(0, Math.min(m - f.left, h));
  514. n(Math.round(g / h * 100) / 100);
  515. }, [n]), s = Ot((m) => {
  516. a && c(m.clientX);
  517. }, [a, c]), v = Ot(() => {
  518. o(!1), r == null || r(t);
  519. }, [t]);
  520. lt(() => (a && (window.addEventListener("pointermove", s), window.addEventListener("pointerup", v), window.addEventListener("mouseup", v)), () => {
  521. window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", v), window.removeEventListener("mouseup", v);
  522. }), [a, s, v]);
  523. const C = () => {
  524. var b;
  525. return `${Math.min(Math.max(t * 100, 0), 100) / 100 * (100 - l / ((b = i.current) == null ? void 0 : b.clientWidth) * 100)}%`;
  526. }, p = Da(...e);
  527. return /* @__PURE__ */ q.jsxs("div", { className: "univer-relative univer-w-full univer-select-none", children: [
  528. /* @__PURE__ */ q.jsx(
  529. "div",
  530. {
  531. className: "univer-absolute univer-inset-0 univer-rounded-full",
  532. style: {
  533. backgroundImage: "linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)",
  534. backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0",
  535. backgroundSize: "8px 8px"
  536. }
  537. }
  538. ),
  539. /* @__PURE__ */ q.jsx(
  540. "div",
  541. {
  542. ref: i,
  543. className: `
  544. univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
  545. `,
  546. style: {
  547. background: `linear-gradient(to right, transparent, rgb(${p}))`
  548. },
  549. onPointerDown: (m) => {
  550. o(!0), c(m.clientX);
  551. },
  552. children: /* @__PURE__ */ q.jsx(
  553. "div",
  554. {
  555. ref: u,
  556. className: `
  557. univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
  558. univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
  559. univer-duration-75 univer-will-change-transform
  560. `,
  561. style: {
  562. left: C(),
  563. transform: "translateY(-50%)",
  564. transition: a ? "none" : "all 0.1s ease-out"
  565. }
  566. }
  567. )
  568. }
  569. )
  570. ] });
  571. }, Cu = "-", fm = (e) => {
  572. const t = mm(e), {
  573. conflictingClassGroups: n,
  574. conflictingClassGroupModifiers: r
  575. } = e;
  576. return {
  577. getClassGroupId: (i) => {
  578. const u = i.split(Cu);
  579. return u[0] === "" && u.length !== 1 && u.shift(), jc(u, t) || vm(i);
  580. },
  581. getConflictingClassGroupIds: (i, u) => {
  582. const l = n[i] || [];
  583. return u && r[i] ? [...l, ...r[i]] : l;
  584. }
  585. };
  586. }, jc = (e, t) => {
  587. var i;
  588. if (e.length === 0)
  589. return t.classGroupId;
  590. const n = e[0], r = t.nextPart.get(n), a = r ? jc(e.slice(1), r) : void 0;
  591. if (a)
  592. return a;
  593. if (t.validators.length === 0)
  594. return;
  595. const o = e.join(Cu);
  596. return (i = t.validators.find(({
  597. validator: u
  598. }) => u(o))) == null ? void 0 : i.classGroupId;
  599. }, ll = /^\[(.+)\]$/, vm = (e) => {
  600. if (ll.test(e)) {
  601. const t = ll.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
  602. if (n)
  603. return "arbitrary.." + n;
  604. }
  605. }, mm = (e) => {
  606. const {
  607. theme: t,
  608. prefix: n
  609. } = e, r = {
  610. nextPart: /* @__PURE__ */ new Map(),
  611. validators: []
  612. };
  613. return hm(Object.entries(e.classGroups), n).forEach(([o, i]) => {
  614. Ni(i, r, o, t);
  615. }), r;
  616. }, Ni = (e, t, n, r) => {
  617. e.forEach((a) => {
  618. if (typeof a == "string") {
  619. const o = a === "" ? t : sl(t, a);
  620. o.classGroupId = n;
  621. return;
  622. }
  623. if (typeof a == "function") {
  624. if (pm(a)) {
  625. Ni(a(r), t, n, r);
  626. return;
  627. }
  628. t.validators.push({
  629. validator: a,
  630. classGroupId: n
  631. });
  632. return;
  633. }
  634. Object.entries(a).forEach(([o, i]) => {
  635. Ni(i, sl(t, o), n, r);
  636. });
  637. });
  638. }, sl = (e, t) => {
  639. let n = e;
  640. return t.split(Cu).forEach((r) => {
  641. n.nextPart.has(r) || n.nextPart.set(r, {
  642. nextPart: /* @__PURE__ */ new Map(),
  643. validators: []
  644. }), n = n.nextPart.get(r);
  645. }), n;
  646. }, pm = (e) => e.isThemeGetter, hm = (e, t) => t ? e.map(([n, r]) => {
  647. const a = r.map((o) => typeof o == "string" ? t + o : typeof o == "object" ? Object.fromEntries(Object.entries(o).map(([i, u]) => [t + i, u])) : o);
  648. return [n, a];
  649. }) : e, gm = (e) => {
  650. if (e < 1)
  651. return {
  652. get: () => {
  653. },
  654. set: () => {
  655. }
  656. };
  657. let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
  658. const a = (o, i) => {
  659. n.set(o, i), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map());
  660. };
  661. return {
  662. get(o) {
  663. let i = n.get(o);
  664. if (i !== void 0)
  665. return i;
  666. if ((i = r.get(o)) !== void 0)
  667. return a(o, i), i;
  668. },
  669. set(o, i) {
  670. n.has(o) ? n.set(o, i) : a(o, i);
  671. }
  672. };
  673. }, Fc = "!", ym = (e) => {
  674. const {
  675. separator: t,
  676. experimentalParseClassName: n
  677. } = e, r = t.length === 1, a = t[0], o = t.length, i = (u) => {
  678. const l = [];
  679. let c = 0, s = 0, v;
  680. for (let f = 0; f < u.length; f++) {
  681. let h = u[f];
  682. if (c === 0) {
  683. if (h === a && (r || u.slice(f, f + o) === t)) {
  684. l.push(u.slice(s, f)), s = f + o;
  685. continue;
  686. }
  687. if (h === "/") {
  688. v = f;
  689. continue;
  690. }
  691. }
  692. h === "[" ? c++ : h === "]" && c--;
  693. }
  694. const C = l.length === 0 ? u : u.substring(s), p = C.startsWith(Fc), m = p ? C.substring(1) : C, b = v && v > s ? v - s : void 0;
  695. return {
  696. modifiers: l,
  697. hasImportantModifier: p,
  698. baseClassName: m,
  699. maybePostfixModifierPosition: b
  700. };
  701. };
  702. return n ? (u) => n({
  703. className: u,
  704. parseClassName: i
  705. }) : i;
  706. }, bm = (e) => {
  707. if (e.length <= 1)
  708. return e;
  709. const t = [];
  710. let n = [];
  711. return e.forEach((r) => {
  712. r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
  713. }), t.push(...n.sort()), t;
  714. }, Cm = (e) => ({
  715. cache: gm(e.cacheSize),
  716. parseClassName: ym(e),
  717. ...fm(e)
  718. }), Sm = /\s+/, wm = (e, t) => {
  719. const {
  720. parseClassName: n,
  721. getClassGroupId: r,
  722. getConflictingClassGroupIds: a
  723. } = t, o = [], i = e.trim().split(Sm);
  724. let u = "";
  725. for (let l = i.length - 1; l >= 0; l -= 1) {
  726. const c = i[l], {
  727. modifiers: s,
  728. hasImportantModifier: v,
  729. baseClassName: C,
  730. maybePostfixModifierPosition: p
  731. } = n(c);
  732. let m = !!p, b = r(m ? C.substring(0, p) : C);
  733. if (!b) {
  734. if (!m) {
  735. u = c + (u.length > 0 ? " " + u : u);
  736. continue;
  737. }
  738. if (b = r(C), !b) {
  739. u = c + (u.length > 0 ? " " + u : u);
  740. continue;
  741. }
  742. m = !1;
  743. }
  744. const f = bm(s).join(":"), h = v ? f + Fc : f, g = h + b;
  745. if (o.includes(g))
  746. continue;
  747. o.push(g);
  748. const y = a(b, m);
  749. for (let w = 0; w < y.length; ++w) {
  750. const E = y[w];
  751. o.push(h + E);
  752. }
  753. u = c + (u.length > 0 ? " " + u : u);
  754. }
  755. return u;
  756. };
  757. function xm() {
  758. let e = 0, t, n, r = "";
  759. for (; e < arguments.length; )
  760. (t = arguments[e++]) && (n = zc(t)) && (r && (r += " "), r += n);
  761. return r;
  762. }
  763. const zc = (e) => {
  764. if (typeof e == "string")
  765. return e;
  766. let t, n = "";
  767. for (let r = 0; r < e.length; r++)
  768. e[r] && (t = zc(e[r])) && (n && (n += " "), n += t);
  769. return n;
  770. };
  771. function Em(e, ...t) {
  772. let n, r, a, o = i;
  773. function i(l) {
  774. const c = t.reduce((s, v) => v(s), e());
  775. return n = Cm(c), r = n.cache.get, a = n.cache.set, o = u, u(l);
  776. }
  777. function u(l) {
  778. const c = r(l);
  779. if (c)
  780. return c;
  781. const s = wm(l, n);
  782. return a(l, s), s;
  783. }
  784. return function() {
  785. return o(xm.apply(null, arguments));
  786. };
  787. }
  788. const Pt = (e) => {
  789. const t = (n) => n[e] || [];
  790. return t.isThemeGetter = !0, t;
  791. }, Hc = /^\[(?:([a-z-]+):)?(.+)\]$/i, Rm = /^\d+\/\d+$/, Pm = /* @__PURE__ */ new Set(["px", "full", "screen"]), Mm = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, km = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Dm = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Nm = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Im = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, jn = (e) => Vr(e) || Pm.has(e) || Rm.test(e), qn = (e) => Yr(e, "length", Fm), Vr = (e) => !!e && !Number.isNaN(Number(e)), ui = (e) => Yr(e, "number", Vr), na = (e) => !!e && Number.isInteger(Number(e)), Om = (e) => e.endsWith("%") && Vr(e.slice(0, -1)), ot = (e) => Hc.test(e), Kn = (e) => Mm.test(e), _m = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Lm = (e) => Yr(e, _m, Vc), Tm = (e) => Yr(e, "position", Vc), $m = /* @__PURE__ */ new Set(["image", "url"]), Am = (e) => Yr(e, $m, Hm), jm = (e) => Yr(e, "", zm), ra = () => !0, Yr = (e, t, n) => {
  792. const r = Hc.exec(e);
  793. return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
  794. }, Fm = (e) => (
  795. // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
  796. // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
  797. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
  798. km.test(e) && !Dm.test(e)
  799. ), Vc = () => !1, zm = (e) => Nm.test(e), Hm = (e) => Im.test(e), Vm = () => {
  800. const e = Pt("colors"), t = Pt("spacing"), n = Pt("blur"), r = Pt("brightness"), a = Pt("borderColor"), o = Pt("borderRadius"), i = Pt("borderSpacing"), u = Pt("borderWidth"), l = Pt("contrast"), c = Pt("grayscale"), s = Pt("hueRotate"), v = Pt("invert"), C = Pt("gap"), p = Pt("gradientColorStops"), m = Pt("gradientColorStopPositions"), b = Pt("inset"), f = Pt("margin"), h = Pt("opacity"), g = Pt("padding"), y = Pt("saturate"), w = Pt("scale"), E = Pt("sepia"), S = Pt("skew"), x = Pt("space"), R = Pt("translate"), k = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", ot, t], N = () => [ot, t], F = () => ["", jn, qn], I = () => ["auto", Vr, ot], T = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], P = () => ["solid", "dashed", "dotted", "double", "none"], z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], A = () => ["", "0", ot], H = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], $ = () => [Vr, ot];
  801. return {
  802. cacheSize: 500,
  803. separator: ":",
  804. theme: {
  805. colors: [ra],
  806. spacing: [jn, qn],
  807. blur: ["none", "", Kn, ot],
  808. brightness: $(),
  809. borderColor: [e],
  810. borderRadius: ["none", "", "full", Kn, ot],
  811. borderSpacing: N(),
  812. borderWidth: F(),
  813. contrast: $(),
  814. grayscale: A(),
  815. hueRotate: $(),
  816. invert: A(),
  817. gap: N(),
  818. gradientColorStops: [e],
  819. gradientColorStopPositions: [Om, qn],
  820. inset: O(),
  821. margin: O(),
  822. opacity: $(),
  823. padding: N(),
  824. saturate: $(),
  825. scale: $(),
  826. sepia: A(),
  827. skew: $(),
  828. space: N(),
  829. translate: N()
  830. },
  831. classGroups: {
  832. // Layout
  833. /**
  834. * Aspect Ratio
  835. * @see https://tailwindcss.com/docs/aspect-ratio
  836. */
  837. aspect: [{
  838. aspect: ["auto", "square", "video", ot]
  839. }],
  840. /**
  841. * Container
  842. * @see https://tailwindcss.com/docs/container
  843. */
  844. container: ["container"],
  845. /**
  846. * Columns
  847. * @see https://tailwindcss.com/docs/columns
  848. */
  849. columns: [{
  850. columns: [Kn]
  851. }],
  852. /**
  853. * Break After
  854. * @see https://tailwindcss.com/docs/break-after
  855. */
  856. "break-after": [{
  857. "break-after": H()
  858. }],
  859. /**
  860. * Break Before
  861. * @see https://tailwindcss.com/docs/break-before
  862. */
  863. "break-before": [{
  864. "break-before": H()
  865. }],
  866. /**
  867. * Break Inside
  868. * @see https://tailwindcss.com/docs/break-inside
  869. */
  870. "break-inside": [{
  871. "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
  872. }],
  873. /**
  874. * Box Decoration Break
  875. * @see https://tailwindcss.com/docs/box-decoration-break
  876. */
  877. "box-decoration": [{
  878. "box-decoration": ["slice", "clone"]
  879. }],
  880. /**
  881. * Box Sizing
  882. * @see https://tailwindcss.com/docs/box-sizing
  883. */
  884. box: [{
  885. box: ["border", "content"]
  886. }],
  887. /**
  888. * Display
  889. * @see https://tailwindcss.com/docs/display
  890. */
  891. display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
  892. /**
  893. * Floats
  894. * @see https://tailwindcss.com/docs/float
  895. */
  896. float: [{
  897. float: ["right", "left", "none", "start", "end"]
  898. }],
  899. /**
  900. * Clear
  901. * @see https://tailwindcss.com/docs/clear
  902. */
  903. clear: [{
  904. clear: ["left", "right", "both", "none", "start", "end"]
  905. }],
  906. /**
  907. * Isolation
  908. * @see https://tailwindcss.com/docs/isolation
  909. */
  910. isolation: ["isolate", "isolation-auto"],
  911. /**
  912. * Object Fit
  913. * @see https://tailwindcss.com/docs/object-fit
  914. */
  915. "object-fit": [{
  916. object: ["contain", "cover", "fill", "none", "scale-down"]
  917. }],
  918. /**
  919. * Object Position
  920. * @see https://tailwindcss.com/docs/object-position
  921. */
  922. "object-position": [{
  923. object: [...T(), ot]
  924. }],
  925. /**
  926. * Overflow
  927. * @see https://tailwindcss.com/docs/overflow
  928. */
  929. overflow: [{
  930. overflow: L()
  931. }],
  932. /**
  933. * Overflow X
  934. * @see https://tailwindcss.com/docs/overflow
  935. */
  936. "overflow-x": [{
  937. "overflow-x": L()
  938. }],
  939. /**
  940. * Overflow Y
  941. * @see https://tailwindcss.com/docs/overflow
  942. */
  943. "overflow-y": [{
  944. "overflow-y": L()
  945. }],
  946. /**
  947. * Overscroll Behavior
  948. * @see https://tailwindcss.com/docs/overscroll-behavior
  949. */
  950. overscroll: [{
  951. overscroll: k()
  952. }],
  953. /**
  954. * Overscroll Behavior X
  955. * @see https://tailwindcss.com/docs/overscroll-behavior
  956. */
  957. "overscroll-x": [{
  958. "overscroll-x": k()
  959. }],
  960. /**
  961. * Overscroll Behavior Y
  962. * @see https://tailwindcss.com/docs/overscroll-behavior
  963. */
  964. "overscroll-y": [{
  965. "overscroll-y": k()
  966. }],
  967. /**
  968. * Position
  969. * @see https://tailwindcss.com/docs/position
  970. */
  971. position: ["static", "fixed", "absolute", "relative", "sticky"],
  972. /**
  973. * Top / Right / Bottom / Left
  974. * @see https://tailwindcss.com/docs/top-right-bottom-left
  975. */
  976. inset: [{
  977. inset: [b]
  978. }],
  979. /**
  980. * Right / Left
  981. * @see https://tailwindcss.com/docs/top-right-bottom-left
  982. */
  983. "inset-x": [{
  984. "inset-x": [b]
  985. }],
  986. /**
  987. * Top / Bottom
  988. * @see https://tailwindcss.com/docs/top-right-bottom-left
  989. */
  990. "inset-y": [{
  991. "inset-y": [b]
  992. }],
  993. /**
  994. * Start
  995. * @see https://tailwindcss.com/docs/top-right-bottom-left
  996. */
  997. start: [{
  998. start: [b]
  999. }],
  1000. /**
  1001. * End
  1002. * @see https://tailwindcss.com/docs/top-right-bottom-left
  1003. */
  1004. end: [{
  1005. end: [b]
  1006. }],
  1007. /**
  1008. * Top
  1009. * @see https://tailwindcss.com/docs/top-right-bottom-left
  1010. */
  1011. top: [{
  1012. top: [b]
  1013. }],
  1014. /**
  1015. * Right
  1016. * @see https://tailwindcss.com/docs/top-right-bottom-left
  1017. */
  1018. right: [{
  1019. right: [b]
  1020. }],
  1021. /**
  1022. * Bottom
  1023. * @see https://tailwindcss.com/docs/top-right-bottom-left
  1024. */
  1025. bottom: [{
  1026. bottom: [b]
  1027. }],
  1028. /**
  1029. * Left
  1030. * @see https://tailwindcss.com/docs/top-right-bottom-left
  1031. */
  1032. left: [{
  1033. left: [b]
  1034. }],
  1035. /**
  1036. * Visibility
  1037. * @see https://tailwindcss.com/docs/visibility
  1038. */
  1039. visibility: ["visible", "invisible", "collapse"],
  1040. /**
  1041. * Z-Index
  1042. * @see https://tailwindcss.com/docs/z-index
  1043. */
  1044. z: [{
  1045. z: ["auto", na, ot]
  1046. }],
  1047. // Flexbox and Grid
  1048. /**
  1049. * Flex Basis
  1050. * @see https://tailwindcss.com/docs/flex-basis
  1051. */
  1052. basis: [{
  1053. basis: O()
  1054. }],
  1055. /**
  1056. * Flex Direction
  1057. * @see https://tailwindcss.com/docs/flex-direction
  1058. */
  1059. "flex-direction": [{
  1060. flex: ["row", "row-reverse", "col", "col-reverse"]
  1061. }],
  1062. /**
  1063. * Flex Wrap
  1064. * @see https://tailwindcss.com/docs/flex-wrap
  1065. */
  1066. "flex-wrap": [{
  1067. flex: ["wrap", "wrap-reverse", "nowrap"]
  1068. }],
  1069. /**
  1070. * Flex
  1071. * @see https://tailwindcss.com/docs/flex
  1072. */
  1073. flex: [{
  1074. flex: ["1", "auto", "initial", "none", ot]
  1075. }],
  1076. /**
  1077. * Flex Grow
  1078. * @see https://tailwindcss.com/docs/flex-grow
  1079. */
  1080. grow: [{
  1081. grow: A()
  1082. }],
  1083. /**
  1084. * Flex Shrink
  1085. * @see https://tailwindcss.com/docs/flex-shrink
  1086. */
  1087. shrink: [{
  1088. shrink: A()
  1089. }],
  1090. /**
  1091. * Order
  1092. * @see https://tailwindcss.com/docs/order
  1093. */
  1094. order: [{
  1095. order: ["first", "last", "none", na, ot]
  1096. }],
  1097. /**
  1098. * Grid Template Columns
  1099. * @see https://tailwindcss.com/docs/grid-template-columns
  1100. */
  1101. "grid-cols": [{
  1102. "grid-cols": [ra]
  1103. }],
  1104. /**
  1105. * Grid Column Start / End
  1106. * @see https://tailwindcss.com/docs/grid-column
  1107. */
  1108. "col-start-end": [{
  1109. col: ["auto", {
  1110. span: ["full", na, ot]
  1111. }, ot]
  1112. }],
  1113. /**
  1114. * Grid Column Start
  1115. * @see https://tailwindcss.com/docs/grid-column
  1116. */
  1117. "col-start": [{
  1118. "col-start": I()
  1119. }],
  1120. /**
  1121. * Grid Column End
  1122. * @see https://tailwindcss.com/docs/grid-column
  1123. */
  1124. "col-end": [{
  1125. "col-end": I()
  1126. }],
  1127. /**
  1128. * Grid Template Rows
  1129. * @see https://tailwindcss.com/docs/grid-template-rows
  1130. */
  1131. "grid-rows": [{
  1132. "grid-rows": [ra]
  1133. }],
  1134. /**
  1135. * Grid Row Start / End
  1136. * @see https://tailwindcss.com/docs/grid-row
  1137. */
  1138. "row-start-end": [{
  1139. row: ["auto", {
  1140. span: [na, ot]
  1141. }, ot]
  1142. }],
  1143. /**
  1144. * Grid Row Start
  1145. * @see https://tailwindcss.com/docs/grid-row
  1146. */
  1147. "row-start": [{
  1148. "row-start": I()
  1149. }],
  1150. /**
  1151. * Grid Row End
  1152. * @see https://tailwindcss.com/docs/grid-row
  1153. */
  1154. "row-end": [{
  1155. "row-end": I()
  1156. }],
  1157. /**
  1158. * Grid Auto Flow
  1159. * @see https://tailwindcss.com/docs/grid-auto-flow
  1160. */
  1161. "grid-flow": [{
  1162. "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
  1163. }],
  1164. /**
  1165. * Grid Auto Columns
  1166. * @see https://tailwindcss.com/docs/grid-auto-columns
  1167. */
  1168. "auto-cols": [{
  1169. "auto-cols": ["auto", "min", "max", "fr", ot]
  1170. }],
  1171. /**
  1172. * Grid Auto Rows
  1173. * @see https://tailwindcss.com/docs/grid-auto-rows
  1174. */
  1175. "auto-rows": [{
  1176. "auto-rows": ["auto", "min", "max", "fr", ot]
  1177. }],
  1178. /**
  1179. * Gap
  1180. * @see https://tailwindcss.com/docs/gap
  1181. */
  1182. gap: [{
  1183. gap: [C]
  1184. }],
  1185. /**
  1186. * Gap X
  1187. * @see https://tailwindcss.com/docs/gap
  1188. */
  1189. "gap-x": [{
  1190. "gap-x": [C]
  1191. }],
  1192. /**
  1193. * Gap Y
  1194. * @see https://tailwindcss.com/docs/gap
  1195. */
  1196. "gap-y": [{
  1197. "gap-y": [C]
  1198. }],
  1199. /**
  1200. * Justify Content
  1201. * @see https://tailwindcss.com/docs/justify-content
  1202. */
  1203. "justify-content": [{
  1204. justify: ["normal", ..._()]
  1205. }],
  1206. /**
  1207. * Justify Items
  1208. * @see https://tailwindcss.com/docs/justify-items
  1209. */
  1210. "justify-items": [{
  1211. "justify-items": ["start", "end", "center", "stretch"]
  1212. }],
  1213. /**
  1214. * Justify Self
  1215. * @see https://tailwindcss.com/docs/justify-self
  1216. */
  1217. "justify-self": [{
  1218. "justify-self": ["auto", "start", "end", "center", "stretch"]
  1219. }],
  1220. /**
  1221. * Align Content
  1222. * @see https://tailwindcss.com/docs/align-content
  1223. */
  1224. "align-content": [{
  1225. content: ["normal", ..._(), "baseline"]
  1226. }],
  1227. /**
  1228. * Align Items
  1229. * @see https://tailwindcss.com/docs/align-items
  1230. */
  1231. "align-items": [{
  1232. items: ["start", "end", "center", "baseline", "stretch"]
  1233. }],
  1234. /**
  1235. * Align Self
  1236. * @see https://tailwindcss.com/docs/align-self
  1237. */
  1238. "align-self": [{
  1239. self: ["auto", "start", "end", "center", "stretch", "baseline"]
  1240. }],
  1241. /**
  1242. * Place Content
  1243. * @see https://tailwindcss.com/docs/place-content
  1244. */
  1245. "place-content": [{
  1246. "place-content": [..._(), "baseline"]
  1247. }],
  1248. /**
  1249. * Place Items
  1250. * @see https://tailwindcss.com/docs/place-items
  1251. */
  1252. "place-items": [{
  1253. "place-items": ["start", "end", "center", "baseline", "stretch"]
  1254. }],
  1255. /**
  1256. * Place Self
  1257. * @see https://tailwindcss.com/docs/place-self
  1258. */
  1259. "place-self": [{
  1260. "place-self": ["auto", "start", "end", "center", "stretch"]
  1261. }],
  1262. // Spacing
  1263. /**
  1264. * Padding
  1265. * @see https://tailwindcss.com/docs/padding
  1266. */
  1267. p: [{
  1268. p: [g]
  1269. }],
  1270. /**
  1271. * Padding X
  1272. * @see https://tailwindcss.com/docs/padding
  1273. */
  1274. px: [{
  1275. px: [g]
  1276. }],
  1277. /**
  1278. * Padding Y
  1279. * @see https://tailwindcss.com/docs/padding
  1280. */
  1281. py: [{
  1282. py: [g]
  1283. }],
  1284. /**
  1285. * Padding Start
  1286. * @see https://tailwindcss.com/docs/padding
  1287. */
  1288. ps: [{
  1289. ps: [g]
  1290. }],
  1291. /**
  1292. * Padding End
  1293. * @see https://tailwindcss.com/docs/padding
  1294. */
  1295. pe: [{
  1296. pe: [g]
  1297. }],
  1298. /**
  1299. * Padding Top
  1300. * @see https://tailwindcss.com/docs/padding
  1301. */
  1302. pt: [{
  1303. pt: [g]
  1304. }],
  1305. /**
  1306. * Padding Right
  1307. * @see https://tailwindcss.com/docs/padding
  1308. */
  1309. pr: [{
  1310. pr: [g]
  1311. }],
  1312. /**
  1313. * Padding Bottom
  1314. * @see https://tailwindcss.com/docs/padding
  1315. */
  1316. pb: [{
  1317. pb: [g]
  1318. }],
  1319. /**
  1320. * Padding Left
  1321. * @see https://tailwindcss.com/docs/padding
  1322. */
  1323. pl: [{
  1324. pl: [g]
  1325. }],
  1326. /**
  1327. * Margin
  1328. * @see https://tailwindcss.com/docs/margin
  1329. */
  1330. m: [{
  1331. m: [f]
  1332. }],
  1333. /**
  1334. * Margin X
  1335. * @see https://tailwindcss.com/docs/margin
  1336. */
  1337. mx: [{
  1338. mx: [f]
  1339. }],
  1340. /**
  1341. * Margin Y
  1342. * @see https://tailwindcss.com/docs/margin
  1343. */
  1344. my: [{
  1345. my: [f]
  1346. }],
  1347. /**
  1348. * Margin Start
  1349. * @see https://tailwindcss.com/docs/margin
  1350. */
  1351. ms: [{
  1352. ms: [f]
  1353. }],
  1354. /**
  1355. * Margin End
  1356. * @see https://tailwindcss.com/docs/margin
  1357. */
  1358. me: [{
  1359. me: [f]
  1360. }],
  1361. /**
  1362. * Margin Top
  1363. * @see https://tailwindcss.com/docs/margin
  1364. */
  1365. mt: [{
  1366. mt: [f]
  1367. }],
  1368. /**
  1369. * Margin Right
  1370. * @see https://tailwindcss.com/docs/margin
  1371. */
  1372. mr: [{
  1373. mr: [f]
  1374. }],
  1375. /**
  1376. * Margin Bottom
  1377. * @see https://tailwindcss.com/docs/margin
  1378. */
  1379. mb: [{
  1380. mb: [f]
  1381. }],
  1382. /**
  1383. * Margin Left
  1384. * @see https://tailwindcss.com/docs/margin
  1385. */
  1386. ml: [{
  1387. ml: [f]
  1388. }],
  1389. /**
  1390. * Space Between X
  1391. * @see https://tailwindcss.com/docs/space
  1392. */
  1393. "space-x": [{
  1394. "space-x": [x]
  1395. }],
  1396. /**
  1397. * Space Between X Reverse
  1398. * @see https://tailwindcss.com/docs/space
  1399. */
  1400. "space-x-reverse": ["space-x-reverse"],
  1401. /**
  1402. * Space Between Y
  1403. * @see https://tailwindcss.com/docs/space
  1404. */
  1405. "space-y": [{
  1406. "space-y": [x]
  1407. }],
  1408. /**
  1409. * Space Between Y Reverse
  1410. * @see https://tailwindcss.com/docs/space
  1411. */
  1412. "space-y-reverse": ["space-y-reverse"],
  1413. // Sizing
  1414. /**
  1415. * Width
  1416. * @see https://tailwindcss.com/docs/width
  1417. */
  1418. w: [{
  1419. w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", ot, t]
  1420. }],
  1421. /**
  1422. * Min-Width
  1423. * @see https://tailwindcss.com/docs/min-width
  1424. */
  1425. "min-w": [{
  1426. "min-w": [ot, t, "min", "max", "fit"]
  1427. }],
  1428. /**
  1429. * Max-Width
  1430. * @see https://tailwindcss.com/docs/max-width
  1431. */
  1432. "max-w": [{
  1433. "max-w": [ot, t, "none", "full", "min", "max", "fit", "prose", {
  1434. screen: [Kn]
  1435. }, Kn]
  1436. }],
  1437. /**
  1438. * Height
  1439. * @see https://tailwindcss.com/docs/height
  1440. */
  1441. h: [{
  1442. h: [ot, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
  1443. }],
  1444. /**
  1445. * Min-Height
  1446. * @see https://tailwindcss.com/docs/min-height
  1447. */
  1448. "min-h": [{
  1449. "min-h": [ot, t, "min", "max", "fit", "svh", "lvh", "dvh"]
  1450. }],
  1451. /**
  1452. * Max-Height
  1453. * @see https://tailwindcss.com/docs/max-height
  1454. */
  1455. "max-h": [{
  1456. "max-h": [ot, t, "min", "max", "fit", "svh", "lvh", "dvh"]
  1457. }],
  1458. /**
  1459. * Size
  1460. * @see https://tailwindcss.com/docs/size
  1461. */
  1462. size: [{
  1463. size: [ot, t, "auto", "min", "max", "fit"]
  1464. }],
  1465. // Typography
  1466. /**
  1467. * Font Size
  1468. * @see https://tailwindcss.com/docs/font-size
  1469. */
  1470. "font-size": [{
  1471. text: ["base", Kn, qn]
  1472. }],
  1473. /**
  1474. * Font Smoothing
  1475. * @see https://tailwindcss.com/docs/font-smoothing
  1476. */
  1477. "font-smoothing": ["antialiased", "subpixel-antialiased"],
  1478. /**
  1479. * Font Style
  1480. * @see https://tailwindcss.com/docs/font-style
  1481. */
  1482. "font-style": ["italic", "not-italic"],
  1483. /**
  1484. * Font Weight
  1485. * @see https://tailwindcss.com/docs/font-weight
  1486. */
  1487. "font-weight": [{
  1488. font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", ui]
  1489. }],
  1490. /**
  1491. * Font Family
  1492. * @see https://tailwindcss.com/docs/font-family
  1493. */
  1494. "font-family": [{
  1495. font: [ra]
  1496. }],
  1497. /**
  1498. * Font Variant Numeric
  1499. * @see https://tailwindcss.com/docs/font-variant-numeric
  1500. */
  1501. "fvn-normal": ["normal-nums"],
  1502. /**
  1503. * Font Variant Numeric
  1504. * @see https://tailwindcss.com/docs/font-variant-numeric
  1505. */
  1506. "fvn-ordinal": ["ordinal"],
  1507. /**
  1508. * Font Variant Numeric
  1509. * @see https://tailwindcss.com/docs/font-variant-numeric
  1510. */
  1511. "fvn-slashed-zero": ["slashed-zero"],
  1512. /**
  1513. * Font Variant Numeric
  1514. * @see https://tailwindcss.com/docs/font-variant-numeric
  1515. */
  1516. "fvn-figure": ["lining-nums", "oldstyle-nums"],
  1517. /**
  1518. * Font Variant Numeric
  1519. * @see https://tailwindcss.com/docs/font-variant-numeric
  1520. */
  1521. "fvn-spacing": ["proportional-nums", "tabular-nums"],
  1522. /**
  1523. * Font Variant Numeric
  1524. * @see https://tailwindcss.com/docs/font-variant-numeric
  1525. */
  1526. "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
  1527. /**
  1528. * Letter Spacing
  1529. * @see https://tailwindcss.com/docs/letter-spacing
  1530. */
  1531. tracking: [{
  1532. tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", ot]
  1533. }],
  1534. /**
  1535. * Line Clamp
  1536. * @see https://tailwindcss.com/docs/line-clamp
  1537. */
  1538. "line-clamp": [{
  1539. "line-clamp": ["none", Vr, ui]
  1540. }],
  1541. /**
  1542. * Line Height
  1543. * @see https://tailwindcss.com/docs/line-height
  1544. */
  1545. leading: [{
  1546. leading: ["none", "tight", "snug", "normal", "relaxed", "loose", jn, ot]
  1547. }],
  1548. /**
  1549. * List Style Image
  1550. * @see https://tailwindcss.com/docs/list-style-image
  1551. */
  1552. "list-image": [{
  1553. "list-image": ["none", ot]
  1554. }],
  1555. /**
  1556. * List Style Type
  1557. * @see https://tailwindcss.com/docs/list-style-type
  1558. */
  1559. "list-style-type": [{
  1560. list: ["none", "disc", "decimal", ot]
  1561. }],
  1562. /**
  1563. * List Style Position
  1564. * @see https://tailwindcss.com/docs/list-style-position
  1565. */
  1566. "list-style-position": [{
  1567. list: ["inside", "outside"]
  1568. }],
  1569. /**
  1570. * Placeholder Color
  1571. * @deprecated since Tailwind CSS v3.0.0
  1572. * @see https://tailwindcss.com/docs/placeholder-color
  1573. */
  1574. "placeholder-color": [{
  1575. placeholder: [e]
  1576. }],
  1577. /**
  1578. * Placeholder Opacity
  1579. * @see https://tailwindcss.com/docs/placeholder-opacity
  1580. */
  1581. "placeholder-opacity": [{
  1582. "placeholder-opacity": [h]
  1583. }],
  1584. /**
  1585. * Text Alignment
  1586. * @see https://tailwindcss.com/docs/text-align
  1587. */
  1588. "text-alignment": [{
  1589. text: ["left", "center", "right", "justify", "start", "end"]
  1590. }],
  1591. /**
  1592. * Text Color
  1593. * @see https://tailwindcss.com/docs/text-color
  1594. */
  1595. "text-color": [{
  1596. text: [e]
  1597. }],
  1598. /**
  1599. * Text Opacity
  1600. * @see https://tailwindcss.com/docs/text-opacity
  1601. */
  1602. "text-opacity": [{
  1603. "text-opacity": [h]
  1604. }],
  1605. /**
  1606. * Text Decoration
  1607. * @see https://tailwindcss.com/docs/text-decoration
  1608. */
  1609. "text-decoration": ["underline", "overline", "line-through", "no-underline"],
  1610. /**
  1611. * Text Decoration Style
  1612. * @see https://tailwindcss.com/docs/text-decoration-style
  1613. */
  1614. "text-decoration-style": [{
  1615. decoration: [...P(), "wavy"]
  1616. }],
  1617. /**
  1618. * Text Decoration Thickness
  1619. * @see https://tailwindcss.com/docs/text-decoration-thickness
  1620. */
  1621. "text-decoration-thickness": [{
  1622. decoration: ["auto", "from-font", jn, qn]
  1623. }],
  1624. /**
  1625. * Text Underline Offset
  1626. * @see https://tailwindcss.com/docs/text-underline-offset
  1627. */
  1628. "underline-offset": [{
  1629. "underline-offset": ["auto", jn, ot]
  1630. }],
  1631. /**
  1632. * Text Decoration Color
  1633. * @see https://tailwindcss.com/docs/text-decoration-color
  1634. */
  1635. "text-decoration-color": [{
  1636. decoration: [e]
  1637. }],
  1638. /**
  1639. * Text Transform
  1640. * @see https://tailwindcss.com/docs/text-transform
  1641. */
  1642. "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
  1643. /**
  1644. * Text Overflow
  1645. * @see https://tailwindcss.com/docs/text-overflow
  1646. */
  1647. "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
  1648. /**
  1649. * Text Wrap
  1650. * @see https://tailwindcss.com/docs/text-wrap
  1651. */
  1652. "text-wrap": [{
  1653. text: ["wrap", "nowrap", "balance", "pretty"]
  1654. }],
  1655. /**
  1656. * Text Indent
  1657. * @see https://tailwindcss.com/docs/text-indent
  1658. */
  1659. indent: [{
  1660. indent: N()
  1661. }],
  1662. /**
  1663. * Vertical Alignment
  1664. * @see https://tailwindcss.com/docs/vertical-align
  1665. */
  1666. "vertical-align": [{
  1667. align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", ot]
  1668. }],
  1669. /**
  1670. * Whitespace
  1671. * @see https://tailwindcss.com/docs/whitespace
  1672. */
  1673. whitespace: [{
  1674. whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
  1675. }],
  1676. /**
  1677. * Word Break
  1678. * @see https://tailwindcss.com/docs/word-break
  1679. */
  1680. break: [{
  1681. break: ["normal", "words", "all", "keep"]
  1682. }],
  1683. /**
  1684. * Hyphens
  1685. * @see https://tailwindcss.com/docs/hyphens
  1686. */
  1687. hyphens: [{
  1688. hyphens: ["none", "manual", "auto"]
  1689. }],
  1690. /**
  1691. * Content
  1692. * @see https://tailwindcss.com/docs/content
  1693. */
  1694. content: [{
  1695. content: ["none", ot]
  1696. }],
  1697. // Backgrounds
  1698. /**
  1699. * Background Attachment
  1700. * @see https://tailwindcss.com/docs/background-attachment
  1701. */
  1702. "bg-attachment": [{
  1703. bg: ["fixed", "local", "scroll"]
  1704. }],
  1705. /**
  1706. * Background Clip
  1707. * @see https://tailwindcss.com/docs/background-clip
  1708. */
  1709. "bg-clip": [{
  1710. "bg-clip": ["border", "padding", "content", "text"]
  1711. }],
  1712. /**
  1713. * Background Opacity
  1714. * @deprecated since Tailwind CSS v3.0.0
  1715. * @see https://tailwindcss.com/docs/background-opacity
  1716. */
  1717. "bg-opacity": [{
  1718. "bg-opacity": [h]
  1719. }],
  1720. /**
  1721. * Background Origin
  1722. * @see https://tailwindcss.com/docs/background-origin
  1723. */
  1724. "bg-origin": [{
  1725. "bg-origin": ["border", "padding", "content"]
  1726. }],
  1727. /**
  1728. * Background Position
  1729. * @see https://tailwindcss.com/docs/background-position
  1730. */
  1731. "bg-position": [{
  1732. bg: [...T(), Tm]
  1733. }],
  1734. /**
  1735. * Background Repeat
  1736. * @see https://tailwindcss.com/docs/background-repeat
  1737. */
  1738. "bg-repeat": [{
  1739. bg: ["no-repeat", {
  1740. repeat: ["", "x", "y", "round", "space"]
  1741. }]
  1742. }],
  1743. /**
  1744. * Background Size
  1745. * @see https://tailwindcss.com/docs/background-size
  1746. */
  1747. "bg-size": [{
  1748. bg: ["auto", "cover", "contain", Lm]
  1749. }],
  1750. /**
  1751. * Background Image
  1752. * @see https://tailwindcss.com/docs/background-image
  1753. */
  1754. "bg-image": [{
  1755. bg: ["none", {
  1756. "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
  1757. }, Am]
  1758. }],
  1759. /**
  1760. * Background Color
  1761. * @see https://tailwindcss.com/docs/background-color
  1762. */
  1763. "bg-color": [{
  1764. bg: [e]
  1765. }],
  1766. /**
  1767. * Gradient Color Stops From Position
  1768. * @see https://tailwindcss.com/docs/gradient-color-stops
  1769. */
  1770. "gradient-from-pos": [{
  1771. from: [m]
  1772. }],
  1773. /**
  1774. * Gradient Color Stops Via Position
  1775. * @see https://tailwindcss.com/docs/gradient-color-stops
  1776. */
  1777. "gradient-via-pos": [{
  1778. via: [m]
  1779. }],
  1780. /**
  1781. * Gradient Color Stops To Position
  1782. * @see https://tailwindcss.com/docs/gradient-color-stops
  1783. */
  1784. "gradient-to-pos": [{
  1785. to: [m]
  1786. }],
  1787. /**
  1788. * Gradient Color Stops From
  1789. * @see https://tailwindcss.com/docs/gradient-color-stops
  1790. */
  1791. "gradient-from": [{
  1792. from: [p]
  1793. }],
  1794. /**
  1795. * Gradient Color Stops Via
  1796. * @see https://tailwindcss.com/docs/gradient-color-stops
  1797. */
  1798. "gradient-via": [{
  1799. via: [p]
  1800. }],
  1801. /**
  1802. * Gradient Color Stops To
  1803. * @see https://tailwindcss.com/docs/gradient-color-stops
  1804. */
  1805. "gradient-to": [{
  1806. to: [p]
  1807. }],
  1808. // Borders
  1809. /**
  1810. * Border Radius
  1811. * @see https://tailwindcss.com/docs/border-radius
  1812. */
  1813. rounded: [{
  1814. rounded: [o]
  1815. }],
  1816. /**
  1817. * Border Radius Start
  1818. * @see https://tailwindcss.com/docs/border-radius
  1819. */
  1820. "rounded-s": [{
  1821. "rounded-s": [o]
  1822. }],
  1823. /**
  1824. * Border Radius End
  1825. * @see https://tailwindcss.com/docs/border-radius
  1826. */
  1827. "rounded-e": [{
  1828. "rounded-e": [o]
  1829. }],
  1830. /**
  1831. * Border Radius Top
  1832. * @see https://tailwindcss.com/docs/border-radius
  1833. */
  1834. "rounded-t": [{
  1835. "rounded-t": [o]
  1836. }],
  1837. /**
  1838. * Border Radius Right
  1839. * @see https://tailwindcss.com/docs/border-radius
  1840. */
  1841. "rounded-r": [{
  1842. "rounded-r": [o]
  1843. }],
  1844. /**
  1845. * Border Radius Bottom
  1846. * @see https://tailwindcss.com/docs/border-radius
  1847. */
  1848. "rounded-b": [{
  1849. "rounded-b": [o]
  1850. }],
  1851. /**
  1852. * Border Radius Left
  1853. * @see https://tailwindcss.com/docs/border-radius
  1854. */
  1855. "rounded-l": [{
  1856. "rounded-l": [o]
  1857. }],
  1858. /**
  1859. * Border Radius Start Start
  1860. * @see https://tailwindcss.com/docs/border-radius
  1861. */
  1862. "rounded-ss": [{
  1863. "rounded-ss": [o]
  1864. }],
  1865. /**
  1866. * Border Radius Start End
  1867. * @see https://tailwindcss.com/docs/border-radius
  1868. */
  1869. "rounded-se": [{
  1870. "rounded-se": [o]
  1871. }],
  1872. /**
  1873. * Border Radius End End
  1874. * @see https://tailwindcss.com/docs/border-radius
  1875. */
  1876. "rounded-ee": [{
  1877. "rounded-ee": [o]
  1878. }],
  1879. /**
  1880. * Border Radius End Start
  1881. * @see https://tailwindcss.com/docs/border-radius
  1882. */
  1883. "rounded-es": [{
  1884. "rounded-es": [o]
  1885. }],
  1886. /**
  1887. * Border Radius Top Left
  1888. * @see https://tailwindcss.com/docs/border-radius
  1889. */
  1890. "rounded-tl": [{
  1891. "rounded-tl": [o]
  1892. }],
  1893. /**
  1894. * Border Radius Top Right
  1895. * @see https://tailwindcss.com/docs/border-radius
  1896. */
  1897. "rounded-tr": [{
  1898. "rounded-tr": [o]
  1899. }],
  1900. /**
  1901. * Border Radius Bottom Right
  1902. * @see https://tailwindcss.com/docs/border-radius
  1903. */
  1904. "rounded-br": [{
  1905. "rounded-br": [o]
  1906. }],
  1907. /**
  1908. * Border Radius Bottom Left
  1909. * @see https://tailwindcss.com/docs/border-radius
  1910. */
  1911. "rounded-bl": [{
  1912. "rounded-bl": [o]
  1913. }],
  1914. /**
  1915. * Border Width
  1916. * @see https://tailwindcss.com/docs/border-width
  1917. */
  1918. "border-w": [{
  1919. border: [u]
  1920. }],
  1921. /**
  1922. * Border Width X
  1923. * @see https://tailwindcss.com/docs/border-width
  1924. */
  1925. "border-w-x": [{
  1926. "border-x": [u]
  1927. }],
  1928. /**
  1929. * Border Width Y
  1930. * @see https://tailwindcss.com/docs/border-width
  1931. */
  1932. "border-w-y": [{
  1933. "border-y": [u]
  1934. }],
  1935. /**
  1936. * Border Width Start
  1937. * @see https://tailwindcss.com/docs/border-width
  1938. */
  1939. "border-w-s": [{
  1940. "border-s": [u]
  1941. }],
  1942. /**
  1943. * Border Width End
  1944. * @see https://tailwindcss.com/docs/border-width
  1945. */
  1946. "border-w-e": [{
  1947. "border-e": [u]
  1948. }],
  1949. /**
  1950. * Border Width Top
  1951. * @see https://tailwindcss.com/docs/border-width
  1952. */
  1953. "border-w-t": [{
  1954. "border-t": [u]
  1955. }],
  1956. /**
  1957. * Border Width Right
  1958. * @see https://tailwindcss.com/docs/border-width
  1959. */
  1960. "border-w-r": [{
  1961. "border-r": [u]
  1962. }],
  1963. /**
  1964. * Border Width Bottom
  1965. * @see https://tailwindcss.com/docs/border-width
  1966. */
  1967. "border-w-b": [{
  1968. "border-b": [u]
  1969. }],
  1970. /**
  1971. * Border Width Left
  1972. * @see https://tailwindcss.com/docs/border-width
  1973. */
  1974. "border-w-l": [{
  1975. "border-l": [u]
  1976. }],
  1977. /**
  1978. * Border Opacity
  1979. * @see https://tailwindcss.com/docs/border-opacity
  1980. */
  1981. "border-opacity": [{
  1982. "border-opacity": [h]
  1983. }],
  1984. /**
  1985. * Border Style
  1986. * @see https://tailwindcss.com/docs/border-style
  1987. */
  1988. "border-style": [{
  1989. border: [...P(), "hidden"]
  1990. }],
  1991. /**
  1992. * Divide Width X
  1993. * @see https://tailwindcss.com/docs/divide-width
  1994. */
  1995. "divide-x": [{
  1996. "divide-x": [u]
  1997. }],
  1998. /**
  1999. * Divide Width X Reverse
  2000. * @see https://tailwindcss.com/docs/divide-width
  2001. */
  2002. "divide-x-reverse": ["divide-x-reverse"],
  2003. /**
  2004. * Divide Width Y
  2005. * @see https://tailwindcss.com/docs/divide-width
  2006. */
  2007. "divide-y": [{
  2008. "divide-y": [u]
  2009. }],
  2010. /**
  2011. * Divide Width Y Reverse
  2012. * @see https://tailwindcss.com/docs/divide-width
  2013. */
  2014. "divide-y-reverse": ["divide-y-reverse"],
  2015. /**
  2016. * Divide Opacity
  2017. * @see https://tailwindcss.com/docs/divide-opacity
  2018. */
  2019. "divide-opacity": [{
  2020. "divide-opacity": [h]
  2021. }],
  2022. /**
  2023. * Divide Style
  2024. * @see https://tailwindcss.com/docs/divide-style
  2025. */
  2026. "divide-style": [{
  2027. divide: P()
  2028. }],
  2029. /**
  2030. * Border Color
  2031. * @see https://tailwindcss.com/docs/border-color
  2032. */
  2033. "border-color": [{
  2034. border: [a]
  2035. }],
  2036. /**
  2037. * Border Color X
  2038. * @see https://tailwindcss.com/docs/border-color
  2039. */
  2040. "border-color-x": [{
  2041. "border-x": [a]
  2042. }],
  2043. /**
  2044. * Border Color Y
  2045. * @see https://tailwindcss.com/docs/border-color
  2046. */
  2047. "border-color-y": [{
  2048. "border-y": [a]
  2049. }],
  2050. /**
  2051. * Border Color S
  2052. * @see https://tailwindcss.com/docs/border-color
  2053. */
  2054. "border-color-s": [{
  2055. "border-s": [a]
  2056. }],
  2057. /**
  2058. * Border Color E
  2059. * @see https://tailwindcss.com/docs/border-color
  2060. */
  2061. "border-color-e": [{
  2062. "border-e": [a]
  2063. }],
  2064. /**
  2065. * Border Color Top
  2066. * @see https://tailwindcss.com/docs/border-color
  2067. */
  2068. "border-color-t": [{
  2069. "border-t": [a]
  2070. }],
  2071. /**
  2072. * Border Color Right
  2073. * @see https://tailwindcss.com/docs/border-color
  2074. */
  2075. "border-color-r": [{
  2076. "border-r": [a]
  2077. }],
  2078. /**
  2079. * Border Color Bottom
  2080. * @see https://tailwindcss.com/docs/border-color
  2081. */
  2082. "border-color-b": [{
  2083. "border-b": [a]
  2084. }],
  2085. /**
  2086. * Border Color Left
  2087. * @see https://tailwindcss.com/docs/border-color
  2088. */
  2089. "border-color-l": [{
  2090. "border-l": [a]
  2091. }],
  2092. /**
  2093. * Divide Color
  2094. * @see https://tailwindcss.com/docs/divide-color
  2095. */
  2096. "divide-color": [{
  2097. divide: [a]
  2098. }],
  2099. /**
  2100. * Outline Style
  2101. * @see https://tailwindcss.com/docs/outline-style
  2102. */
  2103. "outline-style": [{
  2104. outline: ["", ...P()]
  2105. }],
  2106. /**
  2107. * Outline Offset
  2108. * @see https://tailwindcss.com/docs/outline-offset
  2109. */
  2110. "outline-offset": [{
  2111. "outline-offset": [jn, ot]
  2112. }],
  2113. /**
  2114. * Outline Width
  2115. * @see https://tailwindcss.com/docs/outline-width
  2116. */
  2117. "outline-w": [{
  2118. outline: [jn, qn]
  2119. }],
  2120. /**
  2121. * Outline Color
  2122. * @see https://tailwindcss.com/docs/outline-color
  2123. */
  2124. "outline-color": [{
  2125. outline: [e]
  2126. }],
  2127. /**
  2128. * Ring Width
  2129. * @see https://tailwindcss.com/docs/ring-width
  2130. */
  2131. "ring-w": [{
  2132. ring: F()
  2133. }],
  2134. /**
  2135. * Ring Width Inset
  2136. * @see https://tailwindcss.com/docs/ring-width
  2137. */
  2138. "ring-w-inset": ["ring-inset"],
  2139. /**
  2140. * Ring Color
  2141. * @see https://tailwindcss.com/docs/ring-color
  2142. */
  2143. "ring-color": [{
  2144. ring: [e]
  2145. }],
  2146. /**
  2147. * Ring Opacity
  2148. * @see https://tailwindcss.com/docs/ring-opacity
  2149. */
  2150. "ring-opacity": [{
  2151. "ring-opacity": [h]
  2152. }],
  2153. /**
  2154. * Ring Offset Width
  2155. * @see https://tailwindcss.com/docs/ring-offset-width
  2156. */
  2157. "ring-offset-w": [{
  2158. "ring-offset": [jn, qn]
  2159. }],
  2160. /**
  2161. * Ring Offset Color
  2162. * @see https://tailwindcss.com/docs/ring-offset-color
  2163. */
  2164. "ring-offset-color": [{
  2165. "ring-offset": [e]
  2166. }],
  2167. // Effects
  2168. /**
  2169. * Box Shadow
  2170. * @see https://tailwindcss.com/docs/box-shadow
  2171. */
  2172. shadow: [{
  2173. shadow: ["", "inner", "none", Kn, jm]
  2174. }],
  2175. /**
  2176. * Box Shadow Color
  2177. * @see https://tailwindcss.com/docs/box-shadow-color
  2178. */
  2179. "shadow-color": [{
  2180. shadow: [ra]
  2181. }],
  2182. /**
  2183. * Opacity
  2184. * @see https://tailwindcss.com/docs/opacity
  2185. */
  2186. opacity: [{
  2187. opacity: [h]
  2188. }],
  2189. /**
  2190. * Mix Blend Mode
  2191. * @see https://tailwindcss.com/docs/mix-blend-mode
  2192. */
  2193. "mix-blend": [{
  2194. "mix-blend": [...z(), "plus-lighter", "plus-darker"]
  2195. }],
  2196. /**
  2197. * Background Blend Mode
  2198. * @see https://tailwindcss.com/docs/background-blend-mode
  2199. */
  2200. "bg-blend": [{
  2201. "bg-blend": z()
  2202. }],
  2203. // Filters
  2204. /**
  2205. * Filter
  2206. * @deprecated since Tailwind CSS v3.0.0
  2207. * @see https://tailwindcss.com/docs/filter
  2208. */
  2209. filter: [{
  2210. filter: ["", "none"]
  2211. }],
  2212. /**
  2213. * Blur
  2214. * @see https://tailwindcss.com/docs/blur
  2215. */
  2216. blur: [{
  2217. blur: [n]
  2218. }],
  2219. /**
  2220. * Brightness
  2221. * @see https://tailwindcss.com/docs/brightness
  2222. */
  2223. brightness: [{
  2224. brightness: [r]
  2225. }],
  2226. /**
  2227. * Contrast
  2228. * @see https://tailwindcss.com/docs/contrast
  2229. */
  2230. contrast: [{
  2231. contrast: [l]
  2232. }],
  2233. /**
  2234. * Drop Shadow
  2235. * @see https://tailwindcss.com/docs/drop-shadow
  2236. */
  2237. "drop-shadow": [{
  2238. "drop-shadow": ["", "none", Kn, ot]
  2239. }],
  2240. /**
  2241. * Grayscale
  2242. * @see https://tailwindcss.com/docs/grayscale
  2243. */
  2244. grayscale: [{
  2245. grayscale: [c]
  2246. }],
  2247. /**
  2248. * Hue Rotate
  2249. * @see https://tailwindcss.com/docs/hue-rotate
  2250. */
  2251. "hue-rotate": [{
  2252. "hue-rotate": [s]
  2253. }],
  2254. /**
  2255. * Invert
  2256. * @see https://tailwindcss.com/docs/invert
  2257. */
  2258. invert: [{
  2259. invert: [v]
  2260. }],
  2261. /**
  2262. * Saturate
  2263. * @see https://tailwindcss.com/docs/saturate
  2264. */
  2265. saturate: [{
  2266. saturate: [y]
  2267. }],
  2268. /**
  2269. * Sepia
  2270. * @see https://tailwindcss.com/docs/sepia
  2271. */
  2272. sepia: [{
  2273. sepia: [E]
  2274. }],
  2275. /**
  2276. * Backdrop Filter
  2277. * @deprecated since Tailwind CSS v3.0.0
  2278. * @see https://tailwindcss.com/docs/backdrop-filter
  2279. */
  2280. "backdrop-filter": [{
  2281. "backdrop-filter": ["", "none"]
  2282. }],
  2283. /**
  2284. * Backdrop Blur
  2285. * @see https://tailwindcss.com/docs/backdrop-blur
  2286. */
  2287. "backdrop-blur": [{
  2288. "backdrop-blur": [n]
  2289. }],
  2290. /**
  2291. * Backdrop Brightness
  2292. * @see https://tailwindcss.com/docs/backdrop-brightness
  2293. */
  2294. "backdrop-brightness": [{
  2295. "backdrop-brightness": [r]
  2296. }],
  2297. /**
  2298. * Backdrop Contrast
  2299. * @see https://tailwindcss.com/docs/backdrop-contrast
  2300. */
  2301. "backdrop-contrast": [{
  2302. "backdrop-contrast": [l]
  2303. }],
  2304. /**
  2305. * Backdrop Grayscale
  2306. * @see https://tailwindcss.com/docs/backdrop-grayscale
  2307. */
  2308. "backdrop-grayscale": [{
  2309. "backdrop-grayscale": [c]
  2310. }],
  2311. /**
  2312. * Backdrop Hue Rotate
  2313. * @see https://tailwindcss.com/docs/backdrop-hue-rotate
  2314. */
  2315. "backdrop-hue-rotate": [{
  2316. "backdrop-hue-rotate": [s]
  2317. }],
  2318. /**
  2319. * Backdrop Invert
  2320. * @see https://tailwindcss.com/docs/backdrop-invert
  2321. */
  2322. "backdrop-invert": [{
  2323. "backdrop-invert": [v]
  2324. }],
  2325. /**
  2326. * Backdrop Opacity
  2327. * @see https://tailwindcss.com/docs/backdrop-opacity
  2328. */
  2329. "backdrop-opacity": [{
  2330. "backdrop-opacity": [h]
  2331. }],
  2332. /**
  2333. * Backdrop Saturate
  2334. * @see https://tailwindcss.com/docs/backdrop-saturate
  2335. */
  2336. "backdrop-saturate": [{
  2337. "backdrop-saturate": [y]
  2338. }],
  2339. /**
  2340. * Backdrop Sepia
  2341. * @see https://tailwindcss.com/docs/backdrop-sepia
  2342. */
  2343. "backdrop-sepia": [{
  2344. "backdrop-sepia": [E]
  2345. }],
  2346. // Tables
  2347. /**
  2348. * Border Collapse
  2349. * @see https://tailwindcss.com/docs/border-collapse
  2350. */
  2351. "border-collapse": [{
  2352. border: ["collapse", "separate"]
  2353. }],
  2354. /**
  2355. * Border Spacing
  2356. * @see https://tailwindcss.com/docs/border-spacing
  2357. */
  2358. "border-spacing": [{
  2359. "border-spacing": [i]
  2360. }],
  2361. /**
  2362. * Border Spacing X
  2363. * @see https://tailwindcss.com/docs/border-spacing
  2364. */
  2365. "border-spacing-x": [{
  2366. "border-spacing-x": [i]
  2367. }],
  2368. /**
  2369. * Border Spacing Y
  2370. * @see https://tailwindcss.com/docs/border-spacing
  2371. */
  2372. "border-spacing-y": [{
  2373. "border-spacing-y": [i]
  2374. }],
  2375. /**
  2376. * Table Layout
  2377. * @see https://tailwindcss.com/docs/table-layout
  2378. */
  2379. "table-layout": [{
  2380. table: ["auto", "fixed"]
  2381. }],
  2382. /**
  2383. * Caption Side
  2384. * @see https://tailwindcss.com/docs/caption-side
  2385. */
  2386. caption: [{
  2387. caption: ["top", "bottom"]
  2388. }],
  2389. // Transitions and Animation
  2390. /**
  2391. * Tranisition Property
  2392. * @see https://tailwindcss.com/docs/transition-property
  2393. */
  2394. transition: [{
  2395. transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", ot]
  2396. }],
  2397. /**
  2398. * Transition Duration
  2399. * @see https://tailwindcss.com/docs/transition-duration
  2400. */
  2401. duration: [{
  2402. duration: $()
  2403. }],
  2404. /**
  2405. * Transition Timing Function
  2406. * @see https://tailwindcss.com/docs/transition-timing-function
  2407. */
  2408. ease: [{
  2409. ease: ["linear", "in", "out", "in-out", ot]
  2410. }],
  2411. /**
  2412. * Transition Delay
  2413. * @see https://tailwindcss.com/docs/transition-delay
  2414. */
  2415. delay: [{
  2416. delay: $()
  2417. }],
  2418. /**
  2419. * Animation
  2420. * @see https://tailwindcss.com/docs/animation
  2421. */
  2422. animate: [{
  2423. animate: ["none", "spin", "ping", "pulse", "bounce", ot]
  2424. }],
  2425. // Transforms
  2426. /**
  2427. * Transform
  2428. * @see https://tailwindcss.com/docs/transform
  2429. */
  2430. transform: [{
  2431. transform: ["", "gpu", "none"]
  2432. }],
  2433. /**
  2434. * Scale
  2435. * @see https://tailwindcss.com/docs/scale
  2436. */
  2437. scale: [{
  2438. scale: [w]
  2439. }],
  2440. /**
  2441. * Scale X
  2442. * @see https://tailwindcss.com/docs/scale
  2443. */
  2444. "scale-x": [{
  2445. "scale-x": [w]
  2446. }],
  2447. /**
  2448. * Scale Y
  2449. * @see https://tailwindcss.com/docs/scale
  2450. */
  2451. "scale-y": [{
  2452. "scale-y": [w]
  2453. }],
  2454. /**
  2455. * Rotate
  2456. * @see https://tailwindcss.com/docs/rotate
  2457. */
  2458. rotate: [{
  2459. rotate: [na, ot]
  2460. }],
  2461. /**
  2462. * Translate X
  2463. * @see https://tailwindcss.com/docs/translate
  2464. */
  2465. "translate-x": [{
  2466. "translate-x": [R]
  2467. }],
  2468. /**
  2469. * Translate Y
  2470. * @see https://tailwindcss.com/docs/translate
  2471. */
  2472. "translate-y": [{
  2473. "translate-y": [R]
  2474. }],
  2475. /**
  2476. * Skew X
  2477. * @see https://tailwindcss.com/docs/skew
  2478. */
  2479. "skew-x": [{
  2480. "skew-x": [S]
  2481. }],
  2482. /**
  2483. * Skew Y
  2484. * @see https://tailwindcss.com/docs/skew
  2485. */
  2486. "skew-y": [{
  2487. "skew-y": [S]
  2488. }],
  2489. /**
  2490. * Transform Origin
  2491. * @see https://tailwindcss.com/docs/transform-origin
  2492. */
  2493. "transform-origin": [{
  2494. origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", ot]
  2495. }],
  2496. // Interactivity
  2497. /**
  2498. * Accent Color
  2499. * @see https://tailwindcss.com/docs/accent-color
  2500. */
  2501. accent: [{
  2502. accent: ["auto", e]
  2503. }],
  2504. /**
  2505. * Appearance
  2506. * @see https://tailwindcss.com/docs/appearance
  2507. */
  2508. appearance: [{
  2509. appearance: ["none", "auto"]
  2510. }],
  2511. /**
  2512. * Cursor
  2513. * @see https://tailwindcss.com/docs/cursor
  2514. */
  2515. cursor: [{
  2516. cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", ot]
  2517. }],
  2518. /**
  2519. * Caret Color
  2520. * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
  2521. */
  2522. "caret-color": [{
  2523. caret: [e]
  2524. }],
  2525. /**
  2526. * Pointer Events
  2527. * @see https://tailwindcss.com/docs/pointer-events
  2528. */
  2529. "pointer-events": [{
  2530. "pointer-events": ["none", "auto"]
  2531. }],
  2532. /**
  2533. * Resize
  2534. * @see https://tailwindcss.com/docs/resize
  2535. */
  2536. resize: [{
  2537. resize: ["none", "y", "x", ""]
  2538. }],
  2539. /**
  2540. * Scroll Behavior
  2541. * @see https://tailwindcss.com/docs/scroll-behavior
  2542. */
  2543. "scroll-behavior": [{
  2544. scroll: ["auto", "smooth"]
  2545. }],
  2546. /**
  2547. * Scroll Margin
  2548. * @see https://tailwindcss.com/docs/scroll-margin
  2549. */
  2550. "scroll-m": [{
  2551. "scroll-m": N()
  2552. }],
  2553. /**
  2554. * Scroll Margin X
  2555. * @see https://tailwindcss.com/docs/scroll-margin
  2556. */
  2557. "scroll-mx": [{
  2558. "scroll-mx": N()
  2559. }],
  2560. /**
  2561. * Scroll Margin Y
  2562. * @see https://tailwindcss.com/docs/scroll-margin
  2563. */
  2564. "scroll-my": [{
  2565. "scroll-my": N()
  2566. }],
  2567. /**
  2568. * Scroll Margin Start
  2569. * @see https://tailwindcss.com/docs/scroll-margin
  2570. */
  2571. "scroll-ms": [{
  2572. "scroll-ms": N()
  2573. }],
  2574. /**
  2575. * Scroll Margin End
  2576. * @see https://tailwindcss.com/docs/scroll-margin
  2577. */
  2578. "scroll-me": [{
  2579. "scroll-me": N()
  2580. }],
  2581. /**
  2582. * Scroll Margin Top
  2583. * @see https://tailwindcss.com/docs/scroll-margin
  2584. */
  2585. "scroll-mt": [{
  2586. "scroll-mt": N()
  2587. }],
  2588. /**
  2589. * Scroll Margin Right
  2590. * @see https://tailwindcss.com/docs/scroll-margin
  2591. */
  2592. "scroll-mr": [{
  2593. "scroll-mr": N()
  2594. }],
  2595. /**
  2596. * Scroll Margin Bottom
  2597. * @see https://tailwindcss.com/docs/scroll-margin
  2598. */
  2599. "scroll-mb": [{
  2600. "scroll-mb": N()
  2601. }],
  2602. /**
  2603. * Scroll Margin Left
  2604. * @see https://tailwindcss.com/docs/scroll-margin
  2605. */
  2606. "scroll-ml": [{
  2607. "scroll-ml": N()
  2608. }],
  2609. /**
  2610. * Scroll Padding
  2611. * @see https://tailwindcss.com/docs/scroll-padding
  2612. */
  2613. "scroll-p": [{
  2614. "scroll-p": N()
  2615. }],
  2616. /**
  2617. * Scroll Padding X
  2618. * @see https://tailwindcss.com/docs/scroll-padding
  2619. */
  2620. "scroll-px": [{
  2621. "scroll-px": N()
  2622. }],
  2623. /**
  2624. * Scroll Padding Y
  2625. * @see https://tailwindcss.com/docs/scroll-padding
  2626. */
  2627. "scroll-py": [{
  2628. "scroll-py": N()
  2629. }],
  2630. /**
  2631. * Scroll Padding Start
  2632. * @see https://tailwindcss.com/docs/scroll-padding
  2633. */
  2634. "scroll-ps": [{
  2635. "scroll-ps": N()
  2636. }],
  2637. /**
  2638. * Scroll Padding End
  2639. * @see https://tailwindcss.com/docs/scroll-padding
  2640. */
  2641. "scroll-pe": [{
  2642. "scroll-pe": N()
  2643. }],
  2644. /**
  2645. * Scroll Padding Top
  2646. * @see https://tailwindcss.com/docs/scroll-padding
  2647. */
  2648. "scroll-pt": [{
  2649. "scroll-pt": N()
  2650. }],
  2651. /**
  2652. * Scroll Padding Right
  2653. * @see https://tailwindcss.com/docs/scroll-padding
  2654. */
  2655. "scroll-pr": [{
  2656. "scroll-pr": N()
  2657. }],
  2658. /**
  2659. * Scroll Padding Bottom
  2660. * @see https://tailwindcss.com/docs/scroll-padding
  2661. */
  2662. "scroll-pb": [{
  2663. "scroll-pb": N()
  2664. }],
  2665. /**
  2666. * Scroll Padding Left
  2667. * @see https://tailwindcss.com/docs/scroll-padding
  2668. */
  2669. "scroll-pl": [{
  2670. "scroll-pl": N()
  2671. }],
  2672. /**
  2673. * Scroll Snap Align
  2674. * @see https://tailwindcss.com/docs/scroll-snap-align
  2675. */
  2676. "snap-align": [{
  2677. snap: ["start", "end", "center", "align-none"]
  2678. }],
  2679. /**
  2680. * Scroll Snap Stop
  2681. * @see https://tailwindcss.com/docs/scroll-snap-stop
  2682. */
  2683. "snap-stop": [{
  2684. snap: ["normal", "always"]
  2685. }],
  2686. /**
  2687. * Scroll Snap Type
  2688. * @see https://tailwindcss.com/docs/scroll-snap-type
  2689. */
  2690. "snap-type": [{
  2691. snap: ["none", "x", "y", "both"]
  2692. }],
  2693. /**
  2694. * Scroll Snap Type Strictness
  2695. * @see https://tailwindcss.com/docs/scroll-snap-type
  2696. */
  2697. "snap-strictness": [{
  2698. snap: ["mandatory", "proximity"]
  2699. }],
  2700. /**
  2701. * Touch Action
  2702. * @see https://tailwindcss.com/docs/touch-action
  2703. */
  2704. touch: [{
  2705. touch: ["auto", "none", "manipulation"]
  2706. }],
  2707. /**
  2708. * Touch Action X
  2709. * @see https://tailwindcss.com/docs/touch-action
  2710. */
  2711. "touch-x": [{
  2712. "touch-pan": ["x", "left", "right"]
  2713. }],
  2714. /**
  2715. * Touch Action Y
  2716. * @see https://tailwindcss.com/docs/touch-action
  2717. */
  2718. "touch-y": [{
  2719. "touch-pan": ["y", "up", "down"]
  2720. }],
  2721. /**
  2722. * Touch Action Pinch Zoom
  2723. * @see https://tailwindcss.com/docs/touch-action
  2724. */
  2725. "touch-pz": ["touch-pinch-zoom"],
  2726. /**
  2727. * User Select
  2728. * @see https://tailwindcss.com/docs/user-select
  2729. */
  2730. select: [{
  2731. select: ["none", "text", "all", "auto"]
  2732. }],
  2733. /**
  2734. * Will Change
  2735. * @see https://tailwindcss.com/docs/will-change
  2736. */
  2737. "will-change": [{
  2738. "will-change": ["auto", "scroll", "contents", "transform", ot]
  2739. }],
  2740. // SVG
  2741. /**
  2742. * Fill
  2743. * @see https://tailwindcss.com/docs/fill
  2744. */
  2745. fill: [{
  2746. fill: [e, "none"]
  2747. }],
  2748. /**
  2749. * Stroke Width
  2750. * @see https://tailwindcss.com/docs/stroke-width
  2751. */
  2752. "stroke-w": [{
  2753. stroke: [jn, qn, ui]
  2754. }],
  2755. /**
  2756. * Stroke
  2757. * @see https://tailwindcss.com/docs/stroke
  2758. */
  2759. stroke: [{
  2760. stroke: [e, "none"]
  2761. }],
  2762. // Accessibility
  2763. /**
  2764. * Screen Readers
  2765. * @see https://tailwindcss.com/docs/screen-readers
  2766. */
  2767. sr: ["sr-only", "not-sr-only"],
  2768. /**
  2769. * Forced Color Adjust
  2770. * @see https://tailwindcss.com/docs/forced-color-adjust
  2771. */
  2772. "forced-color-adjust": [{
  2773. "forced-color-adjust": ["auto", "none"]
  2774. }]
  2775. },
  2776. conflictingClassGroups: {
  2777. overflow: ["overflow-x", "overflow-y"],
  2778. overscroll: ["overscroll-x", "overscroll-y"],
  2779. inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
  2780. "inset-x": ["right", "left"],
  2781. "inset-y": ["top", "bottom"],
  2782. flex: ["basis", "grow", "shrink"],
  2783. gap: ["gap-x", "gap-y"],
  2784. p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
  2785. px: ["pr", "pl"],
  2786. py: ["pt", "pb"],
  2787. m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
  2788. mx: ["mr", "ml"],
  2789. my: ["mt", "mb"],
  2790. size: ["w", "h"],
  2791. "font-size": ["leading"],
  2792. "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
  2793. "fvn-ordinal": ["fvn-normal"],
  2794. "fvn-slashed-zero": ["fvn-normal"],
  2795. "fvn-figure": ["fvn-normal"],
  2796. "fvn-spacing": ["fvn-normal"],
  2797. "fvn-fraction": ["fvn-normal"],
  2798. "line-clamp": ["display", "overflow"],
  2799. rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
  2800. "rounded-s": ["rounded-ss", "rounded-es"],
  2801. "rounded-e": ["rounded-se", "rounded-ee"],
  2802. "rounded-t": ["rounded-tl", "rounded-tr"],
  2803. "rounded-r": ["rounded-tr", "rounded-br"],
  2804. "rounded-b": ["rounded-br", "rounded-bl"],
  2805. "rounded-l": ["rounded-tl", "rounded-bl"],
  2806. "border-spacing": ["border-spacing-x", "border-spacing-y"],
  2807. "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
  2808. "border-w-x": ["border-w-r", "border-w-l"],
  2809. "border-w-y": ["border-w-t", "border-w-b"],
  2810. "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
  2811. "border-color-x": ["border-color-r", "border-color-l"],
  2812. "border-color-y": ["border-color-t", "border-color-b"],
  2813. "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
  2814. "scroll-mx": ["scroll-mr", "scroll-ml"],
  2815. "scroll-my": ["scroll-mt", "scroll-mb"],
  2816. "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
  2817. "scroll-px": ["scroll-pr", "scroll-pl"],
  2818. "scroll-py": ["scroll-pt", "scroll-pb"],
  2819. touch: ["touch-x", "touch-y", "touch-pz"],
  2820. "touch-x": ["touch"],
  2821. "touch-y": ["touch"],
  2822. "touch-pz": ["touch"]
  2823. },
  2824. conflictingClassGroupModifiers: {
  2825. "font-size": ["leading"]
  2826. }
  2827. };
  2828. }, Wm = /* @__PURE__ */ Em(Vm);
  2829. function Na(...e) {
  2830. return Wm(jt(e));
  2831. }
  2832. const Wc = hu(null), Bc = () => {
  2833. const e = Sn(Wc);
  2834. if (!e)
  2835. throw new Error("useDropdown must be used within a DropdownProvider");
  2836. return e;
  2837. };
  2838. function Bm({ children: e, className: t, offset: n }) {
  2839. if (!Kr)
  2840. return null;
  2841. const { show: r, updateShow: a, overlayRef: o, triggerRef: i } = Bc(), [u, l] = rt(!1), [c, s] = rt({ top: 0, left: 0 });
  2842. lt(() => {
  2843. var C, p;
  2844. if (r && i.current && o.current) {
  2845. const m = i.current.getBoundingClientRect(), b = o.current.getBoundingClientRect(), f = document.documentElement.clientWidth, h = document.documentElement.clientHeight;
  2846. let g = m.bottom + window.scrollY, y = m.left + window.scrollX;
  2847. g + b.height > h + window.scrollY && (g = m.top - b.height + window.scrollY), y + b.width > f + window.scrollX && (y = m.right - b.width + window.scrollX), g = Math.max(g, window.scrollY), y = Math.max(y, window.scrollX), s({
  2848. top: g + ((C = n == null ? void 0 : n.y) != null ? C : 0),
  2849. left: y + ((p = n == null ? void 0 : n.x) != null ? p : 0)
  2850. }), requestAnimationFrame(() => {
  2851. l(!0);
  2852. });
  2853. }
  2854. }, [r, n == null ? void 0 : n.x, n == null ? void 0 : n.y, o, i]);
  2855. const v = Ot((C) => {
  2856. C.stopPropagation(), a(!1);
  2857. }, []);
  2858. return r ? $a(
  2859. /* @__PURE__ */ q.jsx(
  2860. "div",
  2861. {
  2862. ref: o,
  2863. className: Na(
  2864. `
  2865. univer-fixed univer-z-[1071] univer-overflow-hidden univer-rounded-md univer-border univer-bg-white
  2866. univer-opacity-0 univer-shadow-md
  2867. dark:univer-bg-gray-700
  2868. `,
  2869. {
  2870. "univer-opacity-100 univer-animate-in univer-slide-in-from-top-2": u
  2871. },
  2872. t
  2873. ),
  2874. style: {
  2875. top: c.top,
  2876. left: c.left
  2877. },
  2878. onClick: v,
  2879. onPointerUpCapture: (C) => C.stopPropagation(),
  2880. children: e
  2881. }
  2882. ),
  2883. document.body
  2884. ) : null;
  2885. }
  2886. function Um({ visible: e, children: t, disabled: n = !1, onVisibleChange: r }) {
  2887. const a = Ce(null), o = Ce(null), [i, u] = rt(!1), l = e !== void 0, c = l ? e : i, s = Ot((C) => {
  2888. n || (l || u(C), r == null || r(C));
  2889. }, [n, l, r]);
  2890. lt(() => {
  2891. if (!c) return;
  2892. const C = (p) => {
  2893. var b, f;
  2894. const m = p.target;
  2895. !((b = a.current) != null && b.contains(m)) && !((f = o.current) != null && f.contains(m)) && s(!1);
  2896. };
  2897. return window.addEventListener("pointerup", C), () => window.removeEventListener("pointerup", C);
  2898. }, [c, s]);
  2899. const v = Ht(() => ({ show: c, updateShow: s, disabled: n, triggerRef: a, overlayRef: o }), [c, n]);
  2900. return /* @__PURE__ */ q.jsx(Wc.Provider, { value: v, children: t });
  2901. }
  2902. function qm({ children: e }) {
  2903. const { show: t, updateShow: n, triggerRef: r } = Bc();
  2904. if (!pc(e))
  2905. throw new Error("DropdownTrigger children must be a valid React element");
  2906. return hc(e, {
  2907. ref: r,
  2908. onClick: (a) => {
  2909. var o, i;
  2910. a.stopPropagation(), n(!t), (i = (o = e.props) == null ? void 0 : o.onClick) == null || i.call(o, a);
  2911. }
  2912. // eslint-disable-next-line ts/no-explicit-any
  2913. });
  2914. }
  2915. function Km({ hsv: e, onChange: t }) {
  2916. const [n, r] = rt(""), a = Ht(() => bu(e[0], e[1], e[2]), [e]);
  2917. lt(() => {
  2918. r(a.replace(/^#/, ""));
  2919. }, [a]);
  2920. const o = (l) => /^[0-9A-Fa-f]{6}$/.test(l), i = (l) => {
  2921. const c = l.target.value.trim();
  2922. if (!(c.length > 6) && !(c !== "" && !/^[0-9A-Fa-f]*$/.test(c)) && (r(c), o(c))) {
  2923. const s = yu(c);
  2924. t && t(...s);
  2925. }
  2926. }, u = () => {
  2927. o(n) || r(a.replace(/^#/, ""));
  2928. };
  2929. return /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
  2930. /* @__PURE__ */ q.jsx(
  2931. "input",
  2932. {
  2933. className: `
  2934. univer-w-full univer-px-2 !univer-pl-4 univer-uppercase
  2935. focus:univer-border-blue-500 focus:univer-outline-none
  2936. `,
  2937. value: n,
  2938. onChange: i,
  2939. onBlur: u,
  2940. maxLength: 6,
  2941. spellCheck: !1
  2942. }
  2943. ),
  2944. /* @__PURE__ */ q.jsx(
  2945. "span",
  2946. {
  2947. className: `
  2948. univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm
  2949. univer-text-gray-400
  2950. `,
  2951. children: "#"
  2952. }
  2953. )
  2954. ] });
  2955. }
  2956. function Ym({ hsv: e, onChange: t }) {
  2957. const [n, r] = rt({ r: 0, g: 0, b: 0 });
  2958. lt(() => {
  2959. const [i, u, l] = Da(e[0], e[1], e[2]);
  2960. r({
  2961. r: Math.round(i),
  2962. g: Math.round(u),
  2963. b: Math.round(l)
  2964. });
  2965. }, [e]);
  2966. const a = (i, u) => {
  2967. if (u !== "" && !/^\d*$/.test(u)) return;
  2968. const l = u === "" ? 0 : Number.parseInt(u, 10);
  2969. if (l > 255) return;
  2970. const c = { ...n, [i]: l };
  2971. if (r(c), t) {
  2972. const s = Ac(c.r, c.g, c.b);
  2973. t(...s);
  2974. }
  2975. }, o = () => {
  2976. const [i, u, l] = Da(e[0], e[1], e[2]);
  2977. r({
  2978. r: Math.round(i),
  2979. g: Math.round(u),
  2980. b: Math.round(l)
  2981. });
  2982. };
  2983. return /* @__PURE__ */ q.jsxs(
  2984. "div",
  2985. {
  2986. className: `
  2987. univer-flex univer-items-center univer-gap-2
  2988. [&>input]:univer-w-11
  2989. `,
  2990. children: [
  2991. /* @__PURE__ */ q.jsx(
  2992. "input",
  2993. {
  2994. value: n.r,
  2995. onChange: (i) => a("r", i.target.value),
  2996. onBlur: o,
  2997. maxLength: 3
  2998. }
  2999. ),
  3000. /* @__PURE__ */ q.jsx(
  3001. "input",
  3002. {
  3003. value: n.g,
  3004. onChange: (i) => a("g", i.target.value),
  3005. onBlur: o,
  3006. maxLength: 3
  3007. }
  3008. ),
  3009. /* @__PURE__ */ q.jsx(
  3010. "input",
  3011. {
  3012. value: n.b,
  3013. onChange: (i) => a("b", i.target.value),
  3014. onBlur: o,
  3015. maxLength: 3
  3016. }
  3017. )
  3018. ]
  3019. }
  3020. );
  3021. }
  3022. function Gm({ hsv: e, onChange: t }) {
  3023. const [n, r] = rt({ h: 0, s: 0, l: 0 });
  3024. lt(() => {
  3025. const [i, u, l] = ul(e[0], e[1], e[2]);
  3026. r({
  3027. h: Math.round(i),
  3028. s: Math.round(u),
  3029. l: Math.round(l)
  3030. });
  3031. }, [e]);
  3032. const a = (i, u) => {
  3033. if (u !== "" && !/^\d*$/.test(u)) return;
  3034. const l = u === "" ? 0 : Number.parseInt(u, 10);
  3035. if (i === "h" && l > 360 || (i === "s" || i === "l") && l > 100) return;
  3036. const c = { ...n, [i]: l };
  3037. if (r(c), t) {
  3038. const s = cm(c.h, c.s, c.l);
  3039. t(...s);
  3040. }
  3041. }, o = () => {
  3042. const [i, u, l] = ul(e[0], e[1], e[2]);
  3043. r({
  3044. h: Math.round(i),
  3045. s: Math.round(u),
  3046. l: Math.round(l)
  3047. });
  3048. };
  3049. return /* @__PURE__ */ q.jsxs(
  3050. "div",
  3051. {
  3052. className: `
  3053. univer-flex univer-items-center univer-gap-2
  3054. [&>input]:univer-w-11
  3055. `,
  3056. children: [
  3057. /* @__PURE__ */ q.jsx(
  3058. "input",
  3059. {
  3060. value: n.h,
  3061. onChange: (i) => a("h", i.target.value),
  3062. onBlur: o,
  3063. maxLength: 3,
  3064. "aria-label": "Hue"
  3065. }
  3066. ),
  3067. /* @__PURE__ */ q.jsx(
  3068. "input",
  3069. {
  3070. value: n.s,
  3071. onChange: (i) => a("s", i.target.value),
  3072. onBlur: o,
  3073. maxLength: 3,
  3074. "aria-label": "Saturation"
  3075. }
  3076. ),
  3077. /* @__PURE__ */ q.jsx(
  3078. "input",
  3079. {
  3080. value: n.l,
  3081. onChange: (i) => a("l", i.target.value),
  3082. onBlur: o,
  3083. maxLength: 3,
  3084. "aria-label": "Lightness"
  3085. }
  3086. )
  3087. ]
  3088. }
  3089. );
  3090. }
  3091. function Xm({ alpha: e, onChange: t }) {
  3092. const [n, r] = rt("");
  3093. lt(() => {
  3094. r(String(Math.round(e * 100)));
  3095. }, [e]);
  3096. const a = (i) => {
  3097. if (i !== "" && !/^\d*$/.test(i)) return;
  3098. const u = i === "" ? 0 : Number.parseInt(i, 10);
  3099. u > 100 || (r(i), t && t(u / 100));
  3100. }, o = () => {
  3101. const i = Math.round(e * 100);
  3102. r(String(i));
  3103. };
  3104. return /* @__PURE__ */ q.jsxs("div", { className: "univer-relative", children: [
  3105. /* @__PURE__ */ q.jsx(
  3106. "input",
  3107. {
  3108. className: "univer-w-14 !univer-pr-5 univer-text-right",
  3109. value: n,
  3110. onChange: (i) => a(i.target.value),
  3111. onBlur: o,
  3112. maxLength: 3,
  3113. "aria-label": "Alpha",
  3114. inputMode: "numeric"
  3115. }
  3116. ),
  3117. /* @__PURE__ */ q.jsx(
  3118. "span",
  3119. {
  3120. className: `
  3121. univer-pointer-events-none univer-absolute univer-right-1.5 univer-top-1/2 -univer-translate-y-1/2
  3122. univer-text-sm univer-text-gray-400
  3123. `,
  3124. children: "%"
  3125. }
  3126. )
  3127. ] });
  3128. }
  3129. function Zm({ hsv: e, alpha: t, showAlpha: n, onChangeColor: r, onChangeAlpha: a }) {
  3130. const [o, i] = rt("hex");
  3131. function u(l) {
  3132. switch (l) {
  3133. case "hex":
  3134. return /* @__PURE__ */ q.jsx(Km, { hsv: e, onChange: r });
  3135. case "rgb":
  3136. return /* @__PURE__ */ q.jsx(Ym, { hsv: e, onChange: r });
  3137. case "hsl":
  3138. return /* @__PURE__ */ q.jsx(Gm, { hsv: e, onChange: r });
  3139. default:
  3140. return null;
  3141. }
  3142. }
  3143. return /* @__PURE__ */ q.jsxs(
  3144. "div",
  3145. {
  3146. className: `
  3147. univer-flex univer-gap-2
  3148. [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-8 [&_input]:univer-items-center
  3149. [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid
  3150. [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5
  3151. [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none
  3152. dark:[&_input]:univer-border-gray-600 dark:[&_input]:univer-text-white
  3153. `,
  3154. children: [
  3155. /* @__PURE__ */ q.jsxs(Um, { children: [
  3156. /* @__PURE__ */ q.jsx(qm, { children: /* @__PURE__ */ q.jsxs(
  3157. "a",
  3158. {
  3159. className: `
  3160. univer-box-border univer-flex univer-h-8 univer-flex-1 univer-cursor-pointer
  3161. univer-items-center univer-justify-between univer-gap-1 univer-rounded univer-border
  3162. univer-border-solid univer-border-gray-200 univer-px-1.5 univer-text-sm univer-text-gray-700
  3163. dark:univer-border-gray-600 dark:univer-text-white
  3164. `,
  3165. children: [
  3166. /* @__PURE__ */ q.jsx("span", { children: o.toUpperCase() }),
  3167. /* @__PURE__ */ q.jsx(xc, { className: "univer-size-5 univer-text-gray-400" })
  3168. ]
  3169. }
  3170. ) }),
  3171. /* @__PURE__ */ q.jsx(Bm, { children: /* @__PURE__ */ q.jsxs(
  3172. "div",
  3173. {
  3174. className: `
  3175. univer-grid univer-w-16
  3176. [&>a]:univer-cursor-pointer [&>a]:univer-px-2 [&>a]:univer-py-1 [&>a]:univer-text-sm
  3177. dark:univer-text-white
  3178. `,
  3179. children: [
  3180. /* @__PURE__ */ q.jsx("a", { onClick: () => i("hex"), children: "HEX" }),
  3181. /* @__PURE__ */ q.jsx("a", { onClick: () => i("hsl"), children: "HSL" }),
  3182. /* @__PURE__ */ q.jsx("a", { onClick: () => i("rgb"), children: "RGB" })
  3183. ]
  3184. }
  3185. ) })
  3186. ] }),
  3187. /* @__PURE__ */ q.jsx("div", { className: "univer-relative univer-flex univer-gap-2", children: u(o) }),
  3188. n && /* @__PURE__ */ q.jsx(Xm, { alpha: t, onChange: a })
  3189. ]
  3190. }
  3191. );
  3192. }
  3193. const Qm = [
  3194. ["#EEEFF1", "#E1EFFE", "#FDE8E8", "#FEECDC", "#FFF4B9", "#DEF7EC", "#D5F5F6", "#EDEBFE", "#FCE8F3"],
  3195. ["#CDD0D8", "#A4CAFE", "#F8B4B4", "#FDBA8C", "#FAC815", "#84E1BC", "#7EDCE2", "#CABFFD", "#F8B4D9"],
  3196. ["#979DAC", "#3F83F8", "#F05252", "#FF5A1F", "#D49D0F", "#0DA471", "#0694A2", "#9061F9", "#E74694"],
  3197. ["#414657", "#1A56DB", "#C81E1E", "#B43403", "#9A6D15", "#046C4E", "#036672", "#6C2BD9", "#BF125D"],
  3198. ["#181C2A", "#233876", "#771D1D", "#771D1D", "#634312", "#014737", "#014451", "#4A1D96", "#751A3D"]
  3199. ];
  3200. function Jm({ hsv: e, onChange: t }) {
  3201. const n = Ot((a) => {
  3202. const [o, i, u] = yu(a);
  3203. t(o, i, u);
  3204. }, [t]), r = bu(e[0], e[1], e[2]);
  3205. return /* @__PURE__ */ q.jsx("div", { className: "univer-grid univer-content-center univer-gap-2", children: Qm.map((a, o) => /* @__PURE__ */ q.jsx(
  3206. "div",
  3207. {
  3208. className: "univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2",
  3209. children: a.map((i, u) => /* @__PURE__ */ q.jsx(
  3210. "button",
  3211. {
  3212. type: "button",
  3213. className: Na(`
  3214. univer-h-5 univer-w-5 univer-cursor-pointer univer-rounded-full univer-border-none
  3215. univer-bg-gray-300 univer-transition-shadow
  3216. `, {
  3217. "univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:univer-ring-primary-600 dark:univer-ring-offset-gray-600": i.toUpperCase() === r.toUpperCase()
  3218. }),
  3219. style: { backgroundColor: i },
  3220. onClick: () => n(i)
  3221. },
  3222. u
  3223. ))
  3224. },
  3225. o
  3226. )) });
  3227. }
  3228. function ep({ hsv: e, onChange: t, onChanged: n }) {
  3229. const r = Ce(null), a = Ce(null), [o, i] = rt(!1);
  3230. lt(() => {
  3231. const v = r.current;
  3232. if (!v) return;
  3233. const C = v.getContext("2d");
  3234. if (!C) return;
  3235. const p = C.createLinearGradient(0, 0, v.width, 0);
  3236. p.addColorStop(0, `hsl(${e[0]}, 0%, 50%)`), p.addColorStop(1, `hsl(${e[0]}, 100%, 50%)`), C.fillStyle = p, C.fillRect(0, 0, v.width, v.height);
  3237. const m = C.createLinearGradient(0, 0, 0, v.height);
  3238. m.addColorStop(0, "rgba(255, 255, 255, 0)"), m.addColorStop(1, "rgba(0, 0, 0, 1)"), C.fillStyle = m, C.fillRect(0, 0, v.width, v.height);
  3239. }, [e]);
  3240. const u = (v) => {
  3241. const C = r.current;
  3242. if (!C) return;
  3243. const p = C.getBoundingClientRect(), m = Math.max(0, Math.min(v.clientX - p.left, p.width)), b = Math.max(0, Math.min(v.clientY - p.top, p.height)), f = m / p.width * 100, h = 100 - b / p.height * 100;
  3244. t(e[0], f, h);
  3245. }, l = Ot(() => {
  3246. i(!1);
  3247. }, [e]);
  3248. function c() {
  3249. n == null || n(e[0], e[1], e[2]);
  3250. }
  3251. lt(() => {
  3252. var v;
  3253. return (v = a.current) == null || v.addEventListener("mouseup", c), window.addEventListener("pointerup", l), window.addEventListener("mouseup", l), () => {
  3254. var C;
  3255. (C = a.current) == null || C.removeEventListener("mouseup", c), window.removeEventListener("pointerup", l), window.removeEventListener("mouseup", l);
  3256. };
  3257. }, [e]);
  3258. const s = () => {
  3259. var h, g, y, w;
  3260. const p = (g = (h = a.current) == null ? void 0 : h.clientWidth) != null ? g : 0, m = (w = (y = a.current) == null ? void 0 : y.clientHeight) != null ? w : 0, b = e[1] / 100 * p - 8, f = (100 - e[2]) / 100 * m - 8;
  3261. return {
  3262. transform: `translate(${b}px, ${f}px)`,
  3263. transition: o ? "none" : "transform 0.1s ease-out"
  3264. };
  3265. };
  3266. return lt(() => {
  3267. const v = () => {
  3268. i(!1);
  3269. };
  3270. return window.addEventListener("pointerup", v), window.addEventListener("mouseup", v), () => {
  3271. window.removeEventListener("pointerup", v), window.removeEventListener("mouseup", v);
  3272. };
  3273. }, []), /* @__PURE__ */ q.jsxs(
  3274. "div",
  3275. {
  3276. ref: a,
  3277. className: "univer-relative univer-overflow-hidden",
  3278. children: [
  3279. /* @__PURE__ */ q.jsx(
  3280. "canvas",
  3281. {
  3282. ref: r,
  3283. className: "univer-h-[148px] univer-w-full univer-min-w-[260px] univer-cursor-crosshair univer-rounded",
  3284. onPointerDown: (v) => {
  3285. i(!0), u(v);
  3286. },
  3287. onPointerMove: (v) => o && u(v)
  3288. }
  3289. ),
  3290. /* @__PURE__ */ q.jsx(
  3291. "div",
  3292. {
  3293. className: `
  3294. univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4
  3295. univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2
  3296. univer-ring-white univer-will-change-transform
  3297. `,
  3298. style: s()
  3299. }
  3300. )
  3301. ]
  3302. }
  3303. );
  3304. }
  3305. function tp({ hsv: e, onChange: t, onChanged: n }) {
  3306. const [r, a] = rt(!1), o = Ce(null), i = Ce(null), u = Ht(() => {
  3307. var C, p;
  3308. return (p = (C = i.current) == null ? void 0 : C.clientWidth) != null ? p : 0;
  3309. }, []), l = Ot((C) => {
  3310. const p = o.current;
  3311. if (!p) return;
  3312. const m = p.getBoundingClientRect(), b = m.width - u, f = Math.max(0, Math.min(C - m.left, b)), h = Math.round(f / b * 360);
  3313. t(h, e[1], e[2]);
  3314. }, [e, u, t]), c = Ot((C) => {
  3315. r && l(C.clientX);
  3316. }, [r, l]), s = Ot(() => {
  3317. a(!1), n == null || n(e[0], e[1], e[2]);
  3318. }, [e, n]);
  3319. lt(() => (r && (window.addEventListener("pointermove", c), window.addEventListener("pointerup", s), window.addEventListener("mouseup", s)), () => {
  3320. window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", s), window.removeEventListener("mouseup", s);
  3321. }), [r, c, s]);
  3322. const v = () => {
  3323. var p;
  3324. return `${Math.min(Math.max(e[0], 0), 360) / 360 * (100 - u / ((p = o.current) == null ? void 0 : p.clientWidth) * 100)}%`;
  3325. };
  3326. return /* @__PURE__ */ q.jsx("div", { className: "univer-relative univer-w-full univer-select-none", children: /* @__PURE__ */ q.jsx(
  3327. "div",
  3328. {
  3329. ref: o,
  3330. className: `
  3331. univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
  3332. `,
  3333. style: {
  3334. background: `linear-gradient(to right,
  3335. hsl(0, 100%, 50%),
  3336. hsl(60, 100%, 50%),
  3337. hsl(120, 100%, 50%),
  3338. hsl(180, 100%, 50%),
  3339. hsl(240, 100%, 50%),
  3340. hsl(300, 100%, 50%),
  3341. hsl(360, 100%, 50%))`
  3342. },
  3343. onPointerDown: (C) => {
  3344. a(!0), l(C.clientX);
  3345. },
  3346. children: /* @__PURE__ */ q.jsx(
  3347. "div",
  3348. {
  3349. ref: i,
  3350. className: `
  3351. univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
  3352. univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
  3353. univer-duration-75 univer-will-change-transform
  3354. `,
  3355. style: {
  3356. left: v(),
  3357. transform: "translateY(-50%)",
  3358. transition: r ? "none" : "all 0.1s ease-out"
  3359. }
  3360. }
  3361. )
  3362. }
  3363. ) });
  3364. }
  3365. const np = me.memo(ep), rp = me.memo(tp), ap = me.memo(dm), op = me.memo(Zm), ip = me.memo(Jm);
  3366. function $O({ format: e = "hex", value: t = "#000000", showAlpha: n = !1, onChange: r }) {
  3367. if (!Kr) return null;
  3368. const [a, o] = rt([0, 100, 100]), [i, u] = rt(1), l = Ot((p, m, b) => Da(p, m, b), []);
  3369. lt(() => {
  3370. try {
  3371. if (e === "hex") {
  3372. const [p, m, b] = yu(t);
  3373. o([p, m, b]), u(1);
  3374. }
  3375. } catch (p) {
  3376. console.error("Invalid RGBA value:", p);
  3377. }
  3378. }, [t]);
  3379. function c(p, m, b) {
  3380. o([p, m, b]);
  3381. }
  3382. function s(p, m, b) {
  3383. const [f, h, g] = l(p, m, b);
  3384. if (e === "hex") {
  3385. const y = $c(f, h, g);
  3386. r == null || r(y);
  3387. }
  3388. }
  3389. function v(p) {
  3390. u(p);
  3391. }
  3392. function C(p) {
  3393. if (e === "hex") {
  3394. const m = bu(a[0], a[1], a[2]);
  3395. r == null || r(m);
  3396. }
  3397. }
  3398. return /* @__PURE__ */ q.jsxs(
  3399. "div",
  3400. {
  3401. className: `
  3402. univer-w-[292px] univer-cursor-default univer-space-y-4 univer-rounded-lg univer-bg-white
  3403. dark:univer-bg-gray-700
  3404. `,
  3405. onClick: (p) => p.stopPropagation(),
  3406. children: [
  3407. /* @__PURE__ */ q.jsx(
  3408. np,
  3409. {
  3410. hsv: a,
  3411. onChange: c,
  3412. onChanged: s
  3413. }
  3414. ),
  3415. /* @__PURE__ */ q.jsx(
  3416. rp,
  3417. {
  3418. hsv: a,
  3419. onChange: c,
  3420. onChanged: s
  3421. }
  3422. ),
  3423. n && /* @__PURE__ */ q.jsx(
  3424. ap,
  3425. {
  3426. hsv: a,
  3427. alpha: i,
  3428. onChange: v,
  3429. onChanged: C
  3430. }
  3431. ),
  3432. /* @__PURE__ */ q.jsx(
  3433. op,
  3434. {
  3435. hsv: a,
  3436. alpha: i,
  3437. showAlpha: n,
  3438. onChangeColor: s,
  3439. onChangeAlpha: C
  3440. }
  3441. ),
  3442. /* @__PURE__ */ q.jsx(
  3443. ip,
  3444. {
  3445. hsv: a,
  3446. onChange: (p, m, b) => {
  3447. c(p, m, b), s(p, m, b);
  3448. }
  3449. }
  3450. )
  3451. ]
  3452. }
  3453. );
  3454. }
  3455. function sn() {
  3456. return sn = Object.assign ? Object.assign.bind() : function(e) {
  3457. for (var t = 1; t < arguments.length; t++) {
  3458. var n = arguments[t];
  3459. for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
  3460. }
  3461. return e;
  3462. }, sn.apply(null, arguments);
  3463. }
  3464. function up(e) {
  3465. if (Array.isArray(e)) return e;
  3466. }
  3467. function lp(e, t) {
  3468. var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  3469. if (n != null) {
  3470. var r, a, o, i, u = [], l = !0, c = !1;
  3471. try {
  3472. if (o = (n = n.call(e)).next, t === 0) {
  3473. if (Object(n) !== n) return;
  3474. l = !1;
  3475. } else for (; !(l = (r = o.call(n)).done) && (u.push(r.value), u.length !== t); l = !0) ;
  3476. } catch (s) {
  3477. c = !0, a = s;
  3478. } finally {
  3479. try {
  3480. if (!l && n.return != null && (i = n.return(), Object(i) !== i)) return;
  3481. } finally {
  3482. if (c) throw a;
  3483. }
  3484. }
  3485. return u;
  3486. }
  3487. }
  3488. function cl(e, t) {
  3489. (t == null || t > e.length) && (t = e.length);
  3490. for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
  3491. return r;
  3492. }
  3493. function sp(e, t) {
  3494. if (e) {
  3495. if (typeof e == "string") return cl(e, t);
  3496. var n = {}.toString.call(e).slice(8, -1);
  3497. return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? cl(e, t) : void 0;
  3498. }
  3499. }
  3500. function cp() {
  3501. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  3502. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  3503. }
  3504. function nn(e, t) {
  3505. return up(e) || lp(e, t) || sp(e, t) || cp();
  3506. }
  3507. function dp(e) {
  3508. if (Array.isArray(e)) return e;
  3509. }
  3510. function fp(e, t) {
  3511. var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  3512. if (n != null) {
  3513. var r, a, o, i, u = [], l = !0, c = !1;
  3514. try {
  3515. if (o = (n = n.call(e)).next, t === 0) {
  3516. if (Object(n) !== n) return;
  3517. l = !1;
  3518. } else for (; !(l = (r = o.call(n)).done) && (u.push(r.value), u.length !== t); l = !0) ;
  3519. } catch (s) {
  3520. c = !0, a = s;
  3521. } finally {
  3522. try {
  3523. if (!l && n.return != null && (i = n.return(), Object(i) !== i)) return;
  3524. } finally {
  3525. if (c) throw a;
  3526. }
  3527. }
  3528. return u;
  3529. }
  3530. }
  3531. function Ii(e, t) {
  3532. (t == null || t > e.length) && (t = e.length);
  3533. for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
  3534. return r;
  3535. }
  3536. function Uc(e, t) {
  3537. if (e) {
  3538. if (typeof e == "string") return Ii(e, t);
  3539. var n = {}.toString.call(e).slice(8, -1);
  3540. return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ii(e, t) : void 0;
  3541. }
  3542. }
  3543. function vp() {
  3544. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  3545. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  3546. }
  3547. function cn(e, t) {
  3548. return dp(e) || fp(e, t) || Uc(e, t) || vp();
  3549. }
  3550. function dn() {
  3551. return !!(typeof window < "u" && window.document && window.document.createElement);
  3552. }
  3553. var Oi = {}, mp = function(t) {
  3554. };
  3555. function pp(e, t) {
  3556. }
  3557. function hp(e, t) {
  3558. }
  3559. function gp() {
  3560. Oi = {};
  3561. }
  3562. function qc(e, t, n) {
  3563. !t && !Oi[n] && (e(!1, n), Oi[n] = !0);
  3564. }
  3565. function ur(e, t) {
  3566. qc(pp, e, t);
  3567. }
  3568. function yp(e, t) {
  3569. qc(hp, e, t);
  3570. }
  3571. ur.preMessage = mp;
  3572. ur.resetWarned = gp;
  3573. ur.noteOnce = yp;
  3574. function Dn(e) {
  3575. "@babel/helpers - typeof";
  3576. return Dn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
  3577. return typeof t;
  3578. } : function(t) {
  3579. return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  3580. }, Dn(e);
  3581. }
  3582. var li = { exports: {} }, bt = {};
  3583. /**
  3584. * @license React
  3585. * react-is.production.min.js
  3586. *
  3587. * Copyright (c) Facebook, Inc. and its affiliates.
  3588. *
  3589. * This source code is licensed under the MIT license found in the
  3590. * LICENSE file in the root directory of this source tree.
  3591. */
  3592. var dl;
  3593. function bp() {
  3594. if (dl) return bt;
  3595. dl = 1;
  3596. var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), i = Symbol.for("react.context"), u = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), m;
  3597. m = Symbol.for("react.module.reference");
  3598. function b(f) {
  3599. if (typeof f == "object" && f !== null) {
  3600. var h = f.$$typeof;
  3601. switch (h) {
  3602. case e:
  3603. switch (f = f.type, f) {
  3604. case n:
  3605. case a:
  3606. case r:
  3607. case c:
  3608. case s:
  3609. return f;
  3610. default:
  3611. switch (f = f && f.$$typeof, f) {
  3612. case u:
  3613. case i:
  3614. case l:
  3615. case C:
  3616. case v:
  3617. case o:
  3618. return f;
  3619. default:
  3620. return h;
  3621. }
  3622. }
  3623. case t:
  3624. return h;
  3625. }
  3626. }
  3627. }
  3628. return bt.ContextConsumer = i, bt.ContextProvider = o, bt.Element = e, bt.ForwardRef = l, bt.Fragment = n, bt.Lazy = C, bt.Memo = v, bt.Portal = t, bt.Profiler = a, bt.StrictMode = r, bt.Suspense = c, bt.SuspenseList = s, bt.isAsyncMode = function() {
  3629. return !1;
  3630. }, bt.isConcurrentMode = function() {
  3631. return !1;
  3632. }, bt.isContextConsumer = function(f) {
  3633. return b(f) === i;
  3634. }, bt.isContextProvider = function(f) {
  3635. return b(f) === o;
  3636. }, bt.isElement = function(f) {
  3637. return typeof f == "object" && f !== null && f.$$typeof === e;
  3638. }, bt.isForwardRef = function(f) {
  3639. return b(f) === l;
  3640. }, bt.isFragment = function(f) {
  3641. return b(f) === n;
  3642. }, bt.isLazy = function(f) {
  3643. return b(f) === C;
  3644. }, bt.isMemo = function(f) {
  3645. return b(f) === v;
  3646. }, bt.isPortal = function(f) {
  3647. return b(f) === t;
  3648. }, bt.isProfiler = function(f) {
  3649. return b(f) === a;
  3650. }, bt.isStrictMode = function(f) {
  3651. return b(f) === r;
  3652. }, bt.isSuspense = function(f) {
  3653. return b(f) === c;
  3654. }, bt.isSuspenseList = function(f) {
  3655. return b(f) === s;
  3656. }, bt.isValidElementType = function(f) {
  3657. return typeof f == "string" || typeof f == "function" || f === n || f === a || f === r || f === c || f === s || f === p || typeof f == "object" && f !== null && (f.$$typeof === C || f.$$typeof === v || f.$$typeof === o || f.$$typeof === i || f.$$typeof === l || f.$$typeof === m || f.getModuleId !== void 0);
  3658. }, bt.typeOf = b, bt;
  3659. }
  3660. var fl;
  3661. function Cp() {
  3662. return fl || (fl = 1, li.exports = bp()), li.exports;
  3663. }
  3664. var Ma = Cp();
  3665. function Su(e, t, n) {
  3666. var r = d.useRef({});
  3667. return (!("value" in r.current) || n(r.current.condition, t)) && (r.current.value = e(), r.current.condition = t), r.current.value;
  3668. }
  3669. var jo = function(t, n) {
  3670. typeof t == "function" ? t(n) : Dn(t) === "object" && t && "current" in t && (t.current = n);
  3671. }, lr = function() {
  3672. for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
  3673. n[r] = arguments[r];
  3674. var a = n.filter(Boolean);
  3675. return a.length <= 1 ? a[0] : function(o) {
  3676. n.forEach(function(i) {
  3677. jo(i, o);
  3678. });
  3679. };
  3680. }, Gr = function() {
  3681. for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
  3682. n[r] = arguments[r];
  3683. return Su(function() {
  3684. return lr.apply(void 0, n);
  3685. }, n, function(a, o) {
  3686. return a.length !== o.length || a.every(function(i, u) {
  3687. return i !== o[u];
  3688. });
  3689. });
  3690. }, xr = function(t) {
  3691. var n, r, a = Ma.isMemo(t) ? t.type.type : t.type;
  3692. return !(typeof a == "function" && !((n = a.prototype) !== null && n !== void 0 && n.render) && a.$$typeof !== Ma.ForwardRef || typeof t == "function" && !((r = t.prototype) !== null && r !== void 0 && r.render) && t.$$typeof !== Ma.ForwardRef);
  3693. };
  3694. function vl(e) {
  3695. return /* @__PURE__ */ pc(e) && !Ma.isFragment(e);
  3696. }
  3697. Number(iv.split(".")[0]) >= 19;
  3698. var Kc = /* @__PURE__ */ d.createContext(null);
  3699. function Sp(e) {
  3700. if (Array.isArray(e)) return Ii(e);
  3701. }
  3702. function wp(e) {
  3703. if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
  3704. }
  3705. function xp() {
  3706. throw new TypeError(`Invalid attempt to spread non-iterable instance.
  3707. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  3708. }
  3709. function Yc(e) {
  3710. return Sp(e) || wp(e) || Uc(e) || xp();
  3711. }
  3712. var ml = dn() ? d.useLayoutEffect : d.useEffect, St = function(t, n) {
  3713. var r = d.useRef(!0);
  3714. ml(function() {
  3715. return t(r.current);
  3716. }, n), ml(function() {
  3717. return r.current = !1, function() {
  3718. r.current = !0;
  3719. };
  3720. }, []);
  3721. }, Wr = function(t, n) {
  3722. St(function(r) {
  3723. if (!r)
  3724. return t();
  3725. }, n);
  3726. }, pl = [];
  3727. function Ep(e, t) {
  3728. var n = d.useState(function() {
  3729. if (!dn())
  3730. return null;
  3731. var m = document.createElement("div");
  3732. return m;
  3733. }), r = cn(n, 1), a = r[0], o = d.useRef(!1), i = d.useContext(Kc), u = d.useState(pl), l = cn(u, 2), c = l[0], s = l[1], v = i || (o.current ? void 0 : function(m) {
  3734. s(function(b) {
  3735. var f = [m].concat(Yc(b));
  3736. return f;
  3737. });
  3738. });
  3739. function C() {
  3740. a.parentElement || document.body.appendChild(a), o.current = !0;
  3741. }
  3742. function p() {
  3743. var m;
  3744. (m = a.parentElement) === null || m === void 0 || m.removeChild(a), o.current = !1;
  3745. }
  3746. return St(function() {
  3747. return e ? i ? i(C) : C() : p(), p;
  3748. }, [e]), St(function() {
  3749. c.length && (c.forEach(function(m) {
  3750. return m();
  3751. }), s(pl));
  3752. }, [c]), [a, v];
  3753. }
  3754. function Rp(e, t) {
  3755. if (Dn(e) != "object" || !e) return e;
  3756. var n = e[Symbol.toPrimitive];
  3757. if (n !== void 0) {
  3758. var r = n.call(e, t || "default");
  3759. if (Dn(r) != "object") return r;
  3760. throw new TypeError("@@toPrimitive must return a primitive value.");
  3761. }
  3762. return (t === "string" ? String : Number)(e);
  3763. }
  3764. function Gc(e) {
  3765. var t = Rp(e, "string");
  3766. return Dn(t) == "symbol" ? t : t + "";
  3767. }
  3768. function Xc(e, t, n) {
  3769. return (t = Gc(t)) in e ? Object.defineProperty(e, t, {
  3770. value: n,
  3771. enumerable: !0,
  3772. configurable: !0,
  3773. writable: !0
  3774. }) : e[t] = n, e;
  3775. }
  3776. function hl(e, t) {
  3777. var n = Object.keys(e);
  3778. if (Object.getOwnPropertySymbols) {
  3779. var r = Object.getOwnPropertySymbols(e);
  3780. t && (r = r.filter(function(a) {
  3781. return Object.getOwnPropertyDescriptor(e, a).enumerable;
  3782. })), n.push.apply(n, r);
  3783. }
  3784. return n;
  3785. }
  3786. function Ur(e) {
  3787. for (var t = 1; t < arguments.length; t++) {
  3788. var n = arguments[t] != null ? arguments[t] : {};
  3789. t % 2 ? hl(Object(n), !0).forEach(function(r) {
  3790. Xc(e, r, n[r]);
  3791. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : hl(Object(n)).forEach(function(r) {
  3792. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
  3793. });
  3794. }
  3795. return e;
  3796. }
  3797. function _i(e, t) {
  3798. if (!e)
  3799. return !1;
  3800. if (e.contains)
  3801. return e.contains(t);
  3802. for (var n = t; n; ) {
  3803. if (n === e)
  3804. return !0;
  3805. n = n.parentNode;
  3806. }
  3807. return !1;
  3808. }
  3809. var gl = "data-rc-order", yl = "data-rc-priority", Pp = "rc-util-key", Li = /* @__PURE__ */ new Map();
  3810. function Zc() {
  3811. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  3812. return t ? t.startsWith("data-") ? t : "data-".concat(t) : Pp;
  3813. }
  3814. function Fo(e) {
  3815. if (e.attachTo)
  3816. return e.attachTo;
  3817. var t = document.querySelector("head");
  3818. return t || document.body;
  3819. }
  3820. function Mp(e) {
  3821. return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
  3822. }
  3823. function wu(e) {
  3824. return Array.from((Li.get(e) || e).children).filter(function(t) {
  3825. return t.tagName === "STYLE";
  3826. });
  3827. }
  3828. function Qc(e) {
  3829. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  3830. if (!dn())
  3831. return null;
  3832. var n = t.csp, r = t.prepend, a = t.priority, o = a === void 0 ? 0 : a, i = Mp(r), u = i === "prependQueue", l = document.createElement("style");
  3833. l.setAttribute(gl, i), u && o && l.setAttribute(yl, "".concat(o)), n != null && n.nonce && (l.nonce = n == null ? void 0 : n.nonce), l.innerHTML = e;
  3834. var c = Fo(t), s = c.firstChild;
  3835. if (r) {
  3836. if (u) {
  3837. var v = (t.styles || wu(c)).filter(function(C) {
  3838. if (!["prepend", "prependQueue"].includes(C.getAttribute(gl)))
  3839. return !1;
  3840. var p = Number(C.getAttribute(yl) || 0);
  3841. return o >= p;
  3842. });
  3843. if (v.length)
  3844. return c.insertBefore(l, v[v.length - 1].nextSibling), l;
  3845. }
  3846. c.insertBefore(l, s);
  3847. } else
  3848. c.appendChild(l);
  3849. return l;
  3850. }
  3851. function Jc(e) {
  3852. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Fo(t);
  3853. return (t.styles || wu(n)).find(function(r) {
  3854. return r.getAttribute(Zc(t)) === e;
  3855. });
  3856. }
  3857. function Ti(e) {
  3858. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Jc(e, t);
  3859. if (n) {
  3860. var r = Fo(t);
  3861. r.removeChild(n);
  3862. }
  3863. }
  3864. function kp(e, t) {
  3865. var n = Li.get(e);
  3866. if (!n || !_i(document, n)) {
  3867. var r = Qc("", t), a = r.parentNode;
  3868. Li.set(e, a), e.removeChild(r);
  3869. }
  3870. }
  3871. function ed(e, t) {
  3872. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = Fo(n), a = wu(r), o = Ur(Ur({}, n), {}, {
  3873. styles: a
  3874. });
  3875. kp(r, o);
  3876. var i = Jc(t, o);
  3877. if (i) {
  3878. var u, l;
  3879. if ((u = o.csp) !== null && u !== void 0 && u.nonce && i.nonce !== ((l = o.csp) === null || l === void 0 ? void 0 : l.nonce)) {
  3880. var c;
  3881. i.nonce = (c = o.csp) === null || c === void 0 ? void 0 : c.nonce;
  3882. }
  3883. return i.innerHTML !== e && (i.innerHTML = e), i;
  3884. }
  3885. var s = Qc(e, o);
  3886. return s.setAttribute(Zc(o), t), s;
  3887. }
  3888. function Dp(e) {
  3889. var t = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), n = document.createElement("div");
  3890. n.id = t;
  3891. var r = n.style;
  3892. r.position = "absolute", r.left = "0", r.top = "0", r.width = "100px", r.height = "100px", r.overflow = "scroll";
  3893. var a, o;
  3894. if (e) {
  3895. var i = getComputedStyle(e);
  3896. r.scrollbarColor = i.scrollbarColor, r.scrollbarWidth = i.scrollbarWidth;
  3897. var u = getComputedStyle(e, "::-webkit-scrollbar"), l = parseInt(u.width, 10), c = parseInt(u.height, 10);
  3898. try {
  3899. var s = l ? "width: ".concat(u.width, ";") : "", v = c ? "height: ".concat(u.height, ";") : "";
  3900. ed(`
  3901. #`.concat(t, `::-webkit-scrollbar {
  3902. `).concat(s, `
  3903. `).concat(v, `
  3904. }`), t);
  3905. } catch (m) {
  3906. console.error(m), a = l, o = c;
  3907. }
  3908. }
  3909. document.body.appendChild(n);
  3910. var C = e && a && !isNaN(a) ? a : n.offsetWidth - n.clientWidth, p = e && o && !isNaN(o) ? o : n.offsetHeight - n.clientHeight;
  3911. return document.body.removeChild(n), Ti(t), {
  3912. width: C,
  3913. height: p
  3914. };
  3915. }
  3916. function Np(e) {
  3917. return typeof document > "u" || !e || !(e instanceof Element) ? {
  3918. width: 0,
  3919. height: 0
  3920. } : Dp(e);
  3921. }
  3922. function Ip() {
  3923. return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
  3924. }
  3925. var Op = "rc-util-locker-".concat(Date.now()), bl = 0;
  3926. function _p(e) {
  3927. var t = !!e, n = d.useState(function() {
  3928. return bl += 1, "".concat(Op, "_").concat(bl);
  3929. }), r = cn(n, 1), a = r[0];
  3930. St(function() {
  3931. if (t) {
  3932. var o = Np(document.body).width, i = Ip();
  3933. ed(`
  3934. html body {
  3935. overflow-y: hidden;
  3936. `.concat(i ? "width: calc(100% - ".concat(o, "px);") : "", `
  3937. }`), a);
  3938. } else
  3939. Ti(a);
  3940. return function() {
  3941. Ti(a);
  3942. };
  3943. }, [t, a]);
  3944. }
  3945. var Lp = !1;
  3946. function Tp(e) {
  3947. return Lp;
  3948. }
  3949. var Cl = function(t) {
  3950. return t === !1 ? !1 : !dn() || !t ? null : typeof t == "string" ? document.querySelector(t) : typeof t == "function" ? t() : t;
  3951. }, xu = /* @__PURE__ */ d.forwardRef(function(e, t) {
  3952. var n = e.open, r = e.autoLock, a = e.getContainer;
  3953. e.debug;
  3954. var o = e.autoDestroy, i = o === void 0 ? !0 : o, u = e.children, l = d.useState(n), c = cn(l, 2), s = c[0], v = c[1], C = s || n;
  3955. d.useEffect(function() {
  3956. (i || n) && v(n);
  3957. }, [n, i]);
  3958. var p = d.useState(function() {
  3959. return Cl(a);
  3960. }), m = cn(p, 2), b = m[0], f = m[1];
  3961. d.useEffect(function() {
  3962. var O = Cl(a);
  3963. f(O != null ? O : null);
  3964. });
  3965. var h = Ep(C && !b), g = cn(h, 2), y = g[0], w = g[1], E = b != null ? b : y;
  3966. _p(r && n && dn() && (E === y || E === document.body));
  3967. var S = null;
  3968. if (u && xr(u) && t) {
  3969. var x = u;
  3970. S = x.ref;
  3971. }
  3972. var R = Gr(S, t);
  3973. if (!C || !dn() || b === void 0)
  3974. return null;
  3975. var k = E === !1 || Tp(), L = u;
  3976. return t && (L = /* @__PURE__ */ d.cloneElement(u, {
  3977. ref: R
  3978. })), /* @__PURE__ */ d.createElement(Kc.Provider, {
  3979. value: w
  3980. }, k ? L : /* @__PURE__ */ $a(L, E));
  3981. }), td = /* @__PURE__ */ d.createContext({});
  3982. function fn(e) {
  3983. "@babel/helpers - typeof";
  3984. return fn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
  3985. return typeof t;
  3986. } : function(t) {
  3987. return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  3988. }, fn(e);
  3989. }
  3990. function $p(e, t) {
  3991. if (fn(e) != "object" || !e) return e;
  3992. var n = e[Symbol.toPrimitive];
  3993. if (n !== void 0) {
  3994. var r = n.call(e, t || "default");
  3995. if (fn(r) != "object") return r;
  3996. throw new TypeError("@@toPrimitive must return a primitive value.");
  3997. }
  3998. return (t === "string" ? String : Number)(e);
  3999. }
  4000. function nd(e) {
  4001. var t = $p(e, "string");
  4002. return fn(t) == "symbol" ? t : t + "";
  4003. }
  4004. function At(e, t, n) {
  4005. return (t = nd(t)) in e ? Object.defineProperty(e, t, {
  4006. value: n,
  4007. enumerable: !0,
  4008. configurable: !0,
  4009. writable: !0
  4010. }) : e[t] = n, e;
  4011. }
  4012. function Sl(e, t) {
  4013. var n = Object.keys(e);
  4014. if (Object.getOwnPropertySymbols) {
  4015. var r = Object.getOwnPropertySymbols(e);
  4016. t && (r = r.filter(function(a) {
  4017. return Object.getOwnPropertyDescriptor(e, a).enumerable;
  4018. })), n.push.apply(n, r);
  4019. }
  4020. return n;
  4021. }
  4022. function et(e) {
  4023. for (var t = 1; t < arguments.length; t++) {
  4024. var n = arguments[t] != null ? arguments[t] : {};
  4025. t % 2 ? Sl(Object(n), !0).forEach(function(r) {
  4026. At(e, r, n[r]);
  4027. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Sl(Object(n)).forEach(function(r) {
  4028. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
  4029. });
  4030. }
  4031. return e;
  4032. }
  4033. var si = { exports: {} };
  4034. /*!
  4035. Copyright (c) 2018 Jed Watson.
  4036. Licensed under the MIT License (MIT), see
  4037. http://jedwatson.github.io/classnames
  4038. */
  4039. var wl;
  4040. function Ap() {
  4041. return wl || (wl = 1, function(e) {
  4042. (function() {
  4043. var t = {}.hasOwnProperty;
  4044. function n() {
  4045. for (var o = "", i = 0; i < arguments.length; i++) {
  4046. var u = arguments[i];
  4047. u && (o = a(o, r(u)));
  4048. }
  4049. return o;
  4050. }
  4051. function r(o) {
  4052. if (typeof o == "string" || typeof o == "number")
  4053. return o;
  4054. if (typeof o != "object")
  4055. return "";
  4056. if (Array.isArray(o))
  4057. return n.apply(null, o);
  4058. if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
  4059. return o.toString();
  4060. var i = "";
  4061. for (var u in o)
  4062. t.call(o, u) && o[u] && (i = a(i, u));
  4063. return i;
  4064. }
  4065. function a(o, i) {
  4066. return i ? o ? o + " " + i : o + i : o;
  4067. }
  4068. e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
  4069. })();
  4070. }(si)), si.exports;
  4071. }
  4072. var jp = Ap();
  4073. const xe = /* @__PURE__ */ Aa(jp);
  4074. function Fp() {
  4075. var e = Ur({}, d);
  4076. return e.useId;
  4077. }
  4078. var xl = 0, El = Fp();
  4079. const rd = El ? (
  4080. // Use React `useId`
  4081. function(t) {
  4082. var n = El();
  4083. return t || n;
  4084. }
  4085. ) : (
  4086. // Use compatible of `useId`
  4087. function(t) {
  4088. var n = d.useState("ssr-id"), r = cn(n, 2), a = r[0], o = r[1];
  4089. return d.useEffect(function() {
  4090. var i = xl;
  4091. xl += 1, o("rc_unique_".concat(i));
  4092. }, []), t || a;
  4093. }
  4094. );
  4095. var fe = {
  4096. /**
  4097. * MAC_ENTER
  4098. */
  4099. MAC_ENTER: 3,
  4100. /**
  4101. * BACKSPACE
  4102. */
  4103. BACKSPACE: 8,
  4104. /**
  4105. * TAB
  4106. */
  4107. TAB: 9,
  4108. /**
  4109. * NUMLOCK on FF/Safari Mac
  4110. */
  4111. NUM_CENTER: 12,
  4112. // NUMLOCK on FF/Safari Mac
  4113. /**
  4114. * ENTER
  4115. */
  4116. ENTER: 13,
  4117. /**
  4118. * SHIFT
  4119. */
  4120. SHIFT: 16,
  4121. /**
  4122. * CTRL
  4123. */
  4124. CTRL: 17,
  4125. /**
  4126. * ALT
  4127. */
  4128. ALT: 18,
  4129. /**
  4130. * PAUSE
  4131. */
  4132. PAUSE: 19,
  4133. /**
  4134. * CAPS_LOCK
  4135. */
  4136. CAPS_LOCK: 20,
  4137. /**
  4138. * ESC
  4139. */
  4140. ESC: 27,
  4141. /**
  4142. * SPACE
  4143. */
  4144. SPACE: 32,
  4145. /**
  4146. * PAGE_UP
  4147. */
  4148. PAGE_UP: 33,
  4149. // also NUM_NORTH_EAST
  4150. /**
  4151. * PAGE_DOWN
  4152. */
  4153. PAGE_DOWN: 34,
  4154. // also NUM_SOUTH_EAST
  4155. /**
  4156. * END
  4157. */
  4158. END: 35,
  4159. // also NUM_SOUTH_WEST
  4160. /**
  4161. * HOME
  4162. */
  4163. HOME: 36,
  4164. // also NUM_NORTH_WEST
  4165. /**
  4166. * LEFT
  4167. */
  4168. LEFT: 37,
  4169. // also NUM_WEST
  4170. /**
  4171. * UP
  4172. */
  4173. UP: 38,
  4174. // also NUM_NORTH
  4175. /**
  4176. * RIGHT
  4177. */
  4178. RIGHT: 39,
  4179. // also NUM_EAST
  4180. /**
  4181. * DOWN
  4182. */
  4183. DOWN: 40,
  4184. // also NUM_SOUTH
  4185. /**
  4186. * PRINT_SCREEN
  4187. */
  4188. PRINT_SCREEN: 44,
  4189. /**
  4190. * INSERT
  4191. */
  4192. INSERT: 45,
  4193. // also NUM_INSERT
  4194. /**
  4195. * DELETE
  4196. */
  4197. DELETE: 46,
  4198. // also NUM_DELETE
  4199. /**
  4200. * ZERO
  4201. */
  4202. ZERO: 48,
  4203. /**
  4204. * ONE
  4205. */
  4206. ONE: 49,
  4207. /**
  4208. * TWO
  4209. */
  4210. TWO: 50,
  4211. /**
  4212. * THREE
  4213. */
  4214. THREE: 51,
  4215. /**
  4216. * FOUR
  4217. */
  4218. FOUR: 52,
  4219. /**
  4220. * FIVE
  4221. */
  4222. FIVE: 53,
  4223. /**
  4224. * SIX
  4225. */
  4226. SIX: 54,
  4227. /**
  4228. * SEVEN
  4229. */
  4230. SEVEN: 55,
  4231. /**
  4232. * EIGHT
  4233. */
  4234. EIGHT: 56,
  4235. /**
  4236. * NINE
  4237. */
  4238. NINE: 57,
  4239. /**
  4240. * QUESTION_MARK
  4241. */
  4242. QUESTION_MARK: 63,
  4243. // needs localization
  4244. /**
  4245. * A
  4246. */
  4247. A: 65,
  4248. /**
  4249. * B
  4250. */
  4251. B: 66,
  4252. /**
  4253. * C
  4254. */
  4255. C: 67,
  4256. /**
  4257. * D
  4258. */
  4259. D: 68,
  4260. /**
  4261. * E
  4262. */
  4263. E: 69,
  4264. /**
  4265. * F
  4266. */
  4267. F: 70,
  4268. /**
  4269. * G
  4270. */
  4271. G: 71,
  4272. /**
  4273. * H
  4274. */
  4275. H: 72,
  4276. /**
  4277. * I
  4278. */
  4279. I: 73,
  4280. /**
  4281. * J
  4282. */
  4283. J: 74,
  4284. /**
  4285. * K
  4286. */
  4287. K: 75,
  4288. /**
  4289. * L
  4290. */
  4291. L: 76,
  4292. /**
  4293. * M
  4294. */
  4295. M: 77,
  4296. /**
  4297. * N
  4298. */
  4299. N: 78,
  4300. /**
  4301. * O
  4302. */
  4303. O: 79,
  4304. /**
  4305. * P
  4306. */
  4307. P: 80,
  4308. /**
  4309. * Q
  4310. */
  4311. Q: 81,
  4312. /**
  4313. * R
  4314. */
  4315. R: 82,
  4316. /**
  4317. * S
  4318. */
  4319. S: 83,
  4320. /**
  4321. * T
  4322. */
  4323. T: 84,
  4324. /**
  4325. * U
  4326. */
  4327. U: 85,
  4328. /**
  4329. * V
  4330. */
  4331. V: 86,
  4332. /**
  4333. * W
  4334. */
  4335. W: 87,
  4336. /**
  4337. * X
  4338. */
  4339. X: 88,
  4340. /**
  4341. * Y
  4342. */
  4343. Y: 89,
  4344. /**
  4345. * Z
  4346. */
  4347. Z: 90,
  4348. /**
  4349. * META
  4350. */
  4351. META: 91,
  4352. // WIN_KEY_LEFT
  4353. /**
  4354. * WIN_KEY_RIGHT
  4355. */
  4356. WIN_KEY_RIGHT: 92,
  4357. /**
  4358. * CONTEXT_MENU
  4359. */
  4360. CONTEXT_MENU: 93,
  4361. /**
  4362. * NUM_ZERO
  4363. */
  4364. NUM_ZERO: 96,
  4365. /**
  4366. * NUM_ONE
  4367. */
  4368. NUM_ONE: 97,
  4369. /**
  4370. * NUM_TWO
  4371. */
  4372. NUM_TWO: 98,
  4373. /**
  4374. * NUM_THREE
  4375. */
  4376. NUM_THREE: 99,
  4377. /**
  4378. * NUM_FOUR
  4379. */
  4380. NUM_FOUR: 100,
  4381. /**
  4382. * NUM_FIVE
  4383. */
  4384. NUM_FIVE: 101,
  4385. /**
  4386. * NUM_SIX
  4387. */
  4388. NUM_SIX: 102,
  4389. /**
  4390. * NUM_SEVEN
  4391. */
  4392. NUM_SEVEN: 103,
  4393. /**
  4394. * NUM_EIGHT
  4395. */
  4396. NUM_EIGHT: 104,
  4397. /**
  4398. * NUM_NINE
  4399. */
  4400. NUM_NINE: 105,
  4401. /**
  4402. * NUM_MULTIPLY
  4403. */
  4404. NUM_MULTIPLY: 106,
  4405. /**
  4406. * NUM_PLUS
  4407. */
  4408. NUM_PLUS: 107,
  4409. /**
  4410. * NUM_MINUS
  4411. */
  4412. NUM_MINUS: 109,
  4413. /**
  4414. * NUM_PERIOD
  4415. */
  4416. NUM_PERIOD: 110,
  4417. /**
  4418. * NUM_DIVISION
  4419. */
  4420. NUM_DIVISION: 111,
  4421. /**
  4422. * F1
  4423. */
  4424. F1: 112,
  4425. /**
  4426. * F2
  4427. */
  4428. F2: 113,
  4429. /**
  4430. * F3
  4431. */
  4432. F3: 114,
  4433. /**
  4434. * F4
  4435. */
  4436. F4: 115,
  4437. /**
  4438. * F5
  4439. */
  4440. F5: 116,
  4441. /**
  4442. * F6
  4443. */
  4444. F6: 117,
  4445. /**
  4446. * F7
  4447. */
  4448. F7: 118,
  4449. /**
  4450. * F8
  4451. */
  4452. F8: 119,
  4453. /**
  4454. * F9
  4455. */
  4456. F9: 120,
  4457. /**
  4458. * F10
  4459. */
  4460. F10: 121,
  4461. /**
  4462. * F11
  4463. */
  4464. F11: 122,
  4465. /**
  4466. * F12
  4467. */
  4468. F12: 123,
  4469. /**
  4470. * NUMLOCK
  4471. */
  4472. NUMLOCK: 144,
  4473. /**
  4474. * SEMICOLON
  4475. */
  4476. SEMICOLON: 186,
  4477. // needs localization
  4478. /**
  4479. * DASH
  4480. */
  4481. DASH: 189,
  4482. // needs localization
  4483. /**
  4484. * EQUALS
  4485. */
  4486. EQUALS: 187,
  4487. // needs localization
  4488. /**
  4489. * COMMA
  4490. */
  4491. COMMA: 188,
  4492. // needs localization
  4493. /**
  4494. * PERIOD
  4495. */
  4496. PERIOD: 190,
  4497. // needs localization
  4498. /**
  4499. * SLASH
  4500. */
  4501. SLASH: 191,
  4502. // needs localization
  4503. /**
  4504. * APOSTROPHE
  4505. */
  4506. APOSTROPHE: 192,
  4507. // needs localization
  4508. /**
  4509. * SINGLE_QUOTE
  4510. */
  4511. SINGLE_QUOTE: 222,
  4512. // needs localization
  4513. /**
  4514. * OPEN_SQUARE_BRACKET
  4515. */
  4516. OPEN_SQUARE_BRACKET: 219,
  4517. // needs localization
  4518. /**
  4519. * BACKSLASH
  4520. */
  4521. BACKSLASH: 220,
  4522. // needs localization
  4523. /**
  4524. * CLOSE_SQUARE_BRACKET
  4525. */
  4526. CLOSE_SQUARE_BRACKET: 221,
  4527. // needs localization
  4528. /**
  4529. * WIN_KEY
  4530. */
  4531. WIN_KEY: 224,
  4532. /**
  4533. * MAC_FF_META
  4534. */
  4535. MAC_FF_META: 224,
  4536. // Firefox (Gecko) fires this for the meta key instead of 91
  4537. /**
  4538. * WIN_IME
  4539. */
  4540. WIN_IME: 229,
  4541. // ======================== Function ========================
  4542. /**
  4543. * whether text and modified key is entered at the same time.
  4544. */
  4545. isTextModifyingKeyEvent: function(t) {
  4546. var n = t.keyCode;
  4547. if (t.altKey && !t.ctrlKey || t.metaKey || // Function keys don't generate text
  4548. n >= fe.F1 && n <= fe.F12)
  4549. return !1;
  4550. switch (n) {
  4551. case fe.ALT:
  4552. case fe.CAPS_LOCK:
  4553. case fe.CONTEXT_MENU:
  4554. case fe.CTRL:
  4555. case fe.DOWN:
  4556. case fe.END:
  4557. case fe.ESC:
  4558. case fe.HOME:
  4559. case fe.INSERT:
  4560. case fe.LEFT:
  4561. case fe.MAC_FF_META:
  4562. case fe.META:
  4563. case fe.NUMLOCK:
  4564. case fe.NUM_CENTER:
  4565. case fe.PAGE_DOWN:
  4566. case fe.PAGE_UP:
  4567. case fe.PAUSE:
  4568. case fe.PRINT_SCREEN:
  4569. case fe.RIGHT:
  4570. case fe.SHIFT:
  4571. case fe.UP:
  4572. case fe.WIN_KEY:
  4573. case fe.WIN_KEY_RIGHT:
  4574. return !1;
  4575. default:
  4576. return !0;
  4577. }
  4578. },
  4579. /**
  4580. * whether character is entered.
  4581. */
  4582. isCharacterKey: function(t) {
  4583. if (t >= fe.ZERO && t <= fe.NINE || t >= fe.NUM_ZERO && t <= fe.NUM_MULTIPLY || t >= fe.A && t <= fe.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && t === 0)
  4584. return !0;
  4585. switch (t) {
  4586. case fe.SPACE:
  4587. case fe.QUESTION_MARK:
  4588. case fe.NUM_PLUS:
  4589. case fe.NUM_MINUS:
  4590. case fe.NUM_PERIOD:
  4591. case fe.NUM_DIVISION:
  4592. case fe.SEMICOLON:
  4593. case fe.DASH:
  4594. case fe.EQUALS:
  4595. case fe.COMMA:
  4596. case fe.PERIOD:
  4597. case fe.SLASH:
  4598. case fe.APOSTROPHE:
  4599. case fe.SINGLE_QUOTE:
  4600. case fe.OPEN_SQUARE_BRACKET:
  4601. case fe.BACKSLASH:
  4602. case fe.CLOSE_SQUARE_BRACKET:
  4603. return !0;
  4604. default:
  4605. return !1;
  4606. }
  4607. }
  4608. }, zp = `accept acceptCharset accessKey action allowFullScreen allowTransparency
  4609. alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
  4610. charSet checked classID className colSpan cols content contentEditable contextMenu
  4611. controls coords crossOrigin data dateTime default defer dir disabled download draggable
  4612. encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
  4613. headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
  4614. is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
  4615. mediaGroup method min minLength multiple muted name noValidate nonce open
  4616. optimum pattern placeholder poster preload radioGroup readOnly rel required
  4617. reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
  4618. shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
  4619. summary tabIndex target title type useMap value width wmode wrap`, Hp = `onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
  4620. onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
  4621. onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
  4622. onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
  4623. onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
  4624. onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
  4625. onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`, Vp = "".concat(zp, " ").concat(Hp).split(/[\s\n]+/), Wp = "aria-", Bp = "data-";
  4626. function Rl(e, t) {
  4627. return e.indexOf(t) === 0;
  4628. }
  4629. function or(e) {
  4630. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  4631. t === !1 ? n = {
  4632. aria: !0,
  4633. data: !0,
  4634. attr: !0
  4635. } : t === !0 ? n = {
  4636. aria: !0
  4637. } : n = Ur({}, t);
  4638. var r = {};
  4639. return Object.keys(e).forEach(function(a) {
  4640. // Aria
  4641. (n.aria && (a === "role" || Rl(a, Wp)) || // Data
  4642. n.data && Rl(a, Bp) || // Attr
  4643. n.attr && Vp.includes(a)) && (r[a] = e[a]);
  4644. }), r;
  4645. }
  4646. function Pl(e, t, n) {
  4647. var r = t;
  4648. return !r && n && (r = "".concat(e, "-").concat(n)), r;
  4649. }
  4650. function Ml(e, t) {
  4651. var n = e["page".concat(t ? "Y" : "X", "Offset")], r = "scroll".concat(t ? "Top" : "Left");
  4652. if (typeof n != "number") {
  4653. var a = e.document;
  4654. n = a.documentElement[r], typeof n != "number" && (n = a.body[r]);
  4655. }
  4656. return n;
  4657. }
  4658. function Up(e) {
  4659. var t = e.getBoundingClientRect(), n = {
  4660. left: t.left,
  4661. top: t.top
  4662. }, r = e.ownerDocument, a = r.defaultView || r.parentWindow;
  4663. return n.left += Ml(a), n.top += Ml(a, !0), n;
  4664. }
  4665. function Ia(e) {
  4666. return e instanceof HTMLElement || e instanceof SVGElement;
  4667. }
  4668. function qp(e) {
  4669. return e && Dn(e) === "object" && Ia(e.nativeElement) ? e.nativeElement : Ia(e) ? e : null;
  4670. }
  4671. function Br(e) {
  4672. var t = qp(e);
  4673. if (t)
  4674. return t;
  4675. if (e instanceof me.Component) {
  4676. var n;
  4677. return (n = nr.findDOMNode) === null || n === void 0 ? void 0 : n.call(nr, e);
  4678. }
  4679. return null;
  4680. }
  4681. function Kp(e, t) {
  4682. if (e == null) return {};
  4683. var n = {};
  4684. for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
  4685. if (t.includes(r)) continue;
  4686. n[r] = e[r];
  4687. }
  4688. return n;
  4689. }
  4690. function $i(e, t) {
  4691. if (e == null) return {};
  4692. var n, r, a = Kp(e, t);
  4693. if (Object.getOwnPropertySymbols) {
  4694. var o = Object.getOwnPropertySymbols(e);
  4695. for (r = 0; r < o.length; r++) n = o[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
  4696. }
  4697. return a;
  4698. }
  4699. var Yp = /* @__PURE__ */ d.createContext({});
  4700. function ad(e, t) {
  4701. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
  4702. }
  4703. function kl(e, t) {
  4704. for (var n = 0; n < t.length; n++) {
  4705. var r = t[n];
  4706. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, nd(r.key), r);
  4707. }
  4708. }
  4709. function od(e, t, n) {
  4710. return t && kl(e.prototype, t), n && kl(e, n), Object.defineProperty(e, "prototype", {
  4711. writable: !1
  4712. }), e;
  4713. }
  4714. function Ai(e, t) {
  4715. return Ai = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
  4716. return n.__proto__ = r, n;
  4717. }, Ai(e, t);
  4718. }
  4719. function id(e, t) {
  4720. if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
  4721. e.prototype = Object.create(t && t.prototype, {
  4722. constructor: {
  4723. value: e,
  4724. writable: !0,
  4725. configurable: !0
  4726. }
  4727. }), Object.defineProperty(e, "prototype", {
  4728. writable: !1
  4729. }), t && Ai(e, t);
  4730. }
  4731. function Mo(e) {
  4732. return Mo = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
  4733. return t.__proto__ || Object.getPrototypeOf(t);
  4734. }, Mo(e);
  4735. }
  4736. function ud() {
  4737. try {
  4738. var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  4739. }));
  4740. } catch {
  4741. }
  4742. return (ud = function() {
  4743. return !!e;
  4744. })();
  4745. }
  4746. function ji(e) {
  4747. if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  4748. return e;
  4749. }
  4750. function Gp(e, t) {
  4751. if (t && (fn(t) == "object" || typeof t == "function")) return t;
  4752. if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
  4753. return ji(e);
  4754. }
  4755. function ld(e) {
  4756. var t = ud();
  4757. return function() {
  4758. var n, r = Mo(e);
  4759. if (t) {
  4760. var a = Mo(this).constructor;
  4761. n = Reflect.construct(r, arguments, a);
  4762. } else n = r.apply(this, arguments);
  4763. return Gp(this, n);
  4764. };
  4765. }
  4766. var Xp = /* @__PURE__ */ function(e) {
  4767. id(n, e);
  4768. var t = ld(n);
  4769. function n() {
  4770. return ad(this, n), t.apply(this, arguments);
  4771. }
  4772. return od(n, [{
  4773. key: "render",
  4774. value: function() {
  4775. return this.props.children;
  4776. }
  4777. }]), n;
  4778. }(d.Component);
  4779. function Ct(e) {
  4780. var t = d.useRef();
  4781. t.current = e;
  4782. var n = d.useCallback(function() {
  4783. for (var r, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
  4784. o[i] = arguments[i];
  4785. return (r = t.current) === null || r === void 0 ? void 0 : r.call.apply(r, [t].concat(o));
  4786. }, []);
  4787. return n;
  4788. }
  4789. function ir(e) {
  4790. var t = d.useRef(!1), n = d.useState(e), r = cn(n, 2), a = r[0], o = r[1];
  4791. d.useEffect(function() {
  4792. return t.current = !1, function() {
  4793. t.current = !0;
  4794. };
  4795. }, []);
  4796. function i(u, l) {
  4797. l && t.current || o(u);
  4798. }
  4799. return [a, i];
  4800. }
  4801. function ci(e) {
  4802. return e !== void 0;
  4803. }
  4804. function Gt(e, t) {
  4805. var n = t || {}, r = n.defaultValue, a = n.value, o = n.onChange, i = n.postState, u = ir(function() {
  4806. return ci(a) ? a : ci(r) ? typeof r == "function" ? r() : r : typeof e == "function" ? e() : e;
  4807. }), l = cn(u, 2), c = l[0], s = l[1], v = a !== void 0 ? a : c, C = i ? i(v) : v, p = Ct(o), m = ir([v]), b = cn(m, 2), f = b[0], h = b[1];
  4808. Wr(function() {
  4809. var y = f[0];
  4810. c !== y && p(c, y);
  4811. }, [f]), Wr(function() {
  4812. ci(a) || s(a);
  4813. }, [a]);
  4814. var g = Ct(function(y, w) {
  4815. s(y, w), h([v], w);
  4816. });
  4817. return [C, g];
  4818. }
  4819. function sd(e) {
  4820. var t = d.useReducer(function(u) {
  4821. return u + 1;
  4822. }, 0), n = cn(t, 2), r = n[1], a = d.useRef(e), o = Ct(function() {
  4823. return a.current;
  4824. }), i = Ct(function(u) {
  4825. a.current = typeof u == "function" ? u(a.current) : u, r();
  4826. });
  4827. return [o, i];
  4828. }
  4829. var Jn = "none", Ya = "appear", Ga = "enter", Xa = "leave", Dl = "none", Pn = "prepare", jr = "start", Fr = "active", Eu = "end", cd = "prepared";
  4830. function Nl(e, t) {
  4831. var n = {};
  4832. return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit".concat(e)] = "webkit".concat(t), n["Moz".concat(e)] = "moz".concat(t), n["ms".concat(e)] = "MS".concat(t), n["O".concat(e)] = "o".concat(t.toLowerCase()), n;
  4833. }
  4834. function Zp(e, t) {
  4835. var n = {
  4836. animationend: Nl("Animation", "AnimationEnd"),
  4837. transitionend: Nl("Transition", "TransitionEnd")
  4838. };
  4839. return e && ("AnimationEvent" in t || delete n.animationend.animation, "TransitionEvent" in t || delete n.transitionend.transition), n;
  4840. }
  4841. var Qp = Zp(dn(), typeof window < "u" ? window : {}), dd = {};
  4842. if (dn()) {
  4843. var Jp = document.createElement("div");
  4844. dd = Jp.style;
  4845. }
  4846. var Za = {};
  4847. function fd(e) {
  4848. if (Za[e])
  4849. return Za[e];
  4850. var t = Qp[e];
  4851. if (t)
  4852. for (var n = Object.keys(t), r = n.length, a = 0; a < r; a += 1) {
  4853. var o = n[a];
  4854. if (Object.prototype.hasOwnProperty.call(t, o) && o in dd)
  4855. return Za[e] = t[o], Za[e];
  4856. }
  4857. return "";
  4858. }
  4859. var vd = fd("animationend"), md = fd("transitionend"), pd = !!(vd && md), Il = vd || "animationend", Ol = md || "transitionend";
  4860. function _l(e, t) {
  4861. if (!e) return null;
  4862. if (fn(e) === "object") {
  4863. var n = t.replace(/-\w/g, function(r) {
  4864. return r[1].toUpperCase();
  4865. });
  4866. return e[n];
  4867. }
  4868. return "".concat(e, "-").concat(t);
  4869. }
  4870. const eh = function(e) {
  4871. var t = Ce();
  4872. function n(a) {
  4873. a && (a.removeEventListener(Ol, e), a.removeEventListener(Il, e));
  4874. }
  4875. function r(a) {
  4876. t.current && t.current !== a && n(t.current), a && a !== t.current && (a.addEventListener(Ol, e), a.addEventListener(Il, e), t.current = a);
  4877. }
  4878. return d.useEffect(function() {
  4879. return function() {
  4880. n(t.current);
  4881. };
  4882. }, []), [r, n];
  4883. };
  4884. var hd = dn() ? gc : lt, gd = function(t) {
  4885. return +setTimeout(t, 16);
  4886. }, yd = function(t) {
  4887. return clearTimeout(t);
  4888. };
  4889. typeof window < "u" && "requestAnimationFrame" in window && (gd = function(t) {
  4890. return window.requestAnimationFrame(t);
  4891. }, yd = function(t) {
  4892. return window.cancelAnimationFrame(t);
  4893. });
  4894. var Ll = 0, Ru = /* @__PURE__ */ new Map();
  4895. function bd(e) {
  4896. Ru.delete(e);
  4897. }
  4898. var st = function(t) {
  4899. var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  4900. Ll += 1;
  4901. var r = Ll;
  4902. function a(o) {
  4903. if (o === 0)
  4904. bd(r), t();
  4905. else {
  4906. var i = gd(function() {
  4907. a(o - 1);
  4908. });
  4909. Ru.set(r, i);
  4910. }
  4911. }
  4912. return a(n), r;
  4913. };
  4914. st.cancel = function(e) {
  4915. var t = Ru.get(e);
  4916. return bd(e), yd(t);
  4917. };
  4918. const th = function() {
  4919. var e = d.useRef(null);
  4920. function t() {
  4921. st.cancel(e.current);
  4922. }
  4923. function n(r) {
  4924. var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
  4925. t();
  4926. var o = st(function() {
  4927. a <= 1 ? r({
  4928. isCanceled: function() {
  4929. return o !== e.current;
  4930. }
  4931. }) : n(r, a - 1);
  4932. });
  4933. e.current = o;
  4934. }
  4935. return d.useEffect(function() {
  4936. return function() {
  4937. t();
  4938. };
  4939. }, []), [n, t];
  4940. };
  4941. var nh = [Pn, jr, Fr, Eu], rh = [Pn, cd], Cd = !1, ah = !0;
  4942. function Sd(e) {
  4943. return e === Fr || e === Eu;
  4944. }
  4945. const oh = function(e, t, n) {
  4946. var r = ir(Dl), a = nn(r, 2), o = a[0], i = a[1], u = th(), l = nn(u, 2), c = l[0], s = l[1];
  4947. function v() {
  4948. i(Pn, !0);
  4949. }
  4950. var C = t ? rh : nh;
  4951. return hd(function() {
  4952. if (o !== Dl && o !== Eu) {
  4953. var p = C.indexOf(o), m = C[p + 1], b = n(o);
  4954. b === Cd ? i(m, !0) : m && c(function(f) {
  4955. function h() {
  4956. f.isCanceled() || i(m, !0);
  4957. }
  4958. b === !0 ? h() : Promise.resolve(b).then(h);
  4959. });
  4960. }
  4961. }, [e, o]), d.useEffect(function() {
  4962. return function() {
  4963. s();
  4964. };
  4965. }, []), [v, o];
  4966. };
  4967. function ih(e, t, n, r) {
  4968. var a = r.motionEnter, o = a === void 0 ? !0 : a, i = r.motionAppear, u = i === void 0 ? !0 : i, l = r.motionLeave, c = l === void 0 ? !0 : l, s = r.motionDeadline, v = r.motionLeaveImmediately, C = r.onAppearPrepare, p = r.onEnterPrepare, m = r.onLeavePrepare, b = r.onAppearStart, f = r.onEnterStart, h = r.onLeaveStart, g = r.onAppearActive, y = r.onEnterActive, w = r.onLeaveActive, E = r.onAppearEnd, S = r.onEnterEnd, x = r.onLeaveEnd, R = r.onVisibleChanged, k = ir(), L = nn(k, 2), O = L[0], N = L[1], F = sd(Jn), I = nn(F, 2), T = I[0], P = I[1], z = ir(null), _ = nn(z, 2), A = _[0], H = _[1], $ = T(), U = Ce(!1), G = Ce(null);
  4969. function B() {
  4970. return n();
  4971. }
  4972. var ne = Ce(!1);
  4973. function le() {
  4974. P(Jn), H(null, !0);
  4975. }
  4976. var ee = Ct(function(ue) {
  4977. var se = T();
  4978. if (se !== Jn) {
  4979. var pe = B();
  4980. if (!(ue && !ue.deadline && ue.target !== pe)) {
  4981. var oe = ne.current, ve;
  4982. se === Ya && oe ? ve = E == null ? void 0 : E(pe, ue) : se === Ga && oe ? ve = S == null ? void 0 : S(pe, ue) : se === Xa && oe && (ve = x == null ? void 0 : x(pe, ue)), oe && ve !== !1 && le();
  4983. }
  4984. }
  4985. }), V = eh(ee), X = nn(V, 1), J = X[0], M = function(se) {
  4986. switch (se) {
  4987. case Ya:
  4988. return At(At(At({}, Pn, C), jr, b), Fr, g);
  4989. case Ga:
  4990. return At(At(At({}, Pn, p), jr, f), Fr, y);
  4991. case Xa:
  4992. return At(At(At({}, Pn, m), jr, h), Fr, w);
  4993. default:
  4994. return {};
  4995. }
  4996. }, D = d.useMemo(function() {
  4997. return M($);
  4998. }, [$]), j = oh($, !e, function(ue) {
  4999. if (ue === Pn) {
  5000. var se = D[Pn];
  5001. return se ? se(B()) : Cd;
  5002. }
  5003. if (Y in D) {
  5004. var pe;
  5005. H(((pe = D[Y]) === null || pe === void 0 ? void 0 : pe.call(D, B(), null)) || null);
  5006. }
  5007. return Y === Fr && $ !== Jn && (J(B()), s > 0 && (clearTimeout(G.current), G.current = setTimeout(function() {
  5008. ee({
  5009. deadline: !0
  5010. });
  5011. }, s))), Y === cd && le(), ah;
  5012. }), W = nn(j, 2), K = W[0], Y = W[1], te = Sd(Y);
  5013. ne.current = te, hd(function() {
  5014. N(t);
  5015. var ue = U.current;
  5016. U.current = !0;
  5017. var se;
  5018. !ue && t && u && (se = Ya), ue && t && o && (se = Ga), (ue && !t && c || !ue && v && !t && c) && (se = Xa);
  5019. var pe = M(se);
  5020. se && (e || pe[Pn]) ? (P(se), K()) : P(Jn);
  5021. }, [t]), lt(function() {
  5022. // Cancel appear
  5023. ($ === Ya && !u || // Cancel enter
  5024. $ === Ga && !o || // Cancel leave
  5025. $ === Xa && !c) && P(Jn);
  5026. }, [u, o, c]), lt(function() {
  5027. return function() {
  5028. U.current = !1, clearTimeout(G.current);
  5029. };
  5030. }, []);
  5031. var Q = d.useRef(!1);
  5032. lt(function() {
  5033. O && (Q.current = !0), O !== void 0 && $ === Jn && ((Q.current || O) && (R == null || R(O)), Q.current = !0);
  5034. }, [O, $]);
  5035. var ae = A;
  5036. return D[Pn] && Y === jr && (ae = et({
  5037. transition: "none"
  5038. }, ae)), [$, Y, ae, O != null ? O : t];
  5039. }
  5040. function uh(e) {
  5041. var t = e;
  5042. fn(e) === "object" && (t = e.transitionSupport);
  5043. function n(a, o) {
  5044. return !!(a.motionName && t && o !== !1);
  5045. }
  5046. var r = /* @__PURE__ */ d.forwardRef(function(a, o) {
  5047. var i = a.visible, u = i === void 0 ? !0 : i, l = a.removeOnLeave, c = l === void 0 ? !0 : l, s = a.forceRender, v = a.children, C = a.motionName, p = a.leavedClassName, m = a.eventProps, b = d.useContext(Yp), f = b.motion, h = n(a, f), g = Ce(), y = Ce();
  5048. function w() {
  5049. try {
  5050. return g.current instanceof HTMLElement ? g.current : Br(y.current);
  5051. } catch {
  5052. return null;
  5053. }
  5054. }
  5055. var E = ih(h, u, w, a), S = nn(E, 4), x = S[0], R = S[1], k = S[2], L = S[3], O = d.useRef(L);
  5056. L && (O.current = !0);
  5057. var N = d.useCallback(function(A) {
  5058. g.current = A, jo(o, A);
  5059. }, [o]), F, I = et(et({}, m), {}, {
  5060. visible: u
  5061. });
  5062. if (!v)
  5063. F = null;
  5064. else if (x === Jn)
  5065. L ? F = v(et({}, I), N) : !c && O.current && p ? F = v(et(et({}, I), {}, {
  5066. className: p
  5067. }), N) : s || !c && !p ? F = v(et(et({}, I), {}, {
  5068. style: {
  5069. display: "none"
  5070. }
  5071. }), N) : F = null;
  5072. else {
  5073. var T;
  5074. R === Pn ? T = "prepare" : Sd(R) ? T = "active" : R === jr && (T = "start");
  5075. var P = _l(C, "".concat(x, "-").concat(T));
  5076. F = v(et(et({}, I), {}, {
  5077. className: xe(_l(C, x), At(At({}, P, P && T), C, typeof C == "string")),
  5078. style: k
  5079. }), N);
  5080. }
  5081. if (/* @__PURE__ */ d.isValidElement(F) && xr(F)) {
  5082. var z = F, _ = z.ref;
  5083. _ || (F = /* @__PURE__ */ d.cloneElement(F, {
  5084. ref: N
  5085. }));
  5086. }
  5087. return /* @__PURE__ */ d.createElement(Xp, {
  5088. ref: y
  5089. }, F);
  5090. });
  5091. return r.displayName = "CSSMotion", r;
  5092. }
  5093. const zo = uh(pd);
  5094. var Fi = "add", zi = "keep", Hi = "remove", di = "removed";
  5095. function lh(e) {
  5096. var t;
  5097. return e && fn(e) === "object" && "key" in e ? t = e : t = {
  5098. key: e
  5099. }, et(et({}, t), {}, {
  5100. key: String(t.key)
  5101. });
  5102. }
  5103. function Vi() {
  5104. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  5105. return e.map(lh);
  5106. }
  5107. function sh() {
  5108. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = [], r = 0, a = t.length, o = Vi(e), i = Vi(t);
  5109. o.forEach(function(c) {
  5110. for (var s = !1, v = r; v < a; v += 1) {
  5111. var C = i[v];
  5112. if (C.key === c.key) {
  5113. r < v && (n = n.concat(i.slice(r, v).map(function(p) {
  5114. return et(et({}, p), {}, {
  5115. status: Fi
  5116. });
  5117. })), r = v), n.push(et(et({}, C), {}, {
  5118. status: zi
  5119. })), r += 1, s = !0;
  5120. break;
  5121. }
  5122. }
  5123. s || n.push(et(et({}, c), {}, {
  5124. status: Hi
  5125. }));
  5126. }), r < a && (n = n.concat(i.slice(r).map(function(c) {
  5127. return et(et({}, c), {}, {
  5128. status: Fi
  5129. });
  5130. })));
  5131. var u = {};
  5132. n.forEach(function(c) {
  5133. var s = c.key;
  5134. u[s] = (u[s] || 0) + 1;
  5135. });
  5136. var l = Object.keys(u).filter(function(c) {
  5137. return u[c] > 1;
  5138. });
  5139. return l.forEach(function(c) {
  5140. n = n.filter(function(s) {
  5141. var v = s.key, C = s.status;
  5142. return v !== c || C !== Hi;
  5143. }), n.forEach(function(s) {
  5144. s.key === c && (s.status = zi);
  5145. });
  5146. }), n;
  5147. }
  5148. var ch = ["component", "children", "onVisibleChanged", "onAllRemoved"], dh = ["status"], fh = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
  5149. function vh(e) {
  5150. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zo, n = /* @__PURE__ */ function(r) {
  5151. id(o, r);
  5152. var a = ld(o);
  5153. function o() {
  5154. var i;
  5155. ad(this, o);
  5156. for (var u = arguments.length, l = new Array(u), c = 0; c < u; c++)
  5157. l[c] = arguments[c];
  5158. return i = a.call.apply(a, [this].concat(l)), At(ji(i), "state", {
  5159. keyEntities: []
  5160. }), At(ji(i), "removeKey", function(s) {
  5161. var v = i.state.keyEntities, C = v.map(function(p) {
  5162. return p.key !== s ? p : et(et({}, p), {}, {
  5163. status: di
  5164. });
  5165. });
  5166. return i.setState({
  5167. keyEntities: C
  5168. }), C.filter(function(p) {
  5169. var m = p.status;
  5170. return m !== di;
  5171. }).length;
  5172. }), i;
  5173. }
  5174. return od(o, [{
  5175. key: "render",
  5176. value: function() {
  5177. var u = this, l = this.state.keyEntities, c = this.props, s = c.component, v = c.children, C = c.onVisibleChanged, p = c.onAllRemoved, m = $i(c, ch), b = s || d.Fragment, f = {};
  5178. return fh.forEach(function(h) {
  5179. f[h] = m[h], delete m[h];
  5180. }), delete m.keys, /* @__PURE__ */ d.createElement(b, m, l.map(function(h, g) {
  5181. var y = h.status, w = $i(h, dh), E = y === Fi || y === zi;
  5182. return /* @__PURE__ */ d.createElement(t, sn({}, f, {
  5183. key: w.key,
  5184. visible: E,
  5185. eventProps: w,
  5186. onVisibleChanged: function(x) {
  5187. if (C == null || C(x, {
  5188. key: w.key
  5189. }), !x) {
  5190. var R = u.removeKey(w.key);
  5191. R === 0 && p && p();
  5192. }
  5193. }
  5194. }), function(S, x) {
  5195. return v(et(et({}, S), {}, {
  5196. index: g
  5197. }), x);
  5198. });
  5199. }));
  5200. }
  5201. }], [{
  5202. key: "getDerivedStateFromProps",
  5203. value: function(u, l) {
  5204. var c = u.keys, s = l.keyEntities, v = Vi(c), C = sh(s, v);
  5205. return {
  5206. keyEntities: C.filter(function(p) {
  5207. var m = s.find(function(b) {
  5208. var f = b.key;
  5209. return p.key === f;
  5210. });
  5211. return !(m && m.status === di && p.status === Hi);
  5212. })
  5213. };
  5214. }
  5215. }]), o;
  5216. }(d.Component);
  5217. return At(n, "defaultProps", {
  5218. component: "div"
  5219. }), n;
  5220. }
  5221. vh(pd);
  5222. const mh = /* @__PURE__ */ d.memo(function(e) {
  5223. var t = e.children;
  5224. return t;
  5225. }, function(e, t) {
  5226. var n = t.shouldUpdate;
  5227. return !n;
  5228. });
  5229. var ph = {
  5230. width: 0,
  5231. height: 0,
  5232. overflow: "hidden",
  5233. outline: "none"
  5234. }, hh = {
  5235. outline: "none"
  5236. }, gh = /* @__PURE__ */ me.forwardRef(function(e, t) {
  5237. var n = e.prefixCls, r = e.className, a = e.style, o = e.title, i = e.ariaId, u = e.footer, l = e.closable, c = e.closeIcon, s = e.onClose, v = e.children, C = e.bodyStyle, p = e.bodyProps, m = e.modalRender, b = e.onMouseDown, f = e.onMouseUp, h = e.holderRef, g = e.visible, y = e.forceRender, w = e.width, E = e.height, S = e.classNames, x = e.styles, R = me.useContext(td), k = R.panel, L = Gr(h, k), O = Ce(), N = Ce();
  5238. me.useImperativeHandle(t, function() {
  5239. return {
  5240. focus: function() {
  5241. var U;
  5242. (U = O.current) === null || U === void 0 || U.focus({
  5243. preventScroll: !0
  5244. });
  5245. },
  5246. changeActive: function(U) {
  5247. var G = document, B = G.activeElement;
  5248. U && B === N.current ? O.current.focus({
  5249. preventScroll: !0
  5250. }) : !U && B === O.current && N.current.focus({
  5251. preventScroll: !0
  5252. });
  5253. }
  5254. };
  5255. });
  5256. var F = {};
  5257. w !== void 0 && (F.width = w), E !== void 0 && (F.height = E);
  5258. var I = u ? /* @__PURE__ */ me.createElement("div", {
  5259. className: xe("".concat(n, "-footer"), S == null ? void 0 : S.footer),
  5260. style: et({}, x == null ? void 0 : x.footer)
  5261. }, u) : null, T = o ? /* @__PURE__ */ me.createElement("div", {
  5262. className: xe("".concat(n, "-header"), S == null ? void 0 : S.header),
  5263. style: et({}, x == null ? void 0 : x.header)
  5264. }, /* @__PURE__ */ me.createElement("div", {
  5265. className: "".concat(n, "-title"),
  5266. id: i
  5267. }, o)) : null, P = Ht(function() {
  5268. return fn(l) === "object" && l !== null ? l : l ? {
  5269. closeIcon: c != null ? c : /* @__PURE__ */ me.createElement("span", {
  5270. className: "".concat(n, "-close-x")
  5271. })
  5272. } : {};
  5273. }, [l, c, n]), z = or(P, !0), _ = fn(l) === "object" && l.disabled, A = l ? /* @__PURE__ */ me.createElement("button", sn({
  5274. type: "button",
  5275. onClick: s,
  5276. "aria-label": "Close"
  5277. }, z, {
  5278. className: "".concat(n, "-close"),
  5279. disabled: _
  5280. }), P.closeIcon) : null, H = /* @__PURE__ */ me.createElement("div", {
  5281. className: xe("".concat(n, "-content"), S == null ? void 0 : S.content),
  5282. style: x == null ? void 0 : x.content
  5283. }, A, T, /* @__PURE__ */ me.createElement("div", sn({
  5284. className: xe("".concat(n, "-body"), S == null ? void 0 : S.body),
  5285. style: et(et({}, C), x == null ? void 0 : x.body)
  5286. }, p), v), I);
  5287. return /* @__PURE__ */ me.createElement("div", {
  5288. key: "dialog-element",
  5289. role: "dialog",
  5290. "aria-labelledby": o ? i : null,
  5291. "aria-modal": "true",
  5292. ref: L,
  5293. style: et(et({}, a), F),
  5294. className: xe(n, r),
  5295. onMouseDown: b,
  5296. onMouseUp: f
  5297. }, /* @__PURE__ */ me.createElement("div", {
  5298. ref: O,
  5299. tabIndex: 0,
  5300. style: hh
  5301. }, /* @__PURE__ */ me.createElement(mh, {
  5302. shouldUpdate: g || y
  5303. }, m ? m(H) : H)), /* @__PURE__ */ me.createElement("div", {
  5304. tabIndex: 0,
  5305. ref: N,
  5306. style: ph
  5307. }));
  5308. }), wd = /* @__PURE__ */ d.forwardRef(function(e, t) {
  5309. var n = e.prefixCls, r = e.title, a = e.style, o = e.className, i = e.visible, u = e.forceRender, l = e.destroyOnClose, c = e.motionName, s = e.ariaId, v = e.onVisibleChanged, C = e.mousePosition, p = Ce(), m = d.useState(), b = nn(m, 2), f = b[0], h = b[1], g = {};
  5310. f && (g.transformOrigin = f);
  5311. function y() {
  5312. var w = Up(p.current);
  5313. h(C && (C.x || C.y) ? "".concat(C.x - w.left, "px ").concat(C.y - w.top, "px") : "");
  5314. }
  5315. return /* @__PURE__ */ d.createElement(zo, {
  5316. visible: i,
  5317. onVisibleChanged: v,
  5318. onAppearPrepare: y,
  5319. onEnterPrepare: y,
  5320. forceRender: u,
  5321. motionName: c,
  5322. removeOnLeave: l,
  5323. ref: p
  5324. }, function(w, E) {
  5325. var S = w.className, x = w.style;
  5326. return /* @__PURE__ */ d.createElement(gh, sn({}, e, {
  5327. ref: t,
  5328. title: r,
  5329. ariaId: s,
  5330. prefixCls: n,
  5331. holderRef: E,
  5332. style: et(et(et({}, x), a), g),
  5333. className: xe(o, S)
  5334. }));
  5335. });
  5336. });
  5337. wd.displayName = "Content";
  5338. var yh = function(t) {
  5339. var n = t.prefixCls, r = t.style, a = t.visible, o = t.maskProps, i = t.motionName, u = t.className;
  5340. return /* @__PURE__ */ d.createElement(zo, {
  5341. key: "mask",
  5342. visible: a,
  5343. motionName: i,
  5344. leavedClassName: "".concat(n, "-mask-hidden")
  5345. }, function(l, c) {
  5346. var s = l.className, v = l.style;
  5347. return /* @__PURE__ */ d.createElement("div", sn({
  5348. ref: c,
  5349. style: et(et({}, v), r),
  5350. className: xe("".concat(n, "-mask"), s, u)
  5351. }, o));
  5352. });
  5353. }, bh = function(t) {
  5354. var n = t.prefixCls, r = n === void 0 ? "rc-dialog" : n, a = t.zIndex, o = t.visible, i = o === void 0 ? !1 : o, u = t.keyboard, l = u === void 0 ? !0 : u, c = t.focusTriggerAfterClose, s = c === void 0 ? !0 : c, v = t.wrapStyle, C = t.wrapClassName, p = t.wrapProps, m = t.onClose, b = t.afterOpenChange, f = t.afterClose, h = t.transitionName, g = t.animation, y = t.closable, w = y === void 0 ? !0 : y, E = t.mask, S = E === void 0 ? !0 : E, x = t.maskTransitionName, R = t.maskAnimation, k = t.maskClosable, L = k === void 0 ? !0 : k, O = t.maskStyle, N = t.maskProps, F = t.rootClassName, I = t.classNames, T = t.styles, P = Ce(), z = Ce(), _ = Ce(), A = d.useState(i), H = nn(A, 2), $ = H[0], U = H[1], G = rd();
  5355. function B() {
  5356. _i(z.current, document.activeElement) || (P.current = document.activeElement);
  5357. }
  5358. function ne() {
  5359. if (!_i(z.current, document.activeElement)) {
  5360. var K;
  5361. (K = _.current) === null || K === void 0 || K.focus();
  5362. }
  5363. }
  5364. function le(K) {
  5365. if (K)
  5366. ne();
  5367. else {
  5368. if (U(!1), S && P.current && s) {
  5369. try {
  5370. P.current.focus({
  5371. preventScroll: !0
  5372. });
  5373. } catch {
  5374. }
  5375. P.current = null;
  5376. }
  5377. $ && (f == null || f());
  5378. }
  5379. b == null || b(K);
  5380. }
  5381. function ee(K) {
  5382. m == null || m(K);
  5383. }
  5384. var V = Ce(!1), X = Ce(), J = function() {
  5385. clearTimeout(X.current), V.current = !0;
  5386. }, M = function() {
  5387. X.current = setTimeout(function() {
  5388. V.current = !1;
  5389. });
  5390. }, D = null;
  5391. L && (D = function(Y) {
  5392. V.current ? V.current = !1 : z.current === Y.target && ee(Y);
  5393. });
  5394. function j(K) {
  5395. if (l && K.keyCode === fe.ESC) {
  5396. K.stopPropagation(), ee(K);
  5397. return;
  5398. }
  5399. i && K.keyCode === fe.TAB && _.current.changeActive(!K.shiftKey);
  5400. }
  5401. lt(function() {
  5402. i && (U(!0), B());
  5403. }, [i]), lt(function() {
  5404. return function() {
  5405. clearTimeout(X.current);
  5406. };
  5407. }, []);
  5408. var W = et(et(et({
  5409. zIndex: a
  5410. }, v), T == null ? void 0 : T.wrapper), {}, {
  5411. display: $ ? null : "none"
  5412. });
  5413. return /* @__PURE__ */ d.createElement("div", sn({
  5414. className: xe("".concat(r, "-root"), F)
  5415. }, or(t, {
  5416. data: !0
  5417. })), /* @__PURE__ */ d.createElement(yh, {
  5418. prefixCls: r,
  5419. visible: S && i,
  5420. motionName: Pl(r, x, R),
  5421. style: et(et({
  5422. zIndex: a
  5423. }, O), T == null ? void 0 : T.mask),
  5424. maskProps: N,
  5425. className: I == null ? void 0 : I.mask
  5426. }), /* @__PURE__ */ d.createElement("div", sn({
  5427. tabIndex: -1,
  5428. onKeyDown: j,
  5429. className: xe("".concat(r, "-wrap"), C, I == null ? void 0 : I.wrapper),
  5430. ref: z,
  5431. onClick: D,
  5432. style: W
  5433. }, p), /* @__PURE__ */ d.createElement(wd, sn({}, t, {
  5434. onMouseDown: J,
  5435. onMouseUp: M,
  5436. ref: _,
  5437. closable: w,
  5438. ariaId: G,
  5439. prefixCls: r,
  5440. visible: i && $,
  5441. onClose: ee,
  5442. onVisibleChanged: le,
  5443. motionName: Pl(r, h, g)
  5444. }))));
  5445. }, xd = function(t) {
  5446. var n = t.visible, r = t.getContainer, a = t.forceRender, o = t.destroyOnClose, i = o === void 0 ? !1 : o, u = t.afterClose, l = t.panelRef, c = d.useState(n), s = nn(c, 2), v = s[0], C = s[1], p = d.useMemo(function() {
  5447. return {
  5448. panel: l
  5449. };
  5450. }, [l]);
  5451. return d.useEffect(function() {
  5452. n && C(!0);
  5453. }, [n]), !a && i && !v ? null : /* @__PURE__ */ d.createElement(td.Provider, {
  5454. value: p
  5455. }, /* @__PURE__ */ d.createElement(xu, {
  5456. open: n || a || v,
  5457. autoDestroy: !1,
  5458. getContainer: r,
  5459. autoLock: n || v
  5460. }, /* @__PURE__ */ d.createElement(bh, sn({}, t, {
  5461. destroyOnClose: i,
  5462. afterClose: function() {
  5463. u == null || u(), C(!1);
  5464. }
  5465. }))));
  5466. };
  5467. xd.displayName = "Dialog";
  5468. var aa = { exports: {} }, fi = {}, vi = { exports: {} }, mi, Tl;
  5469. function Ch() {
  5470. if (Tl) return mi;
  5471. Tl = 1;
  5472. var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  5473. return mi = e, mi;
  5474. }
  5475. var pi, $l;
  5476. function Sh() {
  5477. if ($l) return pi;
  5478. $l = 1;
  5479. var e = /* @__PURE__ */ Ch();
  5480. function t() {
  5481. }
  5482. function n() {
  5483. }
  5484. return n.resetWarningCache = t, pi = function() {
  5485. function r(i, u, l, c, s, v) {
  5486. if (v !== e) {
  5487. var C = new Error(
  5488. "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
  5489. );
  5490. throw C.name = "Invariant Violation", C;
  5491. }
  5492. }
  5493. r.isRequired = r;
  5494. function a() {
  5495. return r;
  5496. }
  5497. var o = {
  5498. array: r,
  5499. bigint: r,
  5500. bool: r,
  5501. func: r,
  5502. number: r,
  5503. object: r,
  5504. string: r,
  5505. symbol: r,
  5506. any: r,
  5507. arrayOf: a,
  5508. element: r,
  5509. elementType: r,
  5510. instanceOf: a,
  5511. node: r,
  5512. objectOf: a,
  5513. oneOf: a,
  5514. oneOfType: a,
  5515. shape: a,
  5516. exact: a,
  5517. checkPropTypes: n,
  5518. resetWarningCache: t
  5519. };
  5520. return o.PropTypes = o, o;
  5521. }, pi;
  5522. }
  5523. var Al;
  5524. function sr() {
  5525. return Al || (Al = 1, vi.exports = /* @__PURE__ */ Sh()()), vi.exports;
  5526. }
  5527. function Ed(e) {
  5528. var t, n, r = "";
  5529. if (typeof e == "string" || typeof e == "number") r += e;
  5530. else if (typeof e == "object") if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (n = Ed(e[t])) && (r && (r += " "), r += n);
  5531. else for (t in e) e[t] && (r && (r += " "), r += t);
  5532. return r;
  5533. }
  5534. function jl() {
  5535. for (var e, t, n = 0, r = ""; n < arguments.length; ) (e = arguments[n++]) && (t = Ed(e)) && (r && (r += " "), r += t);
  5536. return r;
  5537. }
  5538. const wh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  5539. __proto__: null,
  5540. clsx: jl,
  5541. default: jl
  5542. }, Symbol.toStringTag, { value: "Module" })), xh = /* @__PURE__ */ bc(wh);
  5543. var Tt = {}, Yn = {}, Fl;
  5544. function Ho() {
  5545. if (Fl) return Yn;
  5546. Fl = 1, Object.defineProperty(Yn, "__esModule", {
  5547. value: !0
  5548. }), Yn.dontSetMe = a, Yn.findInArray = e, Yn.int = r, Yn.isFunction = t, Yn.isNum = n;
  5549. function e(o, i) {
  5550. for (let u = 0, l = o.length; u < l; u++)
  5551. if (i.apply(i, [o[u], u, o])) return o[u];
  5552. }
  5553. function t(o) {
  5554. return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
  5555. }
  5556. function n(o) {
  5557. return typeof o == "number" && !isNaN(o);
  5558. }
  5559. function r(o) {
  5560. return parseInt(o, 10);
  5561. }
  5562. function a(o, i, u) {
  5563. if (o[i])
  5564. return new Error("Invalid prop ".concat(i, " passed to ").concat(u, " - do not set this, set it on the child."));
  5565. }
  5566. return Yn;
  5567. }
  5568. var Gn = {}, zl;
  5569. function Eh() {
  5570. if (zl) return Gn;
  5571. zl = 1, Object.defineProperty(Gn, "__esModule", {
  5572. value: !0
  5573. }), Gn.browserPrefixToKey = n, Gn.browserPrefixToStyle = r, Gn.default = void 0, Gn.getPrefix = t;
  5574. const e = ["Moz", "Webkit", "O", "ms"];
  5575. function t() {
  5576. var o;
  5577. let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
  5578. if (typeof window > "u") return "";
  5579. const u = (o = window.document) === null || o === void 0 || (o = o.documentElement) === null || o === void 0 ? void 0 : o.style;
  5580. if (!u || i in u) return "";
  5581. for (let l = 0; l < e.length; l++)
  5582. if (n(i, e[l]) in u) return e[l];
  5583. return "";
  5584. }
  5585. function n(o, i) {
  5586. return i ? "".concat(i).concat(a(o)) : o;
  5587. }
  5588. function r(o, i) {
  5589. return i ? "-".concat(i.toLowerCase(), "-").concat(o) : o;
  5590. }
  5591. function a(o) {
  5592. let i = "", u = !0;
  5593. for (let l = 0; l < o.length; l++)
  5594. u ? (i += o[l].toUpperCase(), u = !1) : o[l] === "-" ? u = !0 : i += o[l];
  5595. return i;
  5596. }
  5597. return Gn.default = t(), Gn;
  5598. }
  5599. var Hl;
  5600. function Pu() {
  5601. if (Hl) return Tt;
  5602. Hl = 1, Object.defineProperty(Tt, "__esModule", {
  5603. value: !0
  5604. }), Tt.addClassName = E, Tt.addEvent = u, Tt.addUserSelectStyles = y, Tt.createCSSTransform = m, Tt.createSVGTransform = b, Tt.getTouch = h, Tt.getTouchIdentifier = g, Tt.getTranslation = f, Tt.innerHeight = v, Tt.innerWidth = C, Tt.matchesSelector = o, Tt.matchesSelectorAndParentsTo = i, Tt.offsetXYFromParent = p, Tt.outerHeight = c, Tt.outerWidth = s, Tt.removeClassName = S, Tt.removeEvent = l, Tt.removeUserSelectStyles = w;
  5605. var e = Ho(), t = r(Eh());
  5606. function n(x) {
  5607. if (typeof WeakMap != "function") return null;
  5608. var R = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap();
  5609. return (n = function(L) {
  5610. return L ? k : R;
  5611. })(x);
  5612. }
  5613. function r(x, R) {
  5614. if (x && x.__esModule)
  5615. return x;
  5616. if (x === null || typeof x != "object" && typeof x != "function")
  5617. return { default: x };
  5618. var k = n(R);
  5619. if (k && k.has(x))
  5620. return k.get(x);
  5621. var L = {}, O = Object.defineProperty && Object.getOwnPropertyDescriptor;
  5622. for (var N in x)
  5623. if (N !== "default" && Object.prototype.hasOwnProperty.call(x, N)) {
  5624. var F = O ? Object.getOwnPropertyDescriptor(x, N) : null;
  5625. F && (F.get || F.set) ? Object.defineProperty(L, N, F) : L[N] = x[N];
  5626. }
  5627. return L.default = x, k && k.set(x, L), L;
  5628. }
  5629. let a = "";
  5630. function o(x, R) {
  5631. return a || (a = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(k) {
  5632. return (0, e.isFunction)(x[k]);
  5633. })), (0, e.isFunction)(x[a]) ? x[a](R) : !1;
  5634. }
  5635. function i(x, R, k) {
  5636. let L = x;
  5637. do {
  5638. if (o(L, R)) return !0;
  5639. if (L === k) return !1;
  5640. L = L.parentNode;
  5641. } while (L);
  5642. return !1;
  5643. }
  5644. function u(x, R, k, L) {
  5645. if (!x) return;
  5646. const O = {
  5647. capture: !0,
  5648. ...L
  5649. };
  5650. x.addEventListener ? x.addEventListener(R, k, O) : x.attachEvent ? x.attachEvent("on" + R, k) : x["on" + R] = k;
  5651. }
  5652. function l(x, R, k, L) {
  5653. if (!x) return;
  5654. const O = {
  5655. capture: !0,
  5656. ...L
  5657. };
  5658. x.removeEventListener ? x.removeEventListener(R, k, O) : x.detachEvent ? x.detachEvent("on" + R, k) : x["on" + R] = null;
  5659. }
  5660. function c(x) {
  5661. let R = x.clientHeight;
  5662. const k = x.ownerDocument.defaultView.getComputedStyle(x);
  5663. return R += (0, e.int)(k.borderTopWidth), R += (0, e.int)(k.borderBottomWidth), R;
  5664. }
  5665. function s(x) {
  5666. let R = x.clientWidth;
  5667. const k = x.ownerDocument.defaultView.getComputedStyle(x);
  5668. return R += (0, e.int)(k.borderLeftWidth), R += (0, e.int)(k.borderRightWidth), R;
  5669. }
  5670. function v(x) {
  5671. let R = x.clientHeight;
  5672. const k = x.ownerDocument.defaultView.getComputedStyle(x);
  5673. return R -= (0, e.int)(k.paddingTop), R -= (0, e.int)(k.paddingBottom), R;
  5674. }
  5675. function C(x) {
  5676. let R = x.clientWidth;
  5677. const k = x.ownerDocument.defaultView.getComputedStyle(x);
  5678. return R -= (0, e.int)(k.paddingLeft), R -= (0, e.int)(k.paddingRight), R;
  5679. }
  5680. function p(x, R, k) {
  5681. const O = R === R.ownerDocument.body ? {
  5682. left: 0,
  5683. top: 0
  5684. } : R.getBoundingClientRect(), N = (x.clientX + R.scrollLeft - O.left) / k, F = (x.clientY + R.scrollTop - O.top) / k;
  5685. return {
  5686. x: N,
  5687. y: F
  5688. };
  5689. }
  5690. function m(x, R) {
  5691. const k = f(x, R, "px");
  5692. return {
  5693. [(0, t.browserPrefixToKey)("transform", t.default)]: k
  5694. };
  5695. }
  5696. function b(x, R) {
  5697. return f(x, R, "");
  5698. }
  5699. function f(x, R, k) {
  5700. let {
  5701. x: L,
  5702. y: O
  5703. } = x, N = "translate(".concat(L).concat(k, ",").concat(O).concat(k, ")");
  5704. if (R) {
  5705. const F = "".concat(typeof R.x == "string" ? R.x : R.x + k), I = "".concat(typeof R.y == "string" ? R.y : R.y + k);
  5706. N = "translate(".concat(F, ", ").concat(I, ")") + N;
  5707. }
  5708. return N;
  5709. }
  5710. function h(x, R) {
  5711. return x.targetTouches && (0, e.findInArray)(x.targetTouches, (k) => R === k.identifier) || x.changedTouches && (0, e.findInArray)(x.changedTouches, (k) => R === k.identifier);
  5712. }
  5713. function g(x) {
  5714. if (x.targetTouches && x.targetTouches[0]) return x.targetTouches[0].identifier;
  5715. if (x.changedTouches && x.changedTouches[0]) return x.changedTouches[0].identifier;
  5716. }
  5717. function y(x) {
  5718. if (!x) return;
  5719. let R = x.getElementById("react-draggable-style-el");
  5720. R || (R = x.createElement("style"), R.type = "text/css", R.id = "react-draggable-style-el", R.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
  5721. `, R.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
  5722. `, x.getElementsByTagName("head")[0].appendChild(R)), x.body && E(x.body, "react-draggable-transparent-selection");
  5723. }
  5724. function w(x) {
  5725. if (x)
  5726. try {
  5727. if (x.body && S(x.body, "react-draggable-transparent-selection"), x.selection)
  5728. x.selection.empty();
  5729. else {
  5730. const R = (x.defaultView || window).getSelection();
  5731. R && R.type !== "Caret" && R.removeAllRanges();
  5732. }
  5733. } catch {
  5734. }
  5735. }
  5736. function E(x, R) {
  5737. x.classList ? x.classList.add(R) : x.className.match(new RegExp("(?:^|\\s)".concat(R, "(?!\\S)"))) || (x.className += " ".concat(R));
  5738. }
  5739. function S(x, R) {
  5740. x.classList ? x.classList.remove(R) : x.className = x.className.replace(new RegExp("(?:^|\\s)".concat(R, "(?!\\S)"), "g"), "");
  5741. }
  5742. return Tt;
  5743. }
  5744. var Ln = {}, Vl;
  5745. function Rd() {
  5746. if (Vl) return Ln;
  5747. Vl = 1, Object.defineProperty(Ln, "__esModule", {
  5748. value: !0
  5749. }), Ln.canDragX = a, Ln.canDragY = o, Ln.createCoreData = u, Ln.createDraggableData = l, Ln.getBoundPosition = n, Ln.getControlPosition = i, Ln.snapToGrid = r;
  5750. var e = Ho(), t = Pu();
  5751. function n(v, C, p) {
  5752. if (!v.props.bounds) return [C, p];
  5753. let {
  5754. bounds: m
  5755. } = v.props;
  5756. m = typeof m == "string" ? m : c(m);
  5757. const b = s(v);
  5758. if (typeof m == "string") {
  5759. const {
  5760. ownerDocument: f
  5761. } = b, h = f.defaultView;
  5762. let g;
  5763. if (m === "parent" ? g = b.parentNode : g = f.querySelector(m), !(g instanceof h.HTMLElement))
  5764. throw new Error('Bounds selector "' + m + '" could not find an element.');
  5765. const y = g, w = h.getComputedStyle(b), E = h.getComputedStyle(y);
  5766. m = {
  5767. left: -b.offsetLeft + (0, e.int)(E.paddingLeft) + (0, e.int)(w.marginLeft),
  5768. top: -b.offsetTop + (0, e.int)(E.paddingTop) + (0, e.int)(w.marginTop),
  5769. right: (0, t.innerWidth)(y) - (0, t.outerWidth)(b) - b.offsetLeft + (0, e.int)(E.paddingRight) - (0, e.int)(w.marginRight),
  5770. bottom: (0, t.innerHeight)(y) - (0, t.outerHeight)(b) - b.offsetTop + (0, e.int)(E.paddingBottom) - (0, e.int)(w.marginBottom)
  5771. };
  5772. }
  5773. return (0, e.isNum)(m.right) && (C = Math.min(C, m.right)), (0, e.isNum)(m.bottom) && (p = Math.min(p, m.bottom)), (0, e.isNum)(m.left) && (C = Math.max(C, m.left)), (0, e.isNum)(m.top) && (p = Math.max(p, m.top)), [C, p];
  5774. }
  5775. function r(v, C, p) {
  5776. const m = Math.round(C / v[0]) * v[0], b = Math.round(p / v[1]) * v[1];
  5777. return [m, b];
  5778. }
  5779. function a(v) {
  5780. return v.props.axis === "both" || v.props.axis === "x";
  5781. }
  5782. function o(v) {
  5783. return v.props.axis === "both" || v.props.axis === "y";
  5784. }
  5785. function i(v, C, p) {
  5786. const m = typeof C == "number" ? (0, t.getTouch)(v, C) : null;
  5787. if (typeof C == "number" && !m) return null;
  5788. const b = s(p), f = p.props.offsetParent || b.offsetParent || b.ownerDocument.body;
  5789. return (0, t.offsetXYFromParent)(m || v, f, p.props.scale);
  5790. }
  5791. function u(v, C, p) {
  5792. const m = !(0, e.isNum)(v.lastX), b = s(v);
  5793. return m ? {
  5794. node: b,
  5795. deltaX: 0,
  5796. deltaY: 0,
  5797. lastX: C,
  5798. lastY: p,
  5799. x: C,
  5800. y: p
  5801. } : {
  5802. node: b,
  5803. deltaX: C - v.lastX,
  5804. deltaY: p - v.lastY,
  5805. lastX: v.lastX,
  5806. lastY: v.lastY,
  5807. x: C,
  5808. y: p
  5809. };
  5810. }
  5811. function l(v, C) {
  5812. const p = v.props.scale;
  5813. return {
  5814. node: C.node,
  5815. x: v.state.x + C.deltaX / p,
  5816. y: v.state.y + C.deltaY / p,
  5817. deltaX: C.deltaX / p,
  5818. deltaY: C.deltaY / p,
  5819. lastX: v.state.x,
  5820. lastY: v.state.y
  5821. };
  5822. }
  5823. function c(v) {
  5824. return {
  5825. left: v.left,
  5826. top: v.top,
  5827. right: v.right,
  5828. bottom: v.bottom
  5829. };
  5830. }
  5831. function s(v) {
  5832. const C = v.findDOMNode();
  5833. if (!C)
  5834. throw new Error("<DraggableCore>: Unmounted during event!");
  5835. return C;
  5836. }
  5837. return Ln;
  5838. }
  5839. var oa = {}, Qa = {}, Wl;
  5840. function Pd() {
  5841. if (Wl) return Qa;
  5842. Wl = 1, Object.defineProperty(Qa, "__esModule", {
  5843. value: !0
  5844. }), Qa.default = e;
  5845. function e() {
  5846. }
  5847. return Qa;
  5848. }
  5849. var Bl;
  5850. function Rh() {
  5851. if (Bl) return oa;
  5852. Bl = 1, Object.defineProperty(oa, "__esModule", {
  5853. value: !0
  5854. }), oa.default = void 0;
  5855. var e = c(me), t = u(/* @__PURE__ */ sr()), n = u(nr), r = Pu(), a = Rd(), o = Ho(), i = u(Pd());
  5856. function u(f) {
  5857. return f && f.__esModule ? f : { default: f };
  5858. }
  5859. function l(f) {
  5860. if (typeof WeakMap != "function") return null;
  5861. var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
  5862. return (l = function(y) {
  5863. return y ? g : h;
  5864. })(f);
  5865. }
  5866. function c(f, h) {
  5867. if (f && f.__esModule)
  5868. return f;
  5869. if (f === null || typeof f != "object" && typeof f != "function")
  5870. return { default: f };
  5871. var g = l(h);
  5872. if (g && g.has(f))
  5873. return g.get(f);
  5874. var y = {}, w = Object.defineProperty && Object.getOwnPropertyDescriptor;
  5875. for (var E in f)
  5876. if (E !== "default" && Object.prototype.hasOwnProperty.call(f, E)) {
  5877. var S = w ? Object.getOwnPropertyDescriptor(f, E) : null;
  5878. S && (S.get || S.set) ? Object.defineProperty(y, E, S) : y[E] = f[E];
  5879. }
  5880. return y.default = f, g && g.set(f, y), y;
  5881. }
  5882. function s(f, h, g) {
  5883. return h = v(h), h in f ? Object.defineProperty(f, h, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : f[h] = g, f;
  5884. }
  5885. function v(f) {
  5886. var h = C(f, "string");
  5887. return typeof h == "symbol" ? h : String(h);
  5888. }
  5889. function C(f, h) {
  5890. if (typeof f != "object" || f === null) return f;
  5891. var g = f[Symbol.toPrimitive];
  5892. if (g !== void 0) {
  5893. var y = g.call(f, h || "default");
  5894. if (typeof y != "object") return y;
  5895. throw new TypeError("@@toPrimitive must return a primitive value.");
  5896. }
  5897. return (h === "string" ? String : Number)(f);
  5898. }
  5899. const p = {
  5900. touch: {
  5901. start: "touchstart",
  5902. move: "touchmove",
  5903. stop: "touchend"
  5904. },
  5905. mouse: {
  5906. start: "mousedown",
  5907. move: "mousemove",
  5908. stop: "mouseup"
  5909. }
  5910. };
  5911. let m = p.mouse, b = class extends e.Component {
  5912. constructor() {
  5913. super(...arguments), s(this, "dragging", !1), s(this, "lastX", NaN), s(this, "lastY", NaN), s(this, "touchIdentifier", null), s(this, "mounted", !1), s(this, "handleDragStart", (h) => {
  5914. if (this.props.onMouseDown(h), !this.props.allowAnyClick && typeof h.button == "number" && h.button !== 0) return !1;
  5915. const g = this.findDOMNode();
  5916. if (!g || !g.ownerDocument || !g.ownerDocument.body)
  5917. throw new Error("<DraggableCore> not mounted on DragStart!");
  5918. const {
  5919. ownerDocument: y
  5920. } = g;
  5921. if (this.props.disabled || !(h.target instanceof y.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(h.target, this.props.handle, g) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(h.target, this.props.cancel, g))
  5922. return;
  5923. h.type === "touchstart" && h.preventDefault();
  5924. const w = (0, r.getTouchIdentifier)(h);
  5925. this.touchIdentifier = w;
  5926. const E = (0, a.getControlPosition)(h, w, this);
  5927. if (E == null) return;
  5928. const {
  5929. x: S,
  5930. y: x
  5931. } = E, R = (0, a.createCoreData)(this, S, x);
  5932. (0, i.default)("DraggableCore: handleDragStart: %j", R), (0, i.default)("calling", this.props.onStart), !(this.props.onStart(h, R) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(y), this.dragging = !0, this.lastX = S, this.lastY = x, (0, r.addEvent)(y, m.move, this.handleDrag), (0, r.addEvent)(y, m.stop, this.handleDragStop));
  5933. }), s(this, "handleDrag", (h) => {
  5934. const g = (0, a.getControlPosition)(h, this.touchIdentifier, this);
  5935. if (g == null) return;
  5936. let {
  5937. x: y,
  5938. y: w
  5939. } = g;
  5940. if (Array.isArray(this.props.grid)) {
  5941. let x = y - this.lastX, R = w - this.lastY;
  5942. if ([x, R] = (0, a.snapToGrid)(this.props.grid, x, R), !x && !R) return;
  5943. y = this.lastX + x, w = this.lastY + R;
  5944. }
  5945. const E = (0, a.createCoreData)(this, y, w);
  5946. if ((0, i.default)("DraggableCore: handleDrag: %j", E), this.props.onDrag(h, E) === !1 || this.mounted === !1) {
  5947. try {
  5948. this.handleDragStop(new MouseEvent("mouseup"));
  5949. } catch {
  5950. const R = document.createEvent("MouseEvents");
  5951. R.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(R);
  5952. }
  5953. return;
  5954. }
  5955. this.lastX = y, this.lastY = w;
  5956. }), s(this, "handleDragStop", (h) => {
  5957. if (!this.dragging) return;
  5958. const g = (0, a.getControlPosition)(h, this.touchIdentifier, this);
  5959. if (g == null) return;
  5960. let {
  5961. x: y,
  5962. y: w
  5963. } = g;
  5964. if (Array.isArray(this.props.grid)) {
  5965. let R = y - this.lastX || 0, k = w - this.lastY || 0;
  5966. [R, k] = (0, a.snapToGrid)(this.props.grid, R, k), y = this.lastX + R, w = this.lastY + k;
  5967. }
  5968. const E = (0, a.createCoreData)(this, y, w);
  5969. if (this.props.onStop(h, E) === !1 || this.mounted === !1) return !1;
  5970. const x = this.findDOMNode();
  5971. x && this.props.enableUserSelectHack && (0, r.removeUserSelectStyles)(x.ownerDocument), (0, i.default)("DraggableCore: handleDragStop: %j", E), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, x && ((0, i.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(x.ownerDocument, m.move, this.handleDrag), (0, r.removeEvent)(x.ownerDocument, m.stop, this.handleDragStop));
  5972. }), s(this, "onMouseDown", (h) => (m = p.mouse, this.handleDragStart(h))), s(this, "onMouseUp", (h) => (m = p.mouse, this.handleDragStop(h))), s(this, "onTouchStart", (h) => (m = p.touch, this.handleDragStart(h))), s(this, "onTouchEnd", (h) => (m = p.touch, this.handleDragStop(h)));
  5973. }
  5974. componentDidMount() {
  5975. this.mounted = !0;
  5976. const h = this.findDOMNode();
  5977. h && (0, r.addEvent)(h, p.touch.start, this.onTouchStart, {
  5978. passive: !1
  5979. });
  5980. }
  5981. componentWillUnmount() {
  5982. this.mounted = !1;
  5983. const h = this.findDOMNode();
  5984. if (h) {
  5985. const {
  5986. ownerDocument: g
  5987. } = h;
  5988. (0, r.removeEvent)(g, p.mouse.move, this.handleDrag), (0, r.removeEvent)(g, p.touch.move, this.handleDrag), (0, r.removeEvent)(g, p.mouse.stop, this.handleDragStop), (0, r.removeEvent)(g, p.touch.stop, this.handleDragStop), (0, r.removeEvent)(h, p.touch.start, this.onTouchStart, {
  5989. passive: !1
  5990. }), this.props.enableUserSelectHack && (0, r.removeUserSelectStyles)(g);
  5991. }
  5992. }
  5993. // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
  5994. // the underlying DOM node ourselves. See the README for more information.
  5995. findDOMNode() {
  5996. var h, g;
  5997. return (h = this.props) !== null && h !== void 0 && h.nodeRef ? (g = this.props) === null || g === void 0 || (g = g.nodeRef) === null || g === void 0 ? void 0 : g.current : n.default.findDOMNode(this);
  5998. }
  5999. render() {
  6000. return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
  6001. // Note: mouseMove handler is attached to document so it will still function
  6002. // when the user drags quickly and leaves the bounds of the element.
  6003. onMouseDown: this.onMouseDown,
  6004. onMouseUp: this.onMouseUp,
  6005. // onTouchStart is added on `componentDidMount` so they can be added with
  6006. // {passive: false}, which allows it to cancel. See
  6007. // https://developers.google.com/web/updates/2017/01/scrolling-intervention
  6008. onTouchEnd: this.onTouchEnd
  6009. });
  6010. }
  6011. };
  6012. return oa.default = b, s(b, "displayName", "DraggableCore"), s(b, "propTypes", {
  6013. /**
  6014. * `allowAnyClick` allows dragging using any mouse button.
  6015. * By default, we only accept the left button.
  6016. *
  6017. * Defaults to `false`.
  6018. */
  6019. allowAnyClick: t.default.bool,
  6020. children: t.default.node.isRequired,
  6021. /**
  6022. * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
  6023. * with the exception of `onMouseDown`, will not fire.
  6024. */
  6025. disabled: t.default.bool,
  6026. /**
  6027. * By default, we add 'user-select:none' attributes to the document body
  6028. * to prevent ugly text selection during drag. If this is causing problems
  6029. * for your app, set this to `false`.
  6030. */
  6031. enableUserSelectHack: t.default.bool,
  6032. /**
  6033. * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
  6034. * instead of using the parent node.
  6035. */
  6036. offsetParent: function(f, h) {
  6037. if (f[h] && f[h].nodeType !== 1)
  6038. throw new Error("Draggable's offsetParent must be a DOM Node.");
  6039. },
  6040. /**
  6041. * `grid` specifies the x and y that dragging should snap to.
  6042. */
  6043. grid: t.default.arrayOf(t.default.number),
  6044. /**
  6045. * `handle` specifies a selector to be used as the handle that initiates drag.
  6046. *
  6047. * Example:
  6048. *
  6049. * ```jsx
  6050. * let App = React.createClass({
  6051. * render: function () {
  6052. * return (
  6053. * <Draggable handle=".handle">
  6054. * <div>
  6055. * <div className="handle">Click me to drag</div>
  6056. * <div>This is some other content</div>
  6057. * </div>
  6058. * </Draggable>
  6059. * );
  6060. * }
  6061. * });
  6062. * ```
  6063. */
  6064. handle: t.default.string,
  6065. /**
  6066. * `cancel` specifies a selector to be used to prevent drag initialization.
  6067. *
  6068. * Example:
  6069. *
  6070. * ```jsx
  6071. * let App = React.createClass({
  6072. * render: function () {
  6073. * return(
  6074. * <Draggable cancel=".cancel">
  6075. * <div>
  6076. * <div className="cancel">You can't drag from here</div>
  6077. * <div>Dragging here works fine</div>
  6078. * </div>
  6079. * </Draggable>
  6080. * );
  6081. * }
  6082. * });
  6083. * ```
  6084. */
  6085. cancel: t.default.string,
  6086. /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
  6087. * Unfortunately, in order for <Draggable> to work properly, we need raw access
  6088. * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
  6089. * as in this example:
  6090. *
  6091. * function MyComponent() {
  6092. * const nodeRef = React.useRef(null);
  6093. * return (
  6094. * <Draggable nodeRef={nodeRef}>
  6095. * <div ref={nodeRef}>Example Target</div>
  6096. * </Draggable>
  6097. * );
  6098. * }
  6099. *
  6100. * This can be used for arbitrarily nested components, so long as the ref ends up
  6101. * pointing to the actual child DOM node and not a custom component.
  6102. */
  6103. nodeRef: t.default.object,
  6104. /**
  6105. * Called when dragging starts.
  6106. * If this function returns the boolean false, dragging will be canceled.
  6107. */
  6108. onStart: t.default.func,
  6109. /**
  6110. * Called while dragging.
  6111. * If this function returns the boolean false, dragging will be canceled.
  6112. */
  6113. onDrag: t.default.func,
  6114. /**
  6115. * Called when dragging stops.
  6116. * If this function returns the boolean false, the drag will remain active.
  6117. */
  6118. onStop: t.default.func,
  6119. /**
  6120. * A workaround option which can be passed if onMouseDown needs to be accessed,
  6121. * since it'll always be blocked (as there is internal use of onMouseDown)
  6122. */
  6123. onMouseDown: t.default.func,
  6124. /**
  6125. * `scale`, if set, applies scaling while dragging an element
  6126. */
  6127. scale: t.default.number,
  6128. /**
  6129. * These properties should be defined on the child, not here.
  6130. */
  6131. className: o.dontSetMe,
  6132. style: o.dontSetMe,
  6133. transform: o.dontSetMe
  6134. }), s(b, "defaultProps", {
  6135. allowAnyClick: !1,
  6136. // by default only accept left click
  6137. disabled: !1,
  6138. enableUserSelectHack: !0,
  6139. onStart: function() {
  6140. },
  6141. onDrag: function() {
  6142. },
  6143. onStop: function() {
  6144. },
  6145. onMouseDown: function() {
  6146. },
  6147. scale: 1
  6148. }), oa;
  6149. }
  6150. var Ul;
  6151. function Ph() {
  6152. return Ul || (Ul = 1, function(e) {
  6153. Object.defineProperty(e, "__esModule", {
  6154. value: !0
  6155. }), Object.defineProperty(e, "DraggableCore", {
  6156. enumerable: !0,
  6157. get: function() {
  6158. return l.default;
  6159. }
  6160. }), e.default = void 0;
  6161. var t = C(me), n = s(/* @__PURE__ */ sr()), r = s(nr), a = s(xh), o = Pu(), i = Rd(), u = Ho(), l = s(Rh()), c = s(Pd());
  6162. function s(g) {
  6163. return g && g.__esModule ? g : { default: g };
  6164. }
  6165. function v(g) {
  6166. if (typeof WeakMap != "function") return null;
  6167. var y = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
  6168. return (v = function(E) {
  6169. return E ? w : y;
  6170. })(g);
  6171. }
  6172. function C(g, y) {
  6173. if (g && g.__esModule)
  6174. return g;
  6175. if (g === null || typeof g != "object" && typeof g != "function")
  6176. return { default: g };
  6177. var w = v(y);
  6178. if (w && w.has(g))
  6179. return w.get(g);
  6180. var E = {}, S = Object.defineProperty && Object.getOwnPropertyDescriptor;
  6181. for (var x in g)
  6182. if (x !== "default" && Object.prototype.hasOwnProperty.call(g, x)) {
  6183. var R = S ? Object.getOwnPropertyDescriptor(g, x) : null;
  6184. R && (R.get || R.set) ? Object.defineProperty(E, x, R) : E[x] = g[x];
  6185. }
  6186. return E.default = g, w && w.set(g, E), E;
  6187. }
  6188. function p() {
  6189. return p = Object.assign ? Object.assign.bind() : function(g) {
  6190. for (var y = 1; y < arguments.length; y++) {
  6191. var w = arguments[y];
  6192. for (var E in w)
  6193. Object.prototype.hasOwnProperty.call(w, E) && (g[E] = w[E]);
  6194. }
  6195. return g;
  6196. }, p.apply(this, arguments);
  6197. }
  6198. function m(g, y, w) {
  6199. return y = b(y), y in g ? Object.defineProperty(g, y, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[y] = w, g;
  6200. }
  6201. function b(g) {
  6202. var y = f(g, "string");
  6203. return typeof y == "symbol" ? y : String(y);
  6204. }
  6205. function f(g, y) {
  6206. if (typeof g != "object" || g === null) return g;
  6207. var w = g[Symbol.toPrimitive];
  6208. if (w !== void 0) {
  6209. var E = w.call(g, y || "default");
  6210. if (typeof E != "object") return E;
  6211. throw new TypeError("@@toPrimitive must return a primitive value.");
  6212. }
  6213. return (y === "string" ? String : Number)(g);
  6214. }
  6215. class h extends t.Component {
  6216. // React 16.3+
  6217. // Arity (props, state)
  6218. static getDerivedStateFromProps(y, w) {
  6219. let {
  6220. position: E
  6221. } = y, {
  6222. prevPropsPosition: S
  6223. } = w;
  6224. return E && (!S || E.x !== S.x || E.y !== S.y) ? ((0, c.default)("Draggable: getDerivedStateFromProps %j", {
  6225. position: E,
  6226. prevPropsPosition: S
  6227. }), {
  6228. x: E.x,
  6229. y: E.y,
  6230. prevPropsPosition: {
  6231. ...E
  6232. }
  6233. }) : null;
  6234. }
  6235. constructor(y) {
  6236. super(y), m(this, "onDragStart", (w, E) => {
  6237. if ((0, c.default)("Draggable: onDragStart: %j", E), this.props.onStart(w, (0, i.createDraggableData)(this, E)) === !1) return !1;
  6238. this.setState({
  6239. dragging: !0,
  6240. dragged: !0
  6241. });
  6242. }), m(this, "onDrag", (w, E) => {
  6243. if (!this.state.dragging) return !1;
  6244. (0, c.default)("Draggable: onDrag: %j", E);
  6245. const S = (0, i.createDraggableData)(this, E), x = {
  6246. x: S.x,
  6247. y: S.y,
  6248. slackX: 0,
  6249. slackY: 0
  6250. };
  6251. if (this.props.bounds) {
  6252. const {
  6253. x: k,
  6254. y: L
  6255. } = x;
  6256. x.x += this.state.slackX, x.y += this.state.slackY;
  6257. const [O, N] = (0, i.getBoundPosition)(this, x.x, x.y);
  6258. x.x = O, x.y = N, x.slackX = this.state.slackX + (k - x.x), x.slackY = this.state.slackY + (L - x.y), S.x = x.x, S.y = x.y, S.deltaX = x.x - this.state.x, S.deltaY = x.y - this.state.y;
  6259. }
  6260. if (this.props.onDrag(w, S) === !1) return !1;
  6261. this.setState(x);
  6262. }), m(this, "onDragStop", (w, E) => {
  6263. if (!this.state.dragging || this.props.onStop(w, (0, i.createDraggableData)(this, E)) === !1) return !1;
  6264. (0, c.default)("Draggable: onDragStop: %j", E);
  6265. const x = {
  6266. dragging: !1,
  6267. slackX: 0,
  6268. slackY: 0
  6269. };
  6270. if (!!this.props.position) {
  6271. const {
  6272. x: k,
  6273. y: L
  6274. } = this.props.position;
  6275. x.x = k, x.y = L;
  6276. }
  6277. this.setState(x);
  6278. }), this.state = {
  6279. // Whether or not we are currently dragging.
  6280. dragging: !1,
  6281. // Whether or not we have been dragged before.
  6282. dragged: !1,
  6283. // Current transform x and y.
  6284. x: y.position ? y.position.x : y.defaultPosition.x,
  6285. y: y.position ? y.position.y : y.defaultPosition.y,
  6286. prevPropsPosition: {
  6287. ...y.position
  6288. },
  6289. // Used for compensating for out-of-bounds drags
  6290. slackX: 0,
  6291. slackY: 0,
  6292. // Can only determine if SVG after mounting
  6293. isElementSVG: !1
  6294. }, y.position && !(y.onDrag || y.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
  6295. }
  6296. componentDidMount() {
  6297. typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
  6298. isElementSVG: !0
  6299. });
  6300. }
  6301. componentWillUnmount() {
  6302. this.setState({
  6303. dragging: !1
  6304. });
  6305. }
  6306. // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
  6307. // the underlying DOM node ourselves. See the README for more information.
  6308. findDOMNode() {
  6309. var y, w;
  6310. return (y = (w = this.props) === null || w === void 0 || (w = w.nodeRef) === null || w === void 0 ? void 0 : w.current) !== null && y !== void 0 ? y : r.default.findDOMNode(this);
  6311. }
  6312. render() {
  6313. const {
  6314. axis: y,
  6315. bounds: w,
  6316. children: E,
  6317. defaultPosition: S,
  6318. defaultClassName: x,
  6319. defaultClassNameDragging: R,
  6320. defaultClassNameDragged: k,
  6321. position: L,
  6322. positionOffset: O,
  6323. scale: N,
  6324. ...F
  6325. } = this.props;
  6326. let I = {}, T = null;
  6327. const z = !!!L || this.state.dragging, _ = L || S, A = {
  6328. // Set left if horizontal drag is enabled
  6329. x: (0, i.canDragX)(this) && z ? this.state.x : _.x,
  6330. // Set top if vertical drag is enabled
  6331. y: (0, i.canDragY)(this) && z ? this.state.y : _.y
  6332. };
  6333. this.state.isElementSVG ? T = (0, o.createSVGTransform)(A, O) : I = (0, o.createCSSTransform)(A, O);
  6334. const H = (0, a.default)(E.props.className || "", x, {
  6335. [R]: this.state.dragging,
  6336. [k]: this.state.dragged
  6337. });
  6338. return /* @__PURE__ */ t.createElement(l.default, p({}, F, {
  6339. onStart: this.onDragStart,
  6340. onDrag: this.onDrag,
  6341. onStop: this.onDragStop
  6342. }), /* @__PURE__ */ t.cloneElement(t.Children.only(E), {
  6343. className: H,
  6344. style: {
  6345. ...E.props.style,
  6346. ...I
  6347. },
  6348. transform: T
  6349. }));
  6350. }
  6351. }
  6352. e.default = h, m(h, "displayName", "Draggable"), m(h, "propTypes", {
  6353. // Accepts all props <DraggableCore> accepts.
  6354. ...l.default.propTypes,
  6355. /**
  6356. * `axis` determines which axis the draggable can move.
  6357. *
  6358. * Note that all callbacks will still return data as normal. This only
  6359. * controls flushing to the DOM.
  6360. *
  6361. * 'both' allows movement horizontally and vertically.
  6362. * 'x' limits movement to horizontal axis.
  6363. * 'y' limits movement to vertical axis.
  6364. * 'none' limits all movement.
  6365. *
  6366. * Defaults to 'both'.
  6367. */
  6368. axis: n.default.oneOf(["both", "x", "y", "none"]),
  6369. /**
  6370. * `bounds` determines the range of movement available to the element.
  6371. * Available values are:
  6372. *
  6373. * 'parent' restricts movement within the Draggable's parent node.
  6374. *
  6375. * Alternatively, pass an object with the following properties, all of which are optional:
  6376. *
  6377. * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
  6378. *
  6379. * All values are in px.
  6380. *
  6381. * Example:
  6382. *
  6383. * ```jsx
  6384. * let App = React.createClass({
  6385. * render: function () {
  6386. * return (
  6387. * <Draggable bounds={{right: 300, bottom: 300}}>
  6388. * <div>Content</div>
  6389. * </Draggable>
  6390. * );
  6391. * }
  6392. * });
  6393. * ```
  6394. */
  6395. bounds: n.default.oneOfType([n.default.shape({
  6396. left: n.default.number,
  6397. right: n.default.number,
  6398. top: n.default.number,
  6399. bottom: n.default.number
  6400. }), n.default.string, n.default.oneOf([!1])]),
  6401. defaultClassName: n.default.string,
  6402. defaultClassNameDragging: n.default.string,
  6403. defaultClassNameDragged: n.default.string,
  6404. /**
  6405. * `defaultPosition` specifies the x and y that the dragged item should start at
  6406. *
  6407. * Example:
  6408. *
  6409. * ```jsx
  6410. * let App = React.createClass({
  6411. * render: function () {
  6412. * return (
  6413. * <Draggable defaultPosition={{x: 25, y: 25}}>
  6414. * <div>I start with transformX: 25px and transformY: 25px;</div>
  6415. * </Draggable>
  6416. * );
  6417. * }
  6418. * });
  6419. * ```
  6420. */
  6421. defaultPosition: n.default.shape({
  6422. x: n.default.number,
  6423. y: n.default.number
  6424. }),
  6425. positionOffset: n.default.shape({
  6426. x: n.default.oneOfType([n.default.number, n.default.string]),
  6427. y: n.default.oneOfType([n.default.number, n.default.string])
  6428. }),
  6429. /**
  6430. * `position`, if present, defines the current position of the element.
  6431. *
  6432. * This is similar to how form elements in React work - if no `position` is supplied, the component
  6433. * is uncontrolled.
  6434. *
  6435. * Example:
  6436. *
  6437. * ```jsx
  6438. * let App = React.createClass({
  6439. * render: function () {
  6440. * return (
  6441. * <Draggable position={{x: 25, y: 25}}>
  6442. * <div>I start with transformX: 25px and transformY: 25px;</div>
  6443. * </Draggable>
  6444. * );
  6445. * }
  6446. * });
  6447. * ```
  6448. */
  6449. position: n.default.shape({
  6450. x: n.default.number,
  6451. y: n.default.number
  6452. }),
  6453. /**
  6454. * These properties should be defined on the child, not here.
  6455. */
  6456. className: u.dontSetMe,
  6457. style: u.dontSetMe,
  6458. transform: u.dontSetMe
  6459. }), m(h, "defaultProps", {
  6460. ...l.default.defaultProps,
  6461. axis: "both",
  6462. bounds: !1,
  6463. defaultClassName: "react-draggable",
  6464. defaultClassNameDragging: "react-draggable-dragging",
  6465. defaultClassNameDragged: "react-draggable-dragged",
  6466. defaultPosition: {
  6467. x: 0,
  6468. y: 0
  6469. },
  6470. scale: 1
  6471. });
  6472. }(fi)), fi;
  6473. }
  6474. var ql;
  6475. function Vo() {
  6476. if (ql) return aa.exports;
  6477. ql = 1;
  6478. const {
  6479. default: e,
  6480. DraggableCore: t
  6481. } = Ph();
  6482. return aa.exports = e, aa.exports.default = e, aa.exports.DraggableCore = t, aa.exports;
  6483. }
  6484. var Mh = Vo();
  6485. const kh = /* @__PURE__ */ Aa(Mh), Dh = "univer-dialog", Nh = "univer-dialog-wrap", Ih = "univer-dialog-title", Oh = "univer-dialog-title-content", _h = "univer-dialog-content", Lh = "univer-dialog-close", Th = "univer-dialog-header", $h = "univer-dialog-body", Ah = "univer-dialog-footer", jh = "univer-dialog-zoom-enter", Fh = "univer-dialog-zoom-appear", zh = "univer-dialog-zoom-leave", Hh = "univer-dialog-zoom-enter-active", Vh = "univer-dialog-zoom-appear-active", Wh = "univer-dialog-zoom-in", Bh = "univer-dialog-zoom-leave-active", Uh = "univer-dialog-zoom-out", qh = "univer-dialog-mask", Kh = "univer-dialog-mask-hidden", Yh = "univer-dialog-fade-enter", Gh = "univer-dialog-fade-appear", Xh = "univer-dialog-fade-leave", Zh = "univer-dialog-fade-enter-active", Qh = "univer-dialog-fade-appear-active", Jh = "univer-dialog-fade-in", eg = "univer-dialog-fade-leave-active", tg = "univer-dialog-fade-out", ng = "univer-dialog-root-draggable", ia = {
  6486. dialog: Dh,
  6487. dialogWrap: Nh,
  6488. dialogTitle: Ih,
  6489. dialogTitleContent: Oh,
  6490. dialogContent: _h,
  6491. dialogClose: Lh,
  6492. dialogHeader: Th,
  6493. dialogBody: $h,
  6494. dialogFooter: Ah,
  6495. dialogZoomEnter: jh,
  6496. dialogZoomAppear: Fh,
  6497. dialogZoomLeave: zh,
  6498. dialogZoomEnterActive: Hh,
  6499. dialogZoomAppearActive: Vh,
  6500. dialogZoomIn: Wh,
  6501. dialogZoomLeaveActive: Bh,
  6502. dialogZoomOut: Uh,
  6503. dialogMask: qh,
  6504. dialogMaskHidden: Kh,
  6505. dialogFadeEnter: Yh,
  6506. dialogFadeAppear: Gh,
  6507. dialogFadeLeave: Xh,
  6508. dialogFadeEnterActive: Zh,
  6509. dialogFadeAppearActive: Qh,
  6510. dialogFadeIn: Jh,
  6511. dialogFadeLeaveActive: eg,
  6512. dialogFadeOut: tg,
  6513. dialogRootDraggable: ng
  6514. };
  6515. function rg(e) {
  6516. const {
  6517. className: t,
  6518. children: n,
  6519. style: r,
  6520. visible: a = !1,
  6521. title: o,
  6522. width: i,
  6523. draggable: u = !1,
  6524. closeIcon: l = /* @__PURE__ */ q.jsx(gu, {}),
  6525. defaultPosition: c,
  6526. destroyOnClose: s = !1,
  6527. preservePositionOnDestroy: v = !1,
  6528. footer: C,
  6529. onClose: p,
  6530. mask: m,
  6531. dialogStyles: b,
  6532. closable: f,
  6533. maskClosable: h
  6534. } = e, [g, y] = rt(!1), [w, E] = rt(null), { mountContainer: S } = Sn(In), x = u ? /* @__PURE__ */ q.jsx(
  6535. "div",
  6536. {
  6537. className: ia.dialogTitleContent,
  6538. style: {
  6539. width: "100%",
  6540. cursor: "pointer",
  6541. ...b == null ? void 0 : b.header
  6542. },
  6543. onMouseOver: () => {
  6544. g && y(!1);
  6545. },
  6546. onMouseOut: () => {
  6547. y(!0);
  6548. },
  6549. onFocus: () => {
  6550. },
  6551. onBlur: () => {
  6552. },
  6553. children: o
  6554. }
  6555. ) : /* @__PURE__ */ q.jsx("div", { className: ia.dialogTitleContent, children: o }), R = (L) => {
  6556. const [O, N] = rt({ left: 0, top: 0, bottom: 0, right: 0 }), F = Ce(null);
  6557. function I(z, _) {
  6558. v && E({ x: _.x, y: _.y });
  6559. }
  6560. const T = w || c || { x: 0, y: 0 }, P = (z, _) => {
  6561. var U;
  6562. const { clientWidth: A, clientHeight: H } = window.document.documentElement, $ = (U = F.current) == null ? void 0 : U.getBoundingClientRect();
  6563. $ && N({
  6564. left: -$.left + _.x,
  6565. right: A - ($.right - _.x),
  6566. top: -$.top + _.y,
  6567. bottom: H - ($.bottom - _.y)
  6568. });
  6569. };
  6570. return u ? /* @__PURE__ */ q.jsx(
  6571. kh,
  6572. {
  6573. disabled: g,
  6574. defaultPosition: T,
  6575. bounds: O,
  6576. nodeRef: F,
  6577. onStart: (z, _) => P(z, _),
  6578. onStop: I,
  6579. children: /* @__PURE__ */ q.jsx("div", { ref: F, children: L })
  6580. }
  6581. ) : L;
  6582. }, k = m != null ? m : !u;
  6583. return S && /* @__PURE__ */ q.jsx(
  6584. xd,
  6585. {
  6586. className: t,
  6587. width: i,
  6588. prefixCls: ia.dialog,
  6589. rootClassName: k ? ia.dialogRoot : ia.dialogRootDraggable,
  6590. getContainer: () => S,
  6591. visible: a,
  6592. title: x,
  6593. modalRender: R,
  6594. closeIcon: l,
  6595. destroyOnClose: s,
  6596. footer: C,
  6597. mask: k,
  6598. style: r,
  6599. onClose: p,
  6600. styles: b,
  6601. closable: f,
  6602. maskClosable: h,
  6603. children: n
  6604. }
  6605. );
  6606. }
  6607. const ag = "univer-confirm-footer", og = {
  6608. confirmFooter: ag
  6609. };
  6610. function ig(e) {
  6611. const { locale: t, cancelText: n, confirmText: r, onClose: a, onConfirm: o } = e;
  6612. return /* @__PURE__ */ q.jsxs("footer", { className: og.confirmFooter, children: [
  6613. /* @__PURE__ */ q.jsx(Po, { onClick: a, children: n != null ? n : t == null ? void 0 : t.Confirm.cancel }),
  6614. /* @__PURE__ */ q.jsx(Po, { type: "primary", onClick: o, children: r != null ? r : t == null ? void 0 : t.Confirm.confirm })
  6615. ] });
  6616. }
  6617. function jO(e) {
  6618. const { children: t, visible: n = !1, title: r, cancelText: a, confirmText: o, width: i, onClose: u, onConfirm: l } = e, { locale: c } = Sn(In);
  6619. return /* @__PURE__ */ q.jsx(
  6620. rg,
  6621. {
  6622. visible: n,
  6623. title: r,
  6624. footer: /* @__PURE__ */ q.jsx(
  6625. ig,
  6626. {
  6627. locale: c,
  6628. cancelText: a,
  6629. confirmText: o,
  6630. onClose: u,
  6631. onConfirm: l
  6632. }
  6633. ),
  6634. onClose: u,
  6635. width: i,
  6636. children: t
  6637. }
  6638. );
  6639. }
  6640. function _e() {
  6641. return _e = Object.assign ? Object.assign.bind() : function(e) {
  6642. for (var t = 1; t < arguments.length; t++) {
  6643. var n = arguments[t];
  6644. for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
  6645. }
  6646. return e;
  6647. }, _e.apply(null, arguments);
  6648. }
  6649. function Wi(e, t) {
  6650. (t == null || t > e.length) && (t = e.length);
  6651. for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
  6652. return r;
  6653. }
  6654. function ug(e) {
  6655. if (Array.isArray(e)) return Wi(e);
  6656. }
  6657. function Md(e) {
  6658. if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
  6659. }
  6660. function Mu(e, t) {
  6661. if (e) {
  6662. if (typeof e == "string") return Wi(e, t);
  6663. var n = {}.toString.call(e).slice(8, -1);
  6664. return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Wi(e, t) : void 0;
  6665. }
  6666. }
  6667. function lg() {
  6668. throw new TypeError(`Invalid attempt to spread non-iterable instance.
  6669. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  6670. }
  6671. function ft(e) {
  6672. return ug(e) || Md(e) || Mu(e) || lg();
  6673. }
  6674. function _t(e) {
  6675. "@babel/helpers - typeof";
  6676. return _t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
  6677. return typeof t;
  6678. } : function(t) {
  6679. return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  6680. }, _t(e);
  6681. }
  6682. function sg(e, t) {
  6683. if (_t(e) != "object" || !e) return e;
  6684. var n = e[Symbol.toPrimitive];
  6685. if (n !== void 0) {
  6686. var r = n.call(e, t || "default");
  6687. if (_t(r) != "object") return r;
  6688. throw new TypeError("@@toPrimitive must return a primitive value.");
  6689. }
  6690. return (t === "string" ? String : Number)(e);
  6691. }
  6692. function kd(e) {
  6693. var t = sg(e, "string");
  6694. return _t(t) == "symbol" ? t : t + "";
  6695. }
  6696. function ie(e, t, n) {
  6697. return (t = kd(t)) in e ? Object.defineProperty(e, t, {
  6698. value: n,
  6699. enumerable: !0,
  6700. configurable: !0,
  6701. writable: !0
  6702. }) : e[t] = n, e;
  6703. }
  6704. function Kl(e, t) {
  6705. var n = Object.keys(e);
  6706. if (Object.getOwnPropertySymbols) {
  6707. var r = Object.getOwnPropertySymbols(e);
  6708. t && (r = r.filter(function(a) {
  6709. return Object.getOwnPropertyDescriptor(e, a).enumerable;
  6710. })), n.push.apply(n, r);
  6711. }
  6712. return n;
  6713. }
  6714. function re(e) {
  6715. for (var t = 1; t < arguments.length; t++) {
  6716. var n = arguments[t] != null ? arguments[t] : {};
  6717. t % 2 ? Kl(Object(n), !0).forEach(function(r) {
  6718. ie(e, r, n[r]);
  6719. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Kl(Object(n)).forEach(function(r) {
  6720. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
  6721. });
  6722. }
  6723. return e;
  6724. }
  6725. function Dd(e) {
  6726. if (Array.isArray(e)) return e;
  6727. }
  6728. function cg(e, t) {
  6729. var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  6730. if (n != null) {
  6731. var r, a, o, i, u = [], l = !0, c = !1;
  6732. try {
  6733. if (o = (n = n.call(e)).next, t === 0) {
  6734. if (Object(n) !== n) return;
  6735. l = !1;
  6736. } else for (; !(l = (r = o.call(n)).done) && (u.push(r.value), u.length !== t); l = !0) ;
  6737. } catch (s) {
  6738. c = !0, a = s;
  6739. } finally {
  6740. try {
  6741. if (!l && n.return != null && (i = n.return(), Object(i) !== i)) return;
  6742. } finally {
  6743. if (c) throw a;
  6744. }
  6745. }
  6746. return u;
  6747. }
  6748. }
  6749. function Nd() {
  6750. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  6751. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  6752. }
  6753. function Z(e, t) {
  6754. return Dd(e) || cg(e, t) || Mu(e, t) || Nd();
  6755. }
  6756. function Er(e, t) {
  6757. var n = Object.assign({}, e);
  6758. return Array.isArray(t) && t.forEach(function(r) {
  6759. delete n[r];
  6760. }), n;
  6761. }
  6762. function ku(e, t) {
  6763. if (e == null) return {};
  6764. var n = {};
  6765. for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
  6766. if (t.includes(r)) continue;
  6767. n[r] = e[r];
  6768. }
  6769. return n;
  6770. }
  6771. function mt(e, t) {
  6772. if (e == null) return {};
  6773. var n, r, a = ku(e, t);
  6774. if (Object.getOwnPropertySymbols) {
  6775. var o = Object.getOwnPropertySymbols(e);
  6776. for (r = 0; r < o.length; r++) n = o[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
  6777. }
  6778. return a;
  6779. }
  6780. function ko() {
  6781. return ko = Object.assign ? Object.assign.bind() : function(e) {
  6782. for (var t = 1; t < arguments.length; t++) {
  6783. var n = arguments[t];
  6784. for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
  6785. }
  6786. return e;
  6787. }, ko.apply(null, arguments);
  6788. }
  6789. function Oa(e) {
  6790. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [];
  6791. return me.Children.forEach(e, function(r) {
  6792. r == null && !t.keepEmpty || (Array.isArray(r) ? n = n.concat(Oa(r)) : Ma.isFragment(r) && r.props ? n = n.concat(Oa(r.props.children, t)) : n.push(r));
  6793. }), n;
  6794. }
  6795. var Bi = /* @__PURE__ */ d.createContext(null);
  6796. function dg(e) {
  6797. var t = e.children, n = e.onBatchResize, r = d.useRef(0), a = d.useRef([]), o = d.useContext(Bi), i = d.useCallback(function(u, l, c) {
  6798. r.current += 1;
  6799. var s = r.current;
  6800. a.current.push({
  6801. size: u,
  6802. element: l,
  6803. data: c
  6804. }), Promise.resolve().then(function() {
  6805. s === r.current && (n == null || n(a.current), a.current = []);
  6806. }), o == null || o(u, l, c);
  6807. }, [n, o]);
  6808. return /* @__PURE__ */ d.createElement(Bi.Provider, {
  6809. value: i
  6810. }, t);
  6811. }
  6812. var Id = function() {
  6813. if (typeof Map < "u")
  6814. return Map;
  6815. function e(t, n) {
  6816. var r = -1;
  6817. return t.some(function(a, o) {
  6818. return a[0] === n ? (r = o, !0) : !1;
  6819. }), r;
  6820. }
  6821. return (
  6822. /** @class */
  6823. function() {
  6824. function t() {
  6825. this.__entries__ = [];
  6826. }
  6827. return Object.defineProperty(t.prototype, "size", {
  6828. /**
  6829. * @returns {boolean}
  6830. */
  6831. get: function() {
  6832. return this.__entries__.length;
  6833. },
  6834. enumerable: !0,
  6835. configurable: !0
  6836. }), t.prototype.get = function(n) {
  6837. var r = e(this.__entries__, n), a = this.__entries__[r];
  6838. return a && a[1];
  6839. }, t.prototype.set = function(n, r) {
  6840. var a = e(this.__entries__, n);
  6841. ~a ? this.__entries__[a][1] = r : this.__entries__.push([n, r]);
  6842. }, t.prototype.delete = function(n) {
  6843. var r = this.__entries__, a = e(r, n);
  6844. ~a && r.splice(a, 1);
  6845. }, t.prototype.has = function(n) {
  6846. return !!~e(this.__entries__, n);
  6847. }, t.prototype.clear = function() {
  6848. this.__entries__.splice(0);
  6849. }, t.prototype.forEach = function(n, r) {
  6850. r === void 0 && (r = null);
  6851. for (var a = 0, o = this.__entries__; a < o.length; a++) {
  6852. var i = o[a];
  6853. n.call(r, i[1], i[0]);
  6854. }
  6855. }, t;
  6856. }()
  6857. );
  6858. }(), Ui = typeof window < "u" && typeof document < "u" && window.document === document, Do = function() {
  6859. return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
  6860. }(), fg = function() {
  6861. return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Do) : function(e) {
  6862. return setTimeout(function() {
  6863. return e(Date.now());
  6864. }, 1e3 / 60);
  6865. };
  6866. }(), vg = 2;
  6867. function mg(e, t) {
  6868. var n = !1, r = !1, a = 0;
  6869. function o() {
  6870. n && (n = !1, e()), r && u();
  6871. }
  6872. function i() {
  6873. fg(o);
  6874. }
  6875. function u() {
  6876. var l = Date.now();
  6877. if (n) {
  6878. if (l - a < vg)
  6879. return;
  6880. r = !0;
  6881. } else
  6882. n = !0, r = !1, setTimeout(i, t);
  6883. a = l;
  6884. }
  6885. return u;
  6886. }
  6887. var pg = 20, hg = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], gg = typeof MutationObserver < "u", yg = (
  6888. /** @class */
  6889. function() {
  6890. function e() {
  6891. this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = mg(this.refresh.bind(this), pg);
  6892. }
  6893. return e.prototype.addObserver = function(t) {
  6894. ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
  6895. }, e.prototype.removeObserver = function(t) {
  6896. var n = this.observers_, r = n.indexOf(t);
  6897. ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
  6898. }, e.prototype.refresh = function() {
  6899. var t = this.updateObservers_();
  6900. t && this.refresh();
  6901. }, e.prototype.updateObservers_ = function() {
  6902. var t = this.observers_.filter(function(n) {
  6903. return n.gatherActive(), n.hasActive();
  6904. });
  6905. return t.forEach(function(n) {
  6906. return n.broadcastActive();
  6907. }), t.length > 0;
  6908. }, e.prototype.connect_ = function() {
  6909. !Ui || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), gg ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
  6910. attributes: !0,
  6911. childList: !0,
  6912. characterData: !0,
  6913. subtree: !0
  6914. })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
  6915. }, e.prototype.disconnect_ = function() {
  6916. !Ui || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
  6917. }, e.prototype.onTransitionEnd_ = function(t) {
  6918. var n = t.propertyName, r = n === void 0 ? "" : n, a = hg.some(function(o) {
  6919. return !!~r.indexOf(o);
  6920. });
  6921. a && this.refresh();
  6922. }, e.getInstance = function() {
  6923. return this.instance_ || (this.instance_ = new e()), this.instance_;
  6924. }, e.instance_ = null, e;
  6925. }()
  6926. ), Od = function(e, t) {
  6927. for (var n = 0, r = Object.keys(t); n < r.length; n++) {
  6928. var a = r[n];
  6929. Object.defineProperty(e, a, {
  6930. value: t[a],
  6931. enumerable: !1,
  6932. writable: !1,
  6933. configurable: !0
  6934. });
  6935. }
  6936. return e;
  6937. }, qr = function(e) {
  6938. var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  6939. return t || Do;
  6940. }, _d = Wo(0, 0, 0, 0);
  6941. function No(e) {
  6942. return parseFloat(e) || 0;
  6943. }
  6944. function Yl(e) {
  6945. for (var t = [], n = 1; n < arguments.length; n++)
  6946. t[n - 1] = arguments[n];
  6947. return t.reduce(function(r, a) {
  6948. var o = e["border-" + a + "-width"];
  6949. return r + No(o);
  6950. }, 0);
  6951. }
  6952. function bg(e) {
  6953. for (var t = ["top", "right", "bottom", "left"], n = {}, r = 0, a = t; r < a.length; r++) {
  6954. var o = a[r], i = e["padding-" + o];
  6955. n[o] = No(i);
  6956. }
  6957. return n;
  6958. }
  6959. function Cg(e) {
  6960. var t = e.getBBox();
  6961. return Wo(0, 0, t.width, t.height);
  6962. }
  6963. function Sg(e) {
  6964. var t = e.clientWidth, n = e.clientHeight;
  6965. if (!t && !n)
  6966. return _d;
  6967. var r = qr(e).getComputedStyle(e), a = bg(r), o = a.left + a.right, i = a.top + a.bottom, u = No(r.width), l = No(r.height);
  6968. if (r.boxSizing === "border-box" && (Math.round(u + o) !== t && (u -= Yl(r, "left", "right") + o), Math.round(l + i) !== n && (l -= Yl(r, "top", "bottom") + i)), !xg(e)) {
  6969. var c = Math.round(u + o) - t, s = Math.round(l + i) - n;
  6970. Math.abs(c) !== 1 && (u -= c), Math.abs(s) !== 1 && (l -= s);
  6971. }
  6972. return Wo(a.left, a.top, u, l);
  6973. }
  6974. var wg = /* @__PURE__ */ function() {
  6975. return typeof SVGGraphicsElement < "u" ? function(e) {
  6976. return e instanceof qr(e).SVGGraphicsElement;
  6977. } : function(e) {
  6978. return e instanceof qr(e).SVGElement && typeof e.getBBox == "function";
  6979. };
  6980. }();
  6981. function xg(e) {
  6982. return e === qr(e).document.documentElement;
  6983. }
  6984. function Eg(e) {
  6985. return Ui ? wg(e) ? Cg(e) : Sg(e) : _d;
  6986. }
  6987. function Rg(e) {
  6988. var t = e.x, n = e.y, r = e.width, a = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, i = Object.create(o.prototype);
  6989. return Od(i, {
  6990. x: t,
  6991. y: n,
  6992. width: r,
  6993. height: a,
  6994. top: n,
  6995. right: t + r,
  6996. bottom: a + n,
  6997. left: t
  6998. }), i;
  6999. }
  7000. function Wo(e, t, n, r) {
  7001. return { x: e, y: t, width: n, height: r };
  7002. }
  7003. var Pg = (
  7004. /** @class */
  7005. function() {
  7006. function e(t) {
  7007. this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Wo(0, 0, 0, 0), this.target = t;
  7008. }
  7009. return e.prototype.isActive = function() {
  7010. var t = Eg(this.target);
  7011. return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
  7012. }, e.prototype.broadcastRect = function() {
  7013. var t = this.contentRect_;
  7014. return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
  7015. }, e;
  7016. }()
  7017. ), Mg = (
  7018. /** @class */
  7019. /* @__PURE__ */ function() {
  7020. function e(t, n) {
  7021. var r = Rg(n);
  7022. Od(this, { target: t, contentRect: r });
  7023. }
  7024. return e;
  7025. }()
  7026. ), kg = (
  7027. /** @class */
  7028. function() {
  7029. function e(t, n, r) {
  7030. if (this.activeObservations_ = [], this.observations_ = new Id(), typeof t != "function")
  7031. throw new TypeError("The callback provided as parameter 1 is not a function.");
  7032. this.callback_ = t, this.controller_ = n, this.callbackCtx_ = r;
  7033. }
  7034. return e.prototype.observe = function(t) {
  7035. if (!arguments.length)
  7036. throw new TypeError("1 argument required, but only 0 present.");
  7037. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  7038. if (!(t instanceof qr(t).Element))
  7039. throw new TypeError('parameter 1 is not of type "Element".');
  7040. var n = this.observations_;
  7041. n.has(t) || (n.set(t, new Pg(t)), this.controller_.addObserver(this), this.controller_.refresh());
  7042. }
  7043. }, e.prototype.unobserve = function(t) {
  7044. if (!arguments.length)
  7045. throw new TypeError("1 argument required, but only 0 present.");
  7046. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  7047. if (!(t instanceof qr(t).Element))
  7048. throw new TypeError('parameter 1 is not of type "Element".');
  7049. var n = this.observations_;
  7050. n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
  7051. }
  7052. }, e.prototype.disconnect = function() {
  7053. this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
  7054. }, e.prototype.gatherActive = function() {
  7055. var t = this;
  7056. this.clearActive(), this.observations_.forEach(function(n) {
  7057. n.isActive() && t.activeObservations_.push(n);
  7058. });
  7059. }, e.prototype.broadcastActive = function() {
  7060. if (this.hasActive()) {
  7061. var t = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
  7062. return new Mg(r.target, r.broadcastRect());
  7063. });
  7064. this.callback_.call(t, n, t), this.clearActive();
  7065. }
  7066. }, e.prototype.clearActive = function() {
  7067. this.activeObservations_.splice(0);
  7068. }, e.prototype.hasActive = function() {
  7069. return this.activeObservations_.length > 0;
  7070. }, e;
  7071. }()
  7072. ), Ld = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Id(), Td = (
  7073. /** @class */
  7074. /* @__PURE__ */ function() {
  7075. function e(t) {
  7076. if (!(this instanceof e))
  7077. throw new TypeError("Cannot call a class as a function.");
  7078. if (!arguments.length)
  7079. throw new TypeError("1 argument required, but only 0 present.");
  7080. var n = yg.getInstance(), r = new kg(t, n, this);
  7081. Ld.set(this, r);
  7082. }
  7083. return e;
  7084. }()
  7085. );
  7086. [
  7087. "observe",
  7088. "unobserve",
  7089. "disconnect"
  7090. ].forEach(function(e) {
  7091. Td.prototype[e] = function() {
  7092. var t;
  7093. return (t = Ld.get(this))[e].apply(t, arguments);
  7094. };
  7095. });
  7096. var $d = function() {
  7097. return typeof Do.ResizeObserver < "u" ? Do.ResizeObserver : Td;
  7098. }();
  7099. const Dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  7100. __proto__: null,
  7101. default: $d
  7102. }, Symbol.toStringTag, { value: "Module" }));
  7103. var rr = /* @__PURE__ */ new Map();
  7104. function Ng(e) {
  7105. e.forEach(function(t) {
  7106. var n, r = t.target;
  7107. (n = rr.get(r)) === null || n === void 0 || n.forEach(function(a) {
  7108. return a(r);
  7109. });
  7110. });
  7111. }
  7112. var Ad = new $d(Ng);
  7113. function Ig(e, t) {
  7114. rr.has(e) || (rr.set(e, /* @__PURE__ */ new Set()), Ad.observe(e)), rr.get(e).add(t);
  7115. }
  7116. function Og(e, t) {
  7117. rr.has(e) && (rr.get(e).delete(t), rr.get(e).size || (Ad.unobserve(e), rr.delete(e)));
  7118. }
  7119. function _g(e, t) {
  7120. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
  7121. }
  7122. function Lg(e, t) {
  7123. for (var n = 0; n < t.length; n++) {
  7124. var r = t[n];
  7125. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Gc(r.key), r);
  7126. }
  7127. }
  7128. function Tg(e, t, n) {
  7129. return Lg(e.prototype, t), Object.defineProperty(e, "prototype", {
  7130. writable: !1
  7131. }), e;
  7132. }
  7133. function qi(e, t) {
  7134. return qi = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
  7135. return n.__proto__ = r, n;
  7136. }, qi(e, t);
  7137. }
  7138. function $g(e, t) {
  7139. if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
  7140. e.prototype = Object.create(t && t.prototype, {
  7141. constructor: {
  7142. value: e,
  7143. writable: !0,
  7144. configurable: !0
  7145. }
  7146. }), Object.defineProperty(e, "prototype", {
  7147. writable: !1
  7148. }), t && qi(e, t);
  7149. }
  7150. function Io(e) {
  7151. return Io = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
  7152. return t.__proto__ || Object.getPrototypeOf(t);
  7153. }, Io(e);
  7154. }
  7155. function jd() {
  7156. try {
  7157. var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  7158. }));
  7159. } catch {
  7160. }
  7161. return (jd = function() {
  7162. return !!e;
  7163. })();
  7164. }
  7165. function Ag(e) {
  7166. if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  7167. return e;
  7168. }
  7169. function jg(e, t) {
  7170. if (t && (Dn(t) == "object" || typeof t == "function")) return t;
  7171. if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
  7172. return Ag(e);
  7173. }
  7174. function Fg(e) {
  7175. var t = jd();
  7176. return function() {
  7177. var n, r = Io(e);
  7178. if (t) {
  7179. var a = Io(this).constructor;
  7180. n = Reflect.construct(r, arguments, a);
  7181. } else n = r.apply(this, arguments);
  7182. return jg(this, n);
  7183. };
  7184. }
  7185. var zg = /* @__PURE__ */ function(e) {
  7186. $g(n, e);
  7187. var t = Fg(n);
  7188. function n() {
  7189. return _g(this, n), t.apply(this, arguments);
  7190. }
  7191. return Tg(n, [{
  7192. key: "render",
  7193. value: function() {
  7194. return this.props.children;
  7195. }
  7196. }]), n;
  7197. }(d.Component);
  7198. function Hg(e, t) {
  7199. var n = e.children, r = e.disabled, a = d.useRef(null), o = d.useRef(null), i = d.useContext(Bi), u = typeof n == "function", l = u ? n(a) : n, c = d.useRef({
  7200. width: -1,
  7201. height: -1,
  7202. offsetWidth: -1,
  7203. offsetHeight: -1
  7204. }), s = !u && /* @__PURE__ */ d.isValidElement(l) && xr(l), v = s ? l.ref : null, C = Gr(v, a), p = function() {
  7205. var h;
  7206. return Br(a.current) || // Support `nativeElement` format
  7207. (a.current && Dn(a.current) === "object" ? Br((h = a.current) === null || h === void 0 ? void 0 : h.nativeElement) : null) || Br(o.current);
  7208. };
  7209. d.useImperativeHandle(t, function() {
  7210. return p();
  7211. });
  7212. var m = d.useRef(e);
  7213. m.current = e;
  7214. var b = d.useCallback(function(f) {
  7215. var h = m.current, g = h.onResize, y = h.data, w = f.getBoundingClientRect(), E = w.width, S = w.height, x = f.offsetWidth, R = f.offsetHeight, k = Math.floor(E), L = Math.floor(S);
  7216. if (c.current.width !== k || c.current.height !== L || c.current.offsetWidth !== x || c.current.offsetHeight !== R) {
  7217. var O = {
  7218. width: k,
  7219. height: L,
  7220. offsetWidth: x,
  7221. offsetHeight: R
  7222. };
  7223. c.current = O;
  7224. var N = x === Math.round(E) ? E : x, F = R === Math.round(S) ? S : R, I = Ur(Ur({}, O), {}, {
  7225. offsetWidth: N,
  7226. offsetHeight: F
  7227. });
  7228. i == null || i(I, f, y), g && Promise.resolve().then(function() {
  7229. g(I, f);
  7230. });
  7231. }
  7232. }, []);
  7233. return d.useEffect(function() {
  7234. var f = p();
  7235. return f && !r && Ig(f, b), function() {
  7236. return Og(f, b);
  7237. };
  7238. }, [a.current, r]), /* @__PURE__ */ d.createElement(zg, {
  7239. ref: o
  7240. }, s ? /* @__PURE__ */ d.cloneElement(l, {
  7241. ref: C
  7242. }) : l);
  7243. }
  7244. var Vg = /* @__PURE__ */ d.forwardRef(Hg), Wg = "rc-observer-key";
  7245. function Bg(e, t) {
  7246. var n = e.children, r = typeof n == "function" ? [n] : Oa(n);
  7247. return r.map(function(a, o) {
  7248. var i = (a == null ? void 0 : a.key) || "".concat(Wg, "-").concat(o);
  7249. return /* @__PURE__ */ d.createElement(Vg, ko({}, e, {
  7250. key: i,
  7251. ref: o === 0 ? t : void 0
  7252. }), a);
  7253. });
  7254. }
  7255. var cr = /* @__PURE__ */ d.forwardRef(Bg);
  7256. cr.Collection = dg;
  7257. function Fd(e) {
  7258. var t;
  7259. return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
  7260. }
  7261. function Ug(e) {
  7262. return Fd(e) instanceof ShadowRoot;
  7263. }
  7264. function Ki(e) {
  7265. return Ug(e) ? Fd(e) : null;
  7266. }
  7267. const Du = function() {
  7268. if (typeof navigator > "u" || typeof window > "u")
  7269. return !1;
  7270. var e = navigator.userAgent || navigator.vendor || window.opera;
  7271. return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
  7272. };
  7273. var qg = /* @__PURE__ */ d.createContext({});
  7274. function Rr(e, t) {
  7275. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
  7276. }
  7277. function Gl(e, t) {
  7278. for (var n = 0; n < t.length; n++) {
  7279. var r = t[n];
  7280. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, kd(r.key), r);
  7281. }
  7282. }
  7283. function Pr(e, t, n) {
  7284. return t && Gl(e.prototype, t), n && Gl(e, n), Object.defineProperty(e, "prototype", {
  7285. writable: !1
  7286. }), e;
  7287. }
  7288. function Oo(e, t) {
  7289. return Oo = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
  7290. return n.__proto__ = r, n;
  7291. }, Oo(e, t);
  7292. }
  7293. function Nu(e, t) {
  7294. if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
  7295. e.prototype = Object.create(t && t.prototype, {
  7296. constructor: {
  7297. value: e,
  7298. writable: !0,
  7299. configurable: !0
  7300. }
  7301. }), Object.defineProperty(e, "prototype", {
  7302. writable: !1
  7303. }), t && Oo(e, t);
  7304. }
  7305. function _o(e) {
  7306. return _o = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
  7307. return t.__proto__ || Object.getPrototypeOf(t);
  7308. }, _o(e);
  7309. }
  7310. function zd() {
  7311. try {
  7312. var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  7313. }));
  7314. } catch {
  7315. }
  7316. return (zd = function() {
  7317. return !!e;
  7318. })();
  7319. }
  7320. function Yi(e) {
  7321. if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  7322. return e;
  7323. }
  7324. function Kg(e, t) {
  7325. if (t && (_t(t) == "object" || typeof t == "function")) return t;
  7326. if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
  7327. return Yi(e);
  7328. }
  7329. function Iu(e) {
  7330. var t = zd();
  7331. return function() {
  7332. var n, r = _o(e);
  7333. if (t) {
  7334. var a = _o(this).constructor;
  7335. n = Reflect.construct(r, arguments, a);
  7336. } else n = r.apply(this, arguments);
  7337. return Kg(this, n);
  7338. };
  7339. }
  7340. var Yg = /* @__PURE__ */ function(e) {
  7341. Nu(n, e);
  7342. var t = Iu(n);
  7343. function n() {
  7344. return Rr(this, n), t.apply(this, arguments);
  7345. }
  7346. return Pr(n, [{
  7347. key: "render",
  7348. value: function() {
  7349. return this.props.children;
  7350. }
  7351. }]), n;
  7352. }(d.Component), er = "none", Ja = "appear", eo = "enter", to = "leave", Xl = "none", Mn = "prepare", zr = "start", Hr = "active", Ou = "end", Hd = "prepared";
  7353. function Zl(e, t) {
  7354. var n = {};
  7355. return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit".concat(e)] = "webkit".concat(t), n["Moz".concat(e)] = "moz".concat(t), n["ms".concat(e)] = "MS".concat(t), n["O".concat(e)] = "o".concat(t.toLowerCase()), n;
  7356. }
  7357. function Gg(e, t) {
  7358. var n = {
  7359. animationend: Zl("Animation", "AnimationEnd"),
  7360. transitionend: Zl("Transition", "TransitionEnd")
  7361. };
  7362. return e && ("AnimationEvent" in t || delete n.animationend.animation, "TransitionEvent" in t || delete n.transitionend.transition), n;
  7363. }
  7364. var Xg = Gg(dn(), typeof window < "u" ? window : {}), Vd = {};
  7365. if (dn()) {
  7366. var Zg = document.createElement("div");
  7367. Vd = Zg.style;
  7368. }
  7369. var no = {};
  7370. function Wd(e) {
  7371. if (no[e])
  7372. return no[e];
  7373. var t = Xg[e];
  7374. if (t)
  7375. for (var n = Object.keys(t), r = n.length, a = 0; a < r; a += 1) {
  7376. var o = n[a];
  7377. if (Object.prototype.hasOwnProperty.call(t, o) && o in Vd)
  7378. return no[e] = t[o], no[e];
  7379. }
  7380. return "";
  7381. }
  7382. var Bd = Wd("animationend"), Ud = Wd("transitionend"), qd = !!(Bd && Ud), Ql = Bd || "animationend", Jl = Ud || "transitionend";
  7383. function es(e, t) {
  7384. if (!e) return null;
  7385. if (_t(e) === "object") {
  7386. var n = t.replace(/-\w/g, function(r) {
  7387. return r[1].toUpperCase();
  7388. });
  7389. return e[n];
  7390. }
  7391. return "".concat(e, "-").concat(t);
  7392. }
  7393. const Qg = function(e) {
  7394. var t = Ce();
  7395. function n(a) {
  7396. a && (a.removeEventListener(Jl, e), a.removeEventListener(Ql, e));
  7397. }
  7398. function r(a) {
  7399. t.current && t.current !== a && n(t.current), a && a !== t.current && (a.addEventListener(Jl, e), a.addEventListener(Ql, e), t.current = a);
  7400. }
  7401. return d.useEffect(function() {
  7402. return function() {
  7403. n(t.current);
  7404. };
  7405. }, []), [r, n];
  7406. };
  7407. var Kd = dn() ? gc : lt;
  7408. const Jg = function() {
  7409. var e = d.useRef(null);
  7410. function t() {
  7411. st.cancel(e.current);
  7412. }
  7413. function n(r) {
  7414. var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
  7415. t();
  7416. var o = st(function() {
  7417. a <= 1 ? r({
  7418. isCanceled: function() {
  7419. return o !== e.current;
  7420. }
  7421. }) : n(r, a - 1);
  7422. });
  7423. e.current = o;
  7424. }
  7425. return d.useEffect(function() {
  7426. return function() {
  7427. t();
  7428. };
  7429. }, []), [n, t];
  7430. };
  7431. var e0 = [Mn, zr, Hr, Ou], t0 = [Mn, Hd], Yd = !1, n0 = !0;
  7432. function Gd(e) {
  7433. return e === Hr || e === Ou;
  7434. }
  7435. const r0 = function(e, t, n) {
  7436. var r = ir(Xl), a = Z(r, 2), o = a[0], i = a[1], u = Jg(), l = Z(u, 2), c = l[0], s = l[1];
  7437. function v() {
  7438. i(Mn, !0);
  7439. }
  7440. var C = t ? t0 : e0;
  7441. return Kd(function() {
  7442. if (o !== Xl && o !== Ou) {
  7443. var p = C.indexOf(o), m = C[p + 1], b = n(o);
  7444. b === Yd ? i(m, !0) : m && c(function(f) {
  7445. function h() {
  7446. f.isCanceled() || i(m, !0);
  7447. }
  7448. b === !0 ? h() : Promise.resolve(b).then(h);
  7449. });
  7450. }
  7451. }, [e, o]), d.useEffect(function() {
  7452. return function() {
  7453. s();
  7454. };
  7455. }, []), [v, o];
  7456. };
  7457. function a0(e, t, n, r) {
  7458. var a = r.motionEnter, o = a === void 0 ? !0 : a, i = r.motionAppear, u = i === void 0 ? !0 : i, l = r.motionLeave, c = l === void 0 ? !0 : l, s = r.motionDeadline, v = r.motionLeaveImmediately, C = r.onAppearPrepare, p = r.onEnterPrepare, m = r.onLeavePrepare, b = r.onAppearStart, f = r.onEnterStart, h = r.onLeaveStart, g = r.onAppearActive, y = r.onEnterActive, w = r.onLeaveActive, E = r.onAppearEnd, S = r.onEnterEnd, x = r.onLeaveEnd, R = r.onVisibleChanged, k = ir(), L = Z(k, 2), O = L[0], N = L[1], F = sd(er), I = Z(F, 2), T = I[0], P = I[1], z = ir(null), _ = Z(z, 2), A = _[0], H = _[1], $ = T(), U = Ce(!1), G = Ce(null);
  7459. function B() {
  7460. return n();
  7461. }
  7462. var ne = Ce(!1);
  7463. function le() {
  7464. P(er), H(null, !0);
  7465. }
  7466. var ee = Ct(function(ue) {
  7467. var se = T();
  7468. if (se !== er) {
  7469. var pe = B();
  7470. if (!(ue && !ue.deadline && ue.target !== pe)) {
  7471. var oe = ne.current, ve;
  7472. se === Ja && oe ? ve = E == null ? void 0 : E(pe, ue) : se === eo && oe ? ve = S == null ? void 0 : S(pe, ue) : se === to && oe && (ve = x == null ? void 0 : x(pe, ue)), oe && ve !== !1 && le();
  7473. }
  7474. }
  7475. }), V = Qg(ee), X = Z(V, 1), J = X[0], M = function(se) {
  7476. switch (se) {
  7477. case Ja:
  7478. return ie(ie(ie({}, Mn, C), zr, b), Hr, g);
  7479. case eo:
  7480. return ie(ie(ie({}, Mn, p), zr, f), Hr, y);
  7481. case to:
  7482. return ie(ie(ie({}, Mn, m), zr, h), Hr, w);
  7483. default:
  7484. return {};
  7485. }
  7486. }, D = d.useMemo(function() {
  7487. return M($);
  7488. }, [$]), j = r0($, !e, function(ue) {
  7489. if (ue === Mn) {
  7490. var se = D[Mn];
  7491. return se ? se(B()) : Yd;
  7492. }
  7493. if (Y in D) {
  7494. var pe;
  7495. H(((pe = D[Y]) === null || pe === void 0 ? void 0 : pe.call(D, B(), null)) || null);
  7496. }
  7497. return Y === Hr && $ !== er && (J(B()), s > 0 && (clearTimeout(G.current), G.current = setTimeout(function() {
  7498. ee({
  7499. deadline: !0
  7500. });
  7501. }, s))), Y === Hd && le(), n0;
  7502. }), W = Z(j, 2), K = W[0], Y = W[1], te = Gd(Y);
  7503. ne.current = te, Kd(function() {
  7504. N(t);
  7505. var ue = U.current;
  7506. U.current = !0;
  7507. var se;
  7508. !ue && t && u && (se = Ja), ue && t && o && (se = eo), (ue && !t && c || !ue && v && !t && c) && (se = to);
  7509. var pe = M(se);
  7510. se && (e || pe[Mn]) ? (P(se), K()) : P(er);
  7511. }, [t]), lt(function() {
  7512. // Cancel appear
  7513. ($ === Ja && !u || // Cancel enter
  7514. $ === eo && !o || // Cancel leave
  7515. $ === to && !c) && P(er);
  7516. }, [u, o, c]), lt(function() {
  7517. return function() {
  7518. U.current = !1, clearTimeout(G.current);
  7519. };
  7520. }, []);
  7521. var Q = d.useRef(!1);
  7522. lt(function() {
  7523. O && (Q.current = !0), O !== void 0 && $ === er && ((Q.current || O) && (R == null || R(O)), Q.current = !0);
  7524. }, [O, $]);
  7525. var ae = A;
  7526. return D[Mn] && Y === zr && (ae = re({
  7527. transition: "none"
  7528. }, ae)), [$, Y, ae, O != null ? O : t];
  7529. }
  7530. function o0(e) {
  7531. var t = e;
  7532. _t(e) === "object" && (t = e.transitionSupport);
  7533. function n(a, o) {
  7534. return !!(a.motionName && t && o !== !1);
  7535. }
  7536. var r = /* @__PURE__ */ d.forwardRef(function(a, o) {
  7537. var i = a.visible, u = i === void 0 ? !0 : i, l = a.removeOnLeave, c = l === void 0 ? !0 : l, s = a.forceRender, v = a.children, C = a.motionName, p = a.leavedClassName, m = a.eventProps, b = d.useContext(qg), f = b.motion, h = n(a, f), g = Ce(), y = Ce();
  7538. function w() {
  7539. try {
  7540. return g.current instanceof HTMLElement ? g.current : Br(y.current);
  7541. } catch {
  7542. return null;
  7543. }
  7544. }
  7545. var E = a0(h, u, w, a), S = Z(E, 4), x = S[0], R = S[1], k = S[2], L = S[3], O = d.useRef(L);
  7546. L && (O.current = !0);
  7547. var N = d.useCallback(function(A) {
  7548. g.current = A, jo(o, A);
  7549. }, [o]), F, I = re(re({}, m), {}, {
  7550. visible: u
  7551. });
  7552. if (!v)
  7553. F = null;
  7554. else if (x === er)
  7555. L ? F = v(re({}, I), N) : !c && O.current && p ? F = v(re(re({}, I), {}, {
  7556. className: p
  7557. }), N) : s || !c && !p ? F = v(re(re({}, I), {}, {
  7558. style: {
  7559. display: "none"
  7560. }
  7561. }), N) : F = null;
  7562. else {
  7563. var T;
  7564. R === Mn ? T = "prepare" : Gd(R) ? T = "active" : R === zr && (T = "start");
  7565. var P = es(C, "".concat(x, "-").concat(T));
  7566. F = v(re(re({}, I), {}, {
  7567. className: xe(es(C, x), ie(ie({}, P, P && T), C, typeof C == "string")),
  7568. style: k
  7569. }), N);
  7570. }
  7571. if (/* @__PURE__ */ d.isValidElement(F) && xr(F)) {
  7572. var z = F, _ = z.ref;
  7573. _ || (F = /* @__PURE__ */ d.cloneElement(F, {
  7574. ref: N
  7575. }));
  7576. }
  7577. return /* @__PURE__ */ d.createElement(Yg, {
  7578. ref: y
  7579. }, F);
  7580. });
  7581. return r.displayName = "CSSMotion", r;
  7582. }
  7583. const Bo = o0(qd);
  7584. var Gi = "add", Xi = "keep", Zi = "remove", hi = "removed";
  7585. function i0(e) {
  7586. var t;
  7587. return e && _t(e) === "object" && "key" in e ? t = e : t = {
  7588. key: e
  7589. }, re(re({}, t), {}, {
  7590. key: String(t.key)
  7591. });
  7592. }
  7593. function Qi() {
  7594. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  7595. return e.map(i0);
  7596. }
  7597. function u0() {
  7598. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = [], r = 0, a = t.length, o = Qi(e), i = Qi(t);
  7599. o.forEach(function(c) {
  7600. for (var s = !1, v = r; v < a; v += 1) {
  7601. var C = i[v];
  7602. if (C.key === c.key) {
  7603. r < v && (n = n.concat(i.slice(r, v).map(function(p) {
  7604. return re(re({}, p), {}, {
  7605. status: Gi
  7606. });
  7607. })), r = v), n.push(re(re({}, C), {}, {
  7608. status: Xi
  7609. })), r += 1, s = !0;
  7610. break;
  7611. }
  7612. }
  7613. s || n.push(re(re({}, c), {}, {
  7614. status: Zi
  7615. }));
  7616. }), r < a && (n = n.concat(i.slice(r).map(function(c) {
  7617. return re(re({}, c), {}, {
  7618. status: Gi
  7619. });
  7620. })));
  7621. var u = {};
  7622. n.forEach(function(c) {
  7623. var s = c.key;
  7624. u[s] = (u[s] || 0) + 1;
  7625. });
  7626. var l = Object.keys(u).filter(function(c) {
  7627. return u[c] > 1;
  7628. });
  7629. return l.forEach(function(c) {
  7630. n = n.filter(function(s) {
  7631. var v = s.key, C = s.status;
  7632. return v !== c || C !== Zi;
  7633. }), n.forEach(function(s) {
  7634. s.key === c && (s.status = Xi);
  7635. });
  7636. }), n;
  7637. }
  7638. var l0 = ["component", "children", "onVisibleChanged", "onAllRemoved"], s0 = ["status"], c0 = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
  7639. function d0(e) {
  7640. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bo, n = /* @__PURE__ */ function(r) {
  7641. Nu(o, r);
  7642. var a = Iu(o);
  7643. function o() {
  7644. var i;
  7645. Rr(this, o);
  7646. for (var u = arguments.length, l = new Array(u), c = 0; c < u; c++)
  7647. l[c] = arguments[c];
  7648. return i = a.call.apply(a, [this].concat(l)), ie(Yi(i), "state", {
  7649. keyEntities: []
  7650. }), ie(Yi(i), "removeKey", function(s) {
  7651. i.setState(function(v) {
  7652. var C = v.keyEntities.map(function(p) {
  7653. return p.key !== s ? p : re(re({}, p), {}, {
  7654. status: hi
  7655. });
  7656. });
  7657. return {
  7658. keyEntities: C
  7659. };
  7660. }, function() {
  7661. var v = i.state.keyEntities, C = v.filter(function(p) {
  7662. var m = p.status;
  7663. return m !== hi;
  7664. }).length;
  7665. C === 0 && i.props.onAllRemoved && i.props.onAllRemoved();
  7666. });
  7667. }), i;
  7668. }
  7669. return Pr(o, [{
  7670. key: "render",
  7671. value: function() {
  7672. var u = this, l = this.state.keyEntities, c = this.props, s = c.component, v = c.children, C = c.onVisibleChanged;
  7673. c.onAllRemoved;
  7674. var p = mt(c, l0), m = s || d.Fragment, b = {};
  7675. return c0.forEach(function(f) {
  7676. b[f] = p[f], delete p[f];
  7677. }), delete p.keys, /* @__PURE__ */ d.createElement(m, p, l.map(function(f, h) {
  7678. var g = f.status, y = mt(f, s0), w = g === Gi || g === Xi;
  7679. return /* @__PURE__ */ d.createElement(t, _e({}, b, {
  7680. key: y.key,
  7681. visible: w,
  7682. eventProps: y,
  7683. onVisibleChanged: function(S) {
  7684. C == null || C(S, {
  7685. key: y.key
  7686. }), S || u.removeKey(y.key);
  7687. }
  7688. }), function(E, S) {
  7689. return v(re(re({}, E), {}, {
  7690. index: h
  7691. }), S);
  7692. });
  7693. }));
  7694. }
  7695. }], [{
  7696. key: "getDerivedStateFromProps",
  7697. value: function(u, l) {
  7698. var c = u.keys, s = l.keyEntities, v = Qi(c), C = u0(s, v);
  7699. return {
  7700. keyEntities: C.filter(function(p) {
  7701. var m = s.find(function(b) {
  7702. var f = b.key;
  7703. return p.key === f;
  7704. });
  7705. return !(m && m.status === hi && p.status === Zi);
  7706. })
  7707. };
  7708. }
  7709. }]), o;
  7710. }(d.Component);
  7711. return ie(n, "defaultProps", {
  7712. component: "div"
  7713. }), n;
  7714. }
  7715. d0(qd);
  7716. function f0(e) {
  7717. var t = e.prefixCls, n = e.align, r = e.arrow, a = e.arrowPos, o = r || {}, i = o.className, u = o.content, l = a.x, c = l === void 0 ? 0 : l, s = a.y, v = s === void 0 ? 0 : s, C = d.useRef();
  7718. if (!n || !n.points)
  7719. return null;
  7720. var p = {
  7721. position: "absolute"
  7722. };
  7723. if (n.autoArrow !== !1) {
  7724. var m = n.points[0], b = n.points[1], f = m[0], h = m[1], g = b[0], y = b[1];
  7725. f === g || !["t", "b"].includes(f) ? p.top = v : f === "t" ? p.top = 0 : p.bottom = 0, h === y || !["l", "r"].includes(h) ? p.left = c : h === "l" ? p.left = 0 : p.right = 0;
  7726. }
  7727. return /* @__PURE__ */ d.createElement("div", {
  7728. ref: C,
  7729. className: xe("".concat(t, "-arrow"), i),
  7730. style: p
  7731. }, u);
  7732. }
  7733. function v0(e) {
  7734. var t = e.prefixCls, n = e.open, r = e.zIndex, a = e.mask, o = e.motion;
  7735. return a ? /* @__PURE__ */ d.createElement(Bo, _e({}, o, {
  7736. motionAppear: !0,
  7737. visible: n,
  7738. removeOnLeave: !0
  7739. }), function(i) {
  7740. var u = i.className;
  7741. return /* @__PURE__ */ d.createElement("div", {
  7742. style: {
  7743. zIndex: r
  7744. },
  7745. className: xe("".concat(t, "-mask"), u)
  7746. });
  7747. }) : null;
  7748. }
  7749. var m0 = /* @__PURE__ */ d.memo(function(e) {
  7750. var t = e.children;
  7751. return t;
  7752. }, function(e, t) {
  7753. return t.cache;
  7754. }), p0 = /* @__PURE__ */ d.forwardRef(function(e, t) {
  7755. var n = e.popup, r = e.className, a = e.prefixCls, o = e.style, i = e.target, u = e.onVisibleChanged, l = e.open, c = e.keepDom, s = e.fresh, v = e.onClick, C = e.mask, p = e.arrow, m = e.arrowPos, b = e.align, f = e.motion, h = e.maskMotion, g = e.forceRender, y = e.getPopupContainer, w = e.autoDestroy, E = e.portal, S = e.zIndex, x = e.onMouseEnter, R = e.onMouseLeave, k = e.onPointerEnter, L = e.onPointerDownCapture, O = e.ready, N = e.offsetX, F = e.offsetY, I = e.offsetR, T = e.offsetB, P = e.onAlign, z = e.onPrepare, _ = e.stretch, A = e.targetWidth, H = e.targetHeight, $ = typeof n == "function" ? n() : n, U = l || c, G = (y == null ? void 0 : y.length) > 0, B = d.useState(!y || !G), ne = Z(B, 2), le = ne[0], ee = ne[1];
  7756. if (St(function() {
  7757. !le && G && i && ee(!0);
  7758. }, [le, G, i]), !le)
  7759. return null;
  7760. var V = "auto", X = {
  7761. left: "-1000vw",
  7762. top: "-1000vh",
  7763. right: V,
  7764. bottom: V
  7765. };
  7766. if (O || !l) {
  7767. var J, M = b.points, D = b.dynamicInset || ((J = b._experimental) === null || J === void 0 ? void 0 : J.dynamicInset), j = D && M[0][1] === "r", W = D && M[0][0] === "b";
  7768. j ? (X.right = I, X.left = V) : (X.left = N, X.right = V), W ? (X.bottom = T, X.top = V) : (X.top = F, X.bottom = V);
  7769. }
  7770. var K = {};
  7771. return _ && (_.includes("height") && H ? K.height = H : _.includes("minHeight") && H && (K.minHeight = H), _.includes("width") && A ? K.width = A : _.includes("minWidth") && A && (K.minWidth = A)), l || (K.pointerEvents = "none"), /* @__PURE__ */ d.createElement(E, {
  7772. open: g || U,
  7773. getContainer: y && function() {
  7774. return y(i);
  7775. },
  7776. autoDestroy: w
  7777. }, /* @__PURE__ */ d.createElement(v0, {
  7778. prefixCls: a,
  7779. open: l,
  7780. zIndex: S,
  7781. mask: C,
  7782. motion: h
  7783. }), /* @__PURE__ */ d.createElement(cr, {
  7784. onResize: P,
  7785. disabled: !l
  7786. }, function(Y) {
  7787. return /* @__PURE__ */ d.createElement(Bo, _e({
  7788. motionAppear: !0,
  7789. motionEnter: !0,
  7790. motionLeave: !0,
  7791. removeOnLeave: !1,
  7792. forceRender: g,
  7793. leavedClassName: "".concat(a, "-hidden")
  7794. }, f, {
  7795. onAppearPrepare: z,
  7796. onEnterPrepare: z,
  7797. visible: l,
  7798. onVisibleChanged: function(Q) {
  7799. var ae;
  7800. f == null || (ae = f.onVisibleChanged) === null || ae === void 0 || ae.call(f, Q), u(Q);
  7801. }
  7802. }), function(te, Q) {
  7803. var ae = te.className, ue = te.style, se = xe(a, ae, r);
  7804. return /* @__PURE__ */ d.createElement("div", {
  7805. ref: lr(Y, t, Q),
  7806. className: se,
  7807. style: re(re(re(re({
  7808. "--arrow-x": "".concat(m.x || 0, "px"),
  7809. "--arrow-y": "".concat(m.y || 0, "px")
  7810. }, X), K), ue), {}, {
  7811. boxSizing: "border-box",
  7812. zIndex: S
  7813. }, o),
  7814. onMouseEnter: x,
  7815. onMouseLeave: R,
  7816. onPointerEnter: k,
  7817. onClick: v,
  7818. onPointerDownCapture: L
  7819. }, p && /* @__PURE__ */ d.createElement(f0, {
  7820. prefixCls: a,
  7821. arrow: p,
  7822. arrowPos: m,
  7823. align: b
  7824. }), /* @__PURE__ */ d.createElement(m0, {
  7825. cache: !l && !s
  7826. }, $));
  7827. });
  7828. }));
  7829. }), h0 = /* @__PURE__ */ d.forwardRef(function(e, t) {
  7830. var n = e.children, r = e.getTriggerDOMNode, a = xr(n), o = d.useCallback(function(u) {
  7831. jo(t, r ? r(u) : u);
  7832. }, [r]), i = Gr(o, n.ref);
  7833. return a ? /* @__PURE__ */ d.cloneElement(n, {
  7834. ref: i
  7835. }) : n;
  7836. }), ts = /* @__PURE__ */ d.createContext(null);
  7837. function ns(e) {
  7838. return e ? Array.isArray(e) ? e : [e] : [];
  7839. }
  7840. function g0(e, t, n, r) {
  7841. return d.useMemo(function() {
  7842. var a = ns(n != null ? n : t), o = ns(r != null ? r : t), i = new Set(a), u = new Set(o);
  7843. return e && (i.has("hover") && (i.delete("hover"), i.add("click")), u.has("hover") && (u.delete("hover"), u.add("click"))), [i, u];
  7844. }, [e, t, n, r]);
  7845. }
  7846. const _u = function(e) {
  7847. if (!e)
  7848. return !1;
  7849. if (e instanceof Element) {
  7850. if (e.offsetParent)
  7851. return !0;
  7852. if (e.getBBox) {
  7853. var t = e.getBBox(), n = t.width, r = t.height;
  7854. if (n || r)
  7855. return !0;
  7856. }
  7857. if (e.getBoundingClientRect) {
  7858. var a = e.getBoundingClientRect(), o = a.width, i = a.height;
  7859. if (o || i)
  7860. return !0;
  7861. }
  7862. }
  7863. return !1;
  7864. };
  7865. function y0() {
  7866. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = arguments.length > 2 ? arguments[2] : void 0;
  7867. return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
  7868. }
  7869. function b0(e, t, n, r) {
  7870. for (var a = n.points, o = Object.keys(e), i = 0; i < o.length; i += 1) {
  7871. var u, l = o[i];
  7872. if (y0((u = e[l]) === null || u === void 0 ? void 0 : u.points, a, r))
  7873. return "".concat(t, "-placement-").concat(l);
  7874. }
  7875. return "";
  7876. }
  7877. function rs(e, t, n, r) {
  7878. return t || (n ? {
  7879. motionName: "".concat(e, "-").concat(n)
  7880. } : r ? {
  7881. motionName: r
  7882. } : null);
  7883. }
  7884. function ja(e) {
  7885. return e.ownerDocument.defaultView;
  7886. }
  7887. function Ji(e) {
  7888. for (var t = [], n = e == null ? void 0 : e.parentElement, r = ["hidden", "scroll", "clip", "auto"]; n; ) {
  7889. var a = ja(n).getComputedStyle(n), o = a.overflowX, i = a.overflowY, u = a.overflow;
  7890. [o, i, u].some(function(l) {
  7891. return r.includes(l);
  7892. }) && t.push(n), n = n.parentElement;
  7893. }
  7894. return t;
  7895. }
  7896. function _a(e) {
  7897. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  7898. return Number.isNaN(e) ? t : e;
  7899. }
  7900. function ua(e) {
  7901. return _a(parseFloat(e), 0);
  7902. }
  7903. function as(e, t) {
  7904. var n = re({}, e);
  7905. return (t || []).forEach(function(r) {
  7906. if (!(r instanceof HTMLBodyElement || r instanceof HTMLHtmlElement)) {
  7907. var a = ja(r).getComputedStyle(r), o = a.overflow, i = a.overflowClipMargin, u = a.borderTopWidth, l = a.borderBottomWidth, c = a.borderLeftWidth, s = a.borderRightWidth, v = r.getBoundingClientRect(), C = r.offsetHeight, p = r.clientHeight, m = r.offsetWidth, b = r.clientWidth, f = ua(u), h = ua(l), g = ua(c), y = ua(s), w = _a(Math.round(v.width / m * 1e3) / 1e3), E = _a(Math.round(v.height / C * 1e3) / 1e3), S = (m - b - g - y) * w, x = (C - p - f - h) * E, R = f * E, k = h * E, L = g * w, O = y * w, N = 0, F = 0;
  7908. if (o === "clip") {
  7909. var I = ua(i);
  7910. N = I * w, F = I * E;
  7911. }
  7912. var T = v.x + L - N, P = v.y + R - F, z = T + v.width + 2 * N - L - O - S, _ = P + v.height + 2 * F - R - k - x;
  7913. n.left = Math.max(n.left, T), n.top = Math.max(n.top, P), n.right = Math.min(n.right, z), n.bottom = Math.min(n.bottom, _);
  7914. }
  7915. }), n;
  7916. }
  7917. function os(e) {
  7918. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(t), r = n.match(/^(.*)\%$/);
  7919. return r ? e * (parseFloat(r[1]) / 100) : parseFloat(n);
  7920. }
  7921. function is(e, t) {
  7922. var n = t || [], r = Z(n, 2), a = r[0], o = r[1];
  7923. return [os(e.width, a), os(e.height, o)];
  7924. }
  7925. function us() {
  7926. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
  7927. return [e[0], e[1]];
  7928. }
  7929. function Ir(e, t) {
  7930. var n = t[0], r = t[1], a, o;
  7931. return n === "t" ? o = e.y : n === "b" ? o = e.y + e.height : o = e.y + e.height / 2, r === "l" ? a = e.x : r === "r" ? a = e.x + e.width : a = e.x + e.width / 2, {
  7932. x: a,
  7933. y: o
  7934. };
  7935. }
  7936. function Xn(e, t) {
  7937. var n = {
  7938. t: "b",
  7939. b: "t",
  7940. l: "r",
  7941. r: "l"
  7942. };
  7943. return e.map(function(r, a) {
  7944. return a === t ? n[r] || "c" : r;
  7945. }).join("");
  7946. }
  7947. function C0(e, t, n, r, a, o, i) {
  7948. var u = d.useState({
  7949. ready: !1,
  7950. offsetX: 0,
  7951. offsetY: 0,
  7952. offsetR: 0,
  7953. offsetB: 0,
  7954. arrowX: 0,
  7955. arrowY: 0,
  7956. scaleX: 1,
  7957. scaleY: 1,
  7958. align: a[r] || {}
  7959. }), l = Z(u, 2), c = l[0], s = l[1], v = d.useRef(0), C = d.useMemo(function() {
  7960. return t ? Ji(t) : [];
  7961. }, [t]), p = d.useRef({}), m = function() {
  7962. p.current = {};
  7963. };
  7964. e || m();
  7965. var b = Ct(function() {
  7966. if (t && n && e) {
  7967. let bn = function(kr, Wn) {
  7968. var Bn = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ve, ea = B.x + kr, Wa = B.y + Wn, ni = ea + j, ri = Wa + D, ai = Math.max(ea, Bn.left), Ae = Math.max(Wa, Bn.top), Qe = Math.min(ni, Bn.right), kt = Math.min(ri, Bn.bottom);
  7969. return Math.max(0, (Qe - ai) * (kt - Ae));
  7970. }, Va = function() {
  7971. xt = B.y + ye, Ft = xt + D, Mt = B.x + we, Qt = Mt + j;
  7972. };
  7973. var g, y, w, E, S = t, x = S.ownerDocument, R = ja(S), k = R.getComputedStyle(S), L = k.width, O = k.height, N = k.position, F = S.style.left, I = S.style.top, T = S.style.right, P = S.style.bottom, z = S.style.overflow, _ = re(re({}, a[r]), o), A = x.createElement("div");
  7974. (g = S.parentElement) === null || g === void 0 || g.appendChild(A), A.style.left = "".concat(S.offsetLeft, "px"), A.style.top = "".concat(S.offsetTop, "px"), A.style.position = N, A.style.height = "".concat(S.offsetHeight, "px"), A.style.width = "".concat(S.offsetWidth, "px"), S.style.left = "0", S.style.top = "0", S.style.right = "auto", S.style.bottom = "auto", S.style.overflow = "hidden";
  7975. var H;
  7976. if (Array.isArray(n))
  7977. H = {
  7978. x: n[0],
  7979. y: n[1],
  7980. width: 0,
  7981. height: 0
  7982. };
  7983. else {
  7984. var $, U, G = n.getBoundingClientRect();
  7985. G.x = ($ = G.x) !== null && $ !== void 0 ? $ : G.left, G.y = (U = G.y) !== null && U !== void 0 ? U : G.top, H = {
  7986. x: G.x,
  7987. y: G.y,
  7988. width: G.width,
  7989. height: G.height
  7990. };
  7991. }
  7992. var B = S.getBoundingClientRect();
  7993. B.x = (y = B.x) !== null && y !== void 0 ? y : B.left, B.y = (w = B.y) !== null && w !== void 0 ? w : B.top;
  7994. var ne = x.documentElement, le = ne.clientWidth, ee = ne.clientHeight, V = ne.scrollWidth, X = ne.scrollHeight, J = ne.scrollTop, M = ne.scrollLeft, D = B.height, j = B.width, W = H.height, K = H.width, Y = {
  7995. left: 0,
  7996. top: 0,
  7997. right: le,
  7998. bottom: ee
  7999. }, te = {
  8000. left: -M,
  8001. top: -J,
  8002. right: V - M,
  8003. bottom: X - J
  8004. }, Q = _.htmlRegion, ae = "visible", ue = "visibleFirst";
  8005. Q !== "scroll" && Q !== ue && (Q = ae);
  8006. var se = Q === ue, pe = as(te, C), oe = as(Y, C), ve = Q === ae ? oe : pe, ze = se ? oe : ve;
  8007. S.style.left = "auto", S.style.top = "auto", S.style.right = "0", S.style.bottom = "0";
  8008. var Re = S.getBoundingClientRect();
  8009. S.style.left = F, S.style.top = I, S.style.right = T, S.style.bottom = P, S.style.overflow = z, (E = S.parentElement) === null || E === void 0 || E.removeChild(A);
  8010. var Be = _a(Math.round(j / parseFloat(L) * 1e3) / 1e3), je = _a(Math.round(D / parseFloat(O) * 1e3) / 1e3);
  8011. if (Be === 0 || je === 0 || Ia(n) && !_u(n))
  8012. return;
  8013. var He = _.offset, Ye = _.targetOffset, nt = is(B, He), Ge = Z(nt, 2), Ne = Ge[0], ce = Ge[1], he = is(H, Ye), Ve = Z(he, 2), de = Ve[0], be = Ve[1];
  8014. H.x -= de, H.y -= be;
  8015. var Xe = _.points || [], it = Z(Xe, 2), tt = it[0], $e = it[1], ge = us($e), ke = us(tt), Te = Ir(H, ge), Ke = Ir(B, ke), De = re({}, _), we = Te.x - Ke.x + Ne, ye = Te.y - Ke.y + ce, ut = bn(we, ye), yt = bn(we, ye, oe), Ie = Ir(H, ["t", "l"]), Oe = Ir(B, ["t", "l"]), We = Ir(H, ["b", "r"]), Ue = Ir(B, ["b", "r"]), Ze = _.overflow || {}, at = Ze.adjustX, Lt = Ze.adjustY, Et = Ze.shiftX, wt = Ze.shiftY, pt = function(Wn) {
  8016. return typeof Wn == "boolean" ? Wn : Wn >= 0;
  8017. }, xt, Ft, Mt, Qt;
  8018. Va();
  8019. var Le = pt(Lt), Pe = ke[0] === ge[0];
  8020. if (Le && ke[0] === "t" && (Ft > ze.bottom || p.current.bt)) {
  8021. var qe = ye;
  8022. Pe ? qe -= D - W : qe = Ie.y - Ue.y - ce;
  8023. var vt = bn(we, qe), ht = bn(we, qe, oe);
  8024. // Of course use larger one
  8025. vt > ut || vt === ut && (!se || // Choose recommend one
  8026. ht >= yt) ? (p.current.bt = !0, ye = qe, ce = -ce, De.points = [Xn(ke, 0), Xn(ge, 0)]) : p.current.bt = !1;
  8027. }
  8028. if (Le && ke[0] === "b" && (xt < ze.top || p.current.tb)) {
  8029. var Dt = ye;
  8030. Pe ? Dt += D - W : Dt = We.y - Oe.y - ce;
  8031. var Nt = bn(we, Dt), an = bn(we, Dt, oe);
  8032. // Of course use larger one
  8033. Nt > ut || Nt === ut && (!se || // Choose recommend one
  8034. an >= yt) ? (p.current.tb = !0, ye = Dt, ce = -ce, De.points = [Xn(ke, 0), Xn(ge, 0)]) : p.current.tb = !1;
  8035. }
  8036. var vn = pt(at), on = ke[1] === ge[1];
  8037. if (vn && ke[1] === "l" && (Qt > ze.right || p.current.rl)) {
  8038. var Wt = we;
  8039. on ? Wt -= j - K : Wt = Ie.x - Ue.x - Ne;
  8040. var mn = bn(Wt, ye), Jt = bn(Wt, ye, oe);
  8041. // Of course use larger one
  8042. mn > ut || mn === ut && (!se || // Choose recommend one
  8043. Jt >= yt) ? (p.current.rl = !0, we = Wt, Ne = -Ne, De.points = [Xn(ke, 1), Xn(ge, 1)]) : p.current.rl = !1;
  8044. }
  8045. if (vn && ke[1] === "r" && (Mt < ze.left || p.current.lr)) {
  8046. var en = we;
  8047. on ? en += j - K : en = We.x - Oe.x - Ne;
  8048. var On = bn(en, ye), wn = bn(en, ye, oe);
  8049. // Of course use larger one
  8050. On > ut || On === ut && (!se || // Choose recommend one
  8051. wn >= yt) ? (p.current.lr = !0, we = en, Ne = -Ne, De.points = [Xn(ke, 1), Xn(ge, 1)]) : p.current.lr = !1;
  8052. }
  8053. Va();
  8054. var Bt = Et === !0 ? 0 : Et;
  8055. typeof Bt == "number" && (Mt < oe.left && (we -= Mt - oe.left - Ne, H.x + K < oe.left + Bt && (we += H.x - oe.left + K - Bt)), Qt > oe.right && (we -= Qt - oe.right - Ne, H.x > oe.right - Bt && (we += H.x - oe.right + Bt)));
  8056. var Ut = wt === !0 ? 0 : wt;
  8057. typeof Ut == "number" && (xt < oe.top && (ye -= xt - oe.top - ce, H.y + W < oe.top + Ut && (ye += H.y - oe.top + W - Ut)), Ft > oe.bottom && (ye -= Ft - oe.bottom - ce, H.y > oe.bottom - Ut && (ye += H.y - oe.bottom + Ut)));
  8058. var pn = B.x + we, hn = pn + j, qt = B.y + ye, xn = qt + D, Fe = H.x, Ee = Fe + K, Je = H.y, ct = Je + W, Se = Math.max(pn, Fe), Me = Math.min(hn, Ee), gt = (Se + Me) / 2, Rt = gt - pn, Kt = Math.max(qt, Je), rn = Math.min(xn, ct), Yt = (Kt + rn) / 2, gn = Yt - qt;
  8059. i == null || i(t, De);
  8060. var yn = Re.right - B.x - (we + B.width), _n = Re.bottom - B.y - (ye + B.height);
  8061. Be === 1 && (we = Math.round(we), yn = Math.round(yn)), je === 1 && (ye = Math.round(ye), _n = Math.round(_n));
  8062. var ti = {
  8063. ready: !0,
  8064. offsetX: we / Be,
  8065. offsetY: ye / je,
  8066. offsetR: yn / Be,
  8067. offsetB: _n / je,
  8068. arrowX: Rt / Be,
  8069. arrowY: gn / je,
  8070. scaleX: Be,
  8071. scaleY: je,
  8072. align: De
  8073. };
  8074. s(ti);
  8075. }
  8076. }), f = function() {
  8077. v.current += 1;
  8078. var y = v.current;
  8079. Promise.resolve().then(function() {
  8080. v.current === y && b();
  8081. });
  8082. }, h = function() {
  8083. s(function(y) {
  8084. return re(re({}, y), {}, {
  8085. ready: !1
  8086. });
  8087. });
  8088. };
  8089. return St(h, [r]), St(function() {
  8090. e || h();
  8091. }, [e]), [c.ready, c.offsetX, c.offsetY, c.offsetR, c.offsetB, c.arrowX, c.arrowY, c.scaleX, c.scaleY, c.align, f];
  8092. }
  8093. function S0(e, t, n, r, a) {
  8094. St(function() {
  8095. if (e && t && n) {
  8096. let v = function() {
  8097. r(), a();
  8098. };
  8099. var o = t, i = n, u = Ji(o), l = Ji(i), c = ja(i), s = new Set([c].concat(ft(u), ft(l)));
  8100. return s.forEach(function(C) {
  8101. C.addEventListener("scroll", v, {
  8102. passive: !0
  8103. });
  8104. }), c.addEventListener("resize", v, {
  8105. passive: !0
  8106. }), r(), function() {
  8107. s.forEach(function(C) {
  8108. C.removeEventListener("scroll", v), c.removeEventListener("resize", v);
  8109. });
  8110. };
  8111. }
  8112. }, [e, t, n]);
  8113. }
  8114. function w0(e, t, n, r, a, o, i, u) {
  8115. var l = d.useRef(e);
  8116. l.current = e;
  8117. var c = d.useRef(!1);
  8118. d.useEffect(function() {
  8119. if (t && r && (!a || o)) {
  8120. var v = function() {
  8121. c.current = !1;
  8122. }, C = function(f) {
  8123. var h;
  8124. l.current && !i(((h = f.composedPath) === null || h === void 0 || (h = h.call(f)) === null || h === void 0 ? void 0 : h[0]) || f.target) && !c.current && u(!1);
  8125. }, p = ja(r);
  8126. p.addEventListener("pointerdown", v, !0), p.addEventListener("mousedown", C, !0), p.addEventListener("contextmenu", C, !0);
  8127. var m = Ki(n);
  8128. return m && (m.addEventListener("mousedown", C, !0), m.addEventListener("contextmenu", C, !0)), function() {
  8129. p.removeEventListener("pointerdown", v, !0), p.removeEventListener("mousedown", C, !0), p.removeEventListener("contextmenu", C, !0), m && (m.removeEventListener("mousedown", C, !0), m.removeEventListener("contextmenu", C, !0));
  8130. };
  8131. }
  8132. }, [t, n, r, a, o]);
  8133. function s() {
  8134. c.current = !0;
  8135. }
  8136. return s;
  8137. }
  8138. var x0 = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
  8139. function E0() {
  8140. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : xu, t = /* @__PURE__ */ d.forwardRef(function(n, r) {
  8141. var a = n.prefixCls, o = a === void 0 ? "rc-trigger-popup" : a, i = n.children, u = n.action, l = u === void 0 ? "hover" : u, c = n.showAction, s = n.hideAction, v = n.popupVisible, C = n.defaultPopupVisible, p = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, b = n.mouseEnterDelay, f = n.mouseLeaveDelay, h = f === void 0 ? 0.1 : f, g = n.focusDelay, y = n.blurDelay, w = n.mask, E = n.maskClosable, S = E === void 0 ? !0 : E, x = n.getPopupContainer, R = n.forceRender, k = n.autoDestroy, L = n.destroyPopupOnHide, O = n.popup, N = n.popupClassName, F = n.popupStyle, I = n.popupPlacement, T = n.builtinPlacements, P = T === void 0 ? {} : T, z = n.popupAlign, _ = n.zIndex, A = n.stretch, H = n.getPopupClassNameFromAlign, $ = n.fresh, U = n.alignPoint, G = n.onPopupClick, B = n.onPopupAlign, ne = n.arrow, le = n.popupMotion, ee = n.maskMotion, V = n.popupTransitionName, X = n.popupAnimation, J = n.maskTransitionName, M = n.maskAnimation, D = n.className, j = n.getTriggerDOMNode, W = mt(n, x0), K = k || L || !1, Y = d.useState(!1), te = Z(Y, 2), Q = te[0], ae = te[1];
  8142. St(function() {
  8143. ae(Du());
  8144. }, []);
  8145. var ue = d.useRef({}), se = d.useContext(ts), pe = d.useMemo(function() {
  8146. return {
  8147. registerSubPopup: function(Qe, kt) {
  8148. ue.current[Qe] = kt, se == null || se.registerSubPopup(Qe, kt);
  8149. }
  8150. };
  8151. }, [se]), oe = rd(), ve = d.useState(null), ze = Z(ve, 2), Re = ze[0], Be = ze[1], je = d.useRef(null), He = Ct(function(Ae) {
  8152. je.current = Ae, Ia(Ae) && Re !== Ae && Be(Ae), se == null || se.registerSubPopup(oe, Ae);
  8153. }), Ye = d.useState(null), nt = Z(Ye, 2), Ge = nt[0], Ne = nt[1], ce = d.useRef(null), he = Ct(function(Ae) {
  8154. Ia(Ae) && Ge !== Ae && (Ne(Ae), ce.current = Ae);
  8155. }), Ve = d.Children.only(i), de = (Ve == null ? void 0 : Ve.props) || {}, be = {}, Xe = Ct(function(Ae) {
  8156. var Qe, kt, zt = Ge;
  8157. return (zt == null ? void 0 : zt.contains(Ae)) || ((Qe = Ki(zt)) === null || Qe === void 0 ? void 0 : Qe.host) === Ae || Ae === zt || (Re == null ? void 0 : Re.contains(Ae)) || ((kt = Ki(Re)) === null || kt === void 0 ? void 0 : kt.host) === Ae || Ae === Re || Object.values(ue.current).some(function(It) {
  8158. return (It == null ? void 0 : It.contains(Ae)) || Ae === It;
  8159. });
  8160. }), it = rs(o, le, X, V), tt = rs(o, ee, M, J), $e = d.useState(C || !1), ge = Z($e, 2), ke = ge[0], Te = ge[1], Ke = v != null ? v : ke, De = Ct(function(Ae) {
  8161. v === void 0 && Te(Ae);
  8162. });
  8163. St(function() {
  8164. Te(v || !1);
  8165. }, [v]);
  8166. var we = d.useRef(Ke);
  8167. we.current = Ke;
  8168. var ye = d.useRef([]);
  8169. ye.current = [];
  8170. var ut = Ct(function(Ae) {
  8171. var Qe;
  8172. De(Ae), ((Qe = ye.current[ye.current.length - 1]) !== null && Qe !== void 0 ? Qe : Ke) !== Ae && (ye.current.push(Ae), p == null || p(Ae));
  8173. }), yt = d.useRef(), Ie = function() {
  8174. clearTimeout(yt.current);
  8175. }, Oe = function(Qe) {
  8176. var kt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  8177. Ie(), kt === 0 ? ut(Qe) : yt.current = setTimeout(function() {
  8178. ut(Qe);
  8179. }, kt * 1e3);
  8180. };
  8181. d.useEffect(function() {
  8182. return Ie;
  8183. }, []);
  8184. var We = d.useState(!1), Ue = Z(We, 2), Ze = Ue[0], at = Ue[1];
  8185. St(function(Ae) {
  8186. (!Ae || Ke) && at(!0);
  8187. }, [Ke]);
  8188. var Lt = d.useState(null), Et = Z(Lt, 2), wt = Et[0], pt = Et[1], xt = d.useState(null), Ft = Z(xt, 2), Mt = Ft[0], Qt = Ft[1], Le = function(Qe) {
  8189. Qt([Qe.clientX, Qe.clientY]);
  8190. }, Pe = C0(Ke, Re, U && Mt !== null ? Mt : Ge, I, P, z, B), qe = Z(Pe, 11), vt = qe[0], ht = qe[1], Dt = qe[2], Nt = qe[3], an = qe[4], vn = qe[5], on = qe[6], Wt = qe[7], mn = qe[8], Jt = qe[9], en = qe[10], On = g0(Q, l, c, s), wn = Z(On, 2), Bt = wn[0], Ut = wn[1], pn = Bt.has("click"), hn = Ut.has("click") || Ut.has("contextMenu"), qt = Ct(function() {
  8191. Ze || en();
  8192. }), xn = function() {
  8193. we.current && U && hn && Oe(!1);
  8194. };
  8195. S0(Ke, Ge, Re, qt, xn), St(function() {
  8196. qt();
  8197. }, [Mt, I]), St(function() {
  8198. Ke && !(P != null && P[I]) && qt();
  8199. }, [JSON.stringify(z)]);
  8200. var Fe = d.useMemo(function() {
  8201. var Ae = b0(P, o, Jt, U);
  8202. return xe(Ae, H == null ? void 0 : H(Jt));
  8203. }, [Jt, H, P, o, U]);
  8204. d.useImperativeHandle(r, function() {
  8205. return {
  8206. nativeElement: ce.current,
  8207. popupElement: je.current,
  8208. forceAlign: qt
  8209. };
  8210. });
  8211. var Ee = d.useState(0), Je = Z(Ee, 2), ct = Je[0], Se = Je[1], Me = d.useState(0), gt = Z(Me, 2), Rt = gt[0], Kt = gt[1], rn = function() {
  8212. if (A && Ge) {
  8213. var Qe = Ge.getBoundingClientRect();
  8214. Se(Qe.width), Kt(Qe.height);
  8215. }
  8216. }, Yt = function() {
  8217. rn(), qt();
  8218. }, gn = function(Qe) {
  8219. at(!1), en(), m == null || m(Qe);
  8220. }, yn = function() {
  8221. return new Promise(function(Qe) {
  8222. rn(), pt(function() {
  8223. return Qe;
  8224. });
  8225. });
  8226. };
  8227. St(function() {
  8228. wt && (en(), wt(), pt(null));
  8229. }, [wt]);
  8230. function _n(Ae, Qe, kt, zt) {
  8231. be[Ae] = function(It) {
  8232. var Ba;
  8233. zt == null || zt(It), Oe(Qe, kt);
  8234. for (var oi = arguments.length, nl = new Array(oi > 1 ? oi - 1 : 0), Ua = 1; Ua < oi; Ua++)
  8235. nl[Ua - 1] = arguments[Ua];
  8236. (Ba = de[Ae]) === null || Ba === void 0 || Ba.call.apply(Ba, [de, It].concat(nl));
  8237. };
  8238. }
  8239. (pn || hn) && (be.onClick = function(Ae) {
  8240. var Qe;
  8241. we.current && hn ? Oe(!1) : !we.current && pn && (Le(Ae), Oe(!0));
  8242. for (var kt = arguments.length, zt = new Array(kt > 1 ? kt - 1 : 0), It = 1; It < kt; It++)
  8243. zt[It - 1] = arguments[It];
  8244. (Qe = de.onClick) === null || Qe === void 0 || Qe.call.apply(Qe, [de, Ae].concat(zt));
  8245. });
  8246. var ti = w0(Ke, hn, Ge, Re, w, S, Xe, Oe), bn = Bt.has("hover"), Va = Ut.has("hover"), kr, Wn;
  8247. bn && (_n("onMouseEnter", !0, b, function(Ae) {
  8248. Le(Ae);
  8249. }), _n("onPointerEnter", !0, b, function(Ae) {
  8250. Le(Ae);
  8251. }), kr = function(Qe) {
  8252. (Ke || Ze) && Re !== null && Re !== void 0 && Re.contains(Qe.target) && Oe(!0, b);
  8253. }, U && (be.onMouseMove = function(Ae) {
  8254. var Qe;
  8255. (Qe = de.onMouseMove) === null || Qe === void 0 || Qe.call(de, Ae);
  8256. })), Va && (_n("onMouseLeave", !1, h), _n("onPointerLeave", !1, h), Wn = function() {
  8257. Oe(!1, h);
  8258. }), Bt.has("focus") && _n("onFocus", !0, g), Ut.has("focus") && _n("onBlur", !1, y), Bt.has("contextMenu") && (be.onContextMenu = function(Ae) {
  8259. var Qe;
  8260. we.current && Ut.has("contextMenu") ? Oe(!1) : (Le(Ae), Oe(!0)), Ae.preventDefault();
  8261. for (var kt = arguments.length, zt = new Array(kt > 1 ? kt - 1 : 0), It = 1; It < kt; It++)
  8262. zt[It - 1] = arguments[It];
  8263. (Qe = de.onContextMenu) === null || Qe === void 0 || Qe.call.apply(Qe, [de, Ae].concat(zt));
  8264. }), D && (be.className = xe(de.className, D));
  8265. var Bn = re(re({}, de), be), ea = {}, Wa = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
  8266. Wa.forEach(function(Ae) {
  8267. W[Ae] && (ea[Ae] = function() {
  8268. for (var Qe, kt = arguments.length, zt = new Array(kt), It = 0; It < kt; It++)
  8269. zt[It] = arguments[It];
  8270. (Qe = Bn[Ae]) === null || Qe === void 0 || Qe.call.apply(Qe, [Bn].concat(zt)), W[Ae].apply(W, zt);
  8271. });
  8272. });
  8273. var ni = /* @__PURE__ */ d.cloneElement(Ve, re(re({}, Bn), ea)), ri = {
  8274. x: vn,
  8275. y: on
  8276. }, ai = ne ? re({}, ne !== !0 ? ne : {}) : null;
  8277. return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(cr, {
  8278. disabled: !Ke,
  8279. ref: he,
  8280. onResize: Yt
  8281. }, /* @__PURE__ */ d.createElement(h0, {
  8282. getTriggerDOMNode: j
  8283. }, ni)), /* @__PURE__ */ d.createElement(ts.Provider, {
  8284. value: pe
  8285. }, /* @__PURE__ */ d.createElement(p0, {
  8286. portal: e,
  8287. ref: He,
  8288. prefixCls: o,
  8289. popup: O,
  8290. className: xe(N, Fe),
  8291. style: F,
  8292. target: Ge,
  8293. onMouseEnter: kr,
  8294. onMouseLeave: Wn,
  8295. onPointerEnter: kr,
  8296. zIndex: _,
  8297. open: Ke,
  8298. keepDom: Ze,
  8299. fresh: $,
  8300. onClick: G,
  8301. onPointerDownCapture: ti,
  8302. mask: w,
  8303. motion: it,
  8304. maskMotion: tt,
  8305. onVisibleChanged: gn,
  8306. onPrepare: yn,
  8307. forceRender: R,
  8308. autoDestroy: K,
  8309. getPopupContainer: x,
  8310. align: Jt,
  8311. arrow: ai,
  8312. arrowPos: ri,
  8313. ready: vt,
  8314. offsetX: ht,
  8315. offsetY: Dt,
  8316. offsetR: Nt,
  8317. offsetB: an,
  8318. onAlign: qt,
  8319. stretch: A,
  8320. targetWidth: ct / Wt,
  8321. targetHeight: Rt / mn
  8322. })));
  8323. });
  8324. return t;
  8325. }
  8326. const Uo = E0(xu);
  8327. function Lu(e, t) {
  8328. return e !== void 0 ? e : t ? "bottomRight" : "bottomLeft";
  8329. }
  8330. function R0(e, t) {
  8331. var n = Lu(e, t), r = n == null ? void 0 : n.toLowerCase().endsWith("right"), a = r ? "insetInlineEnd" : "insetInlineStart";
  8332. return t && (a = ["insetInlineStart", "insetInlineEnd"].find(function(o) {
  8333. return o !== a;
  8334. })), a;
  8335. }
  8336. var Hn = /* @__PURE__ */ d.createContext(null), P0 = {
  8337. bottomLeft: {
  8338. points: ["tl", "bl"],
  8339. offset: [0, 4],
  8340. overflow: {
  8341. adjustX: 1,
  8342. adjustY: 1
  8343. }
  8344. },
  8345. bottomRight: {
  8346. points: ["tr", "br"],
  8347. offset: [0, 4],
  8348. overflow: {
  8349. adjustX: 1,
  8350. adjustY: 1
  8351. }
  8352. },
  8353. topLeft: {
  8354. points: ["bl", "tl"],
  8355. offset: [0, -4],
  8356. overflow: {
  8357. adjustX: 0,
  8358. adjustY: 1
  8359. }
  8360. },
  8361. topRight: {
  8362. points: ["br", "tr"],
  8363. offset: [0, -4],
  8364. overflow: {
  8365. adjustX: 0,
  8366. adjustY: 1
  8367. }
  8368. }
  8369. };
  8370. function M0(e) {
  8371. var t = e.popupElement, n = e.popupStyle, r = e.popupClassName, a = e.popupAlign, o = e.transitionName, i = e.getPopupContainer, u = e.children, l = e.range, c = e.placement, s = e.builtinPlacements, v = s === void 0 ? P0 : s, C = e.direction, p = e.visible, m = e.onClose, b = d.useContext(Hn), f = b.prefixCls, h = "".concat(f, "-dropdown"), g = Lu(c, C === "rtl");
  8372. return /* @__PURE__ */ d.createElement(Uo, {
  8373. showAction: [],
  8374. hideAction: ["click"],
  8375. popupPlacement: g,
  8376. builtinPlacements: v,
  8377. prefixCls: h,
  8378. popupTransitionName: o,
  8379. popup: t,
  8380. popupAlign: a,
  8381. popupVisible: p,
  8382. popupClassName: xe(r, ie(ie({}, "".concat(h, "-range"), l), "".concat(h, "-rtl"), C === "rtl")),
  8383. popupStyle: n,
  8384. stretch: "minWidth",
  8385. getPopupContainer: i,
  8386. onPopupVisibleChange: function(w) {
  8387. w || m();
  8388. }
  8389. }, u);
  8390. }
  8391. function Tu(e, t) {
  8392. for (var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0", r = String(e); r.length < t; )
  8393. r = "".concat(n).concat(r);
  8394. return r;
  8395. }
  8396. function Xr(e) {
  8397. return e == null ? [] : Array.isArray(e) ? e : [e];
  8398. }
  8399. function Xd(e, t, n) {
  8400. var r = ft(e);
  8401. return r[t] = n, r;
  8402. }
  8403. function qo(e, t) {
  8404. var n = {}, r = t || Object.keys(e);
  8405. return r.forEach(function(a) {
  8406. e[a] !== void 0 && (n[a] = e[a]);
  8407. }), n;
  8408. }
  8409. function Zd(e, t, n) {
  8410. if (n)
  8411. return n;
  8412. switch (e) {
  8413. // All from the `locale.fieldXXXFormat` first
  8414. case "time":
  8415. return t.fieldTimeFormat;
  8416. case "datetime":
  8417. return t.fieldDateTimeFormat;
  8418. case "month":
  8419. return t.fieldMonthFormat;
  8420. case "year":
  8421. return t.fieldYearFormat;
  8422. case "quarter":
  8423. return t.fieldQuarterFormat;
  8424. case "week":
  8425. return t.fieldWeekFormat;
  8426. default:
  8427. return t.fieldDateFormat;
  8428. }
  8429. }
  8430. function k0(e) {
  8431. return qo(e, ["placement", "builtinPlacements", "popupAlign", "getPopupContainer", "transitionName", "direction"]);
  8432. }
  8433. function Qd(e, t, n, r) {
  8434. var a = d.useMemo(function() {
  8435. return e || function(i, u) {
  8436. var l = i;
  8437. return t && u.type === "date" ? t(l, u.today) : n && u.type === "month" ? n(l, u.locale) : u.originNode;
  8438. };
  8439. }, [e, n, t]), o = d.useCallback(function(i, u) {
  8440. return a(i, re(re({}, u), {}, {
  8441. range: r
  8442. }));
  8443. }, [a, r]);
  8444. return o;
  8445. }
  8446. function D0(e, t) {
  8447. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], r = d.useState([!1, !1]), a = Z(r, 2), o = a[0], i = a[1], u = function(s, v) {
  8448. i(function(C) {
  8449. return Xd(C, v, s);
  8450. });
  8451. }, l = d.useMemo(function() {
  8452. return o.map(function(c, s) {
  8453. if (c)
  8454. return !0;
  8455. var v = e[s];
  8456. return v ? !!(!n[s] && !v || v && t(v, {
  8457. activeIndex: s
  8458. })) : !1;
  8459. });
  8460. }, [e, o, t, n]);
  8461. return [l, u];
  8462. }
  8463. function Jd(e, t, n, r, a) {
  8464. var o = "", i = [];
  8465. return e && i.push(a ? "hh" : "HH"), t && i.push("mm"), n && i.push("ss"), o = i.join(":"), r && (o += ".SSS"), a && (o += " A"), o;
  8466. }
  8467. function N0(e, t, n, r, a, o) {
  8468. var i = e.fieldDateTimeFormat, u = e.fieldDateFormat, l = e.fieldTimeFormat, c = e.fieldMonthFormat, s = e.fieldYearFormat, v = e.fieldWeekFormat, C = e.fieldQuarterFormat, p = e.yearFormat, m = e.cellYearFormat, b = e.cellQuarterFormat, f = e.dayFormat, h = e.cellDateFormat, g = Jd(t, n, r, a, o);
  8469. return re(re({}, e), {}, {
  8470. fieldDateTimeFormat: i || "YYYY-MM-DD ".concat(g),
  8471. fieldDateFormat: u || "YYYY-MM-DD",
  8472. fieldTimeFormat: l || g,
  8473. fieldMonthFormat: c || "YYYY-MM",
  8474. fieldYearFormat: s || "YYYY",
  8475. fieldWeekFormat: v || "gggg-wo",
  8476. fieldQuarterFormat: C || "YYYY-[Q]Q",
  8477. yearFormat: p || "YYYY",
  8478. cellYearFormat: m || "YYYY",
  8479. cellQuarterFormat: b || "[Q]Q",
  8480. cellDateFormat: h || f || "D"
  8481. });
  8482. }
  8483. function ef(e, t) {
  8484. var n = t.showHour, r = t.showMinute, a = t.showSecond, o = t.showMillisecond, i = t.use12Hours;
  8485. return me.useMemo(function() {
  8486. return N0(e, n, r, a, o, i);
  8487. }, [e, n, r, a, o, i]);
  8488. }
  8489. function la(e, t, n) {
  8490. return n != null ? n : t.some(function(r) {
  8491. return e.includes(r);
  8492. });
  8493. }
  8494. var I0 = [
  8495. // 'format',
  8496. "showNow",
  8497. "showHour",
  8498. "showMinute",
  8499. "showSecond",
  8500. "showMillisecond",
  8501. "use12Hours",
  8502. "hourStep",
  8503. "minuteStep",
  8504. "secondStep",
  8505. "millisecondStep",
  8506. "hideDisabledOptions",
  8507. "defaultValue",
  8508. "disabledHours",
  8509. "disabledMinutes",
  8510. "disabledSeconds",
  8511. "disabledMilliseconds",
  8512. "disabledTime",
  8513. "changeOnScroll",
  8514. "defaultOpenValue"
  8515. ];
  8516. function O0(e) {
  8517. var t = qo(e, I0), n = e.format, r = e.picker, a = null;
  8518. return n && (a = n, Array.isArray(a) && (a = a[0]), a = _t(a) === "object" ? a.format : a), r === "time" && (t.format = a), [t, a];
  8519. }
  8520. function _0(e) {
  8521. return e && typeof e == "string";
  8522. }
  8523. function tf(e, t, n, r) {
  8524. return [e, t, n, r].some(function(a) {
  8525. return a !== void 0;
  8526. });
  8527. }
  8528. function nf(e, t, n, r, a) {
  8529. var o = t, i = n, u = r;
  8530. if (!e && !o && !i && !u && !a)
  8531. o = !0, i = !0, u = !0;
  8532. else if (e) {
  8533. var l, c, s, v = [o, i, u].some(function(m) {
  8534. return m === !1;
  8535. }), C = [o, i, u].some(function(m) {
  8536. return m === !0;
  8537. }), p = v ? !0 : !C;
  8538. o = (l = o) !== null && l !== void 0 ? l : p, i = (c = i) !== null && c !== void 0 ? c : p, u = (s = u) !== null && s !== void 0 ? s : p;
  8539. }
  8540. return [o, i, u, a];
  8541. }
  8542. function rf(e) {
  8543. var t = e.showTime, n = O0(e), r = Z(n, 2), a = r[0], o = r[1], i = t && _t(t) === "object" ? t : {}, u = re(re({
  8544. defaultOpenValue: i.defaultOpenValue || i.defaultValue
  8545. }, a), i), l = u.showMillisecond, c = u.showHour, s = u.showMinute, v = u.showSecond, C = tf(c, s, v, l), p = nf(C, c, s, v, l), m = Z(p, 3);
  8546. return c = m[0], s = m[1], v = m[2], [u, re(re({}, u), {}, {
  8547. showHour: c,
  8548. showMinute: s,
  8549. showSecond: v,
  8550. showMillisecond: l
  8551. }), u.format, o];
  8552. }
  8553. function af(e, t, n, r, a) {
  8554. var o = e === "time";
  8555. if (e === "datetime" || o) {
  8556. for (var i = r, u = Zd(e, a, null), l = u, c = [t, n], s = 0; s < c.length; s += 1) {
  8557. var v = Xr(c[s])[0];
  8558. if (_0(v)) {
  8559. l = v;
  8560. break;
  8561. }
  8562. }
  8563. var C = i.showHour, p = i.showMinute, m = i.showSecond, b = i.showMillisecond, f = i.use12Hours, h = la(l, ["a", "A", "LT", "LLL", "LTS"], f), g = tf(C, p, m, b);
  8564. g || (C = la(l, ["H", "h", "k", "LT", "LLL"]), p = la(l, ["m", "LT", "LLL"]), m = la(l, ["s", "LTS"]), b = la(l, ["SSS"]));
  8565. var y = nf(g, C, p, m, b), w = Z(y, 3);
  8566. C = w[0], p = w[1], m = w[2];
  8567. var E = t || Jd(C, p, m, b, h);
  8568. return re(re({}, i), {}, {
  8569. // Format
  8570. format: E,
  8571. // Show Config
  8572. showHour: C,
  8573. showMinute: p,
  8574. showSecond: m,
  8575. showMillisecond: b,
  8576. use12Hours: h
  8577. });
  8578. }
  8579. return null;
  8580. }
  8581. function L0(e, t, n) {
  8582. if (t === !1)
  8583. return null;
  8584. var r = t && _t(t) === "object" ? t : {};
  8585. return r.clearIcon || n || /* @__PURE__ */ d.createElement("span", {
  8586. className: "".concat(e, "-clear-btn")
  8587. });
  8588. }
  8589. var gi = 7;
  8590. function dr(e, t, n) {
  8591. return !e && !t || e === t ? !0 : !e || !t ? !1 : n();
  8592. }
  8593. function eu(e, t, n) {
  8594. return dr(t, n, function() {
  8595. var r = Math.floor(e.getYear(t) / 10), a = Math.floor(e.getYear(n) / 10);
  8596. return r === a;
  8597. });
  8598. }
  8599. function Sr(e, t, n) {
  8600. return dr(t, n, function() {
  8601. return e.getYear(t) === e.getYear(n);
  8602. });
  8603. }
  8604. function ls(e, t) {
  8605. var n = Math.floor(e.getMonth(t) / 3);
  8606. return n + 1;
  8607. }
  8608. function T0(e, t, n) {
  8609. return dr(t, n, function() {
  8610. return Sr(e, t, n) && ls(e, t) === ls(e, n);
  8611. });
  8612. }
  8613. function $u(e, t, n) {
  8614. return dr(t, n, function() {
  8615. return Sr(e, t, n) && e.getMonth(t) === e.getMonth(n);
  8616. });
  8617. }
  8618. function Au(e, t, n) {
  8619. return dr(t, n, function() {
  8620. return Sr(e, t, n) && $u(e, t, n) && e.getDate(t) === e.getDate(n);
  8621. });
  8622. }
  8623. function of(e, t, n) {
  8624. return dr(t, n, function() {
  8625. return e.getHour(t) === e.getHour(n) && e.getMinute(t) === e.getMinute(n) && e.getSecond(t) === e.getSecond(n);
  8626. });
  8627. }
  8628. function uf(e, t, n) {
  8629. return dr(t, n, function() {
  8630. return Au(e, t, n) && of(e, t, n) && e.getMillisecond(t) === e.getMillisecond(n);
  8631. });
  8632. }
  8633. function xa(e, t, n, r) {
  8634. return dr(n, r, function() {
  8635. var a = e.locale.getWeekFirstDate(t, n), o = e.locale.getWeekFirstDate(t, r);
  8636. return Sr(e, a, o) && e.locale.getWeek(t, n) === e.locale.getWeek(t, r);
  8637. });
  8638. }
  8639. function ln(e, t, n, r, a) {
  8640. switch (a) {
  8641. case "date":
  8642. return Au(e, n, r);
  8643. case "week":
  8644. return xa(e, t.locale, n, r);
  8645. case "month":
  8646. return $u(e, n, r);
  8647. case "quarter":
  8648. return T0(e, n, r);
  8649. case "year":
  8650. return Sr(e, n, r);
  8651. case "decade":
  8652. return eu(e, n, r);
  8653. case "time":
  8654. return of(e, n, r);
  8655. default:
  8656. return uf(e, n, r);
  8657. }
  8658. }
  8659. function Ko(e, t, n, r) {
  8660. return !t || !n || !r ? !1 : e.isAfter(r, t) && e.isAfter(n, r);
  8661. }
  8662. function ro(e, t, n, r, a) {
  8663. return ln(e, t, n, r, a) ? !0 : e.isAfter(n, r);
  8664. }
  8665. function $0(e, t, n) {
  8666. var r = t.locale.getWeekFirstDay(e), a = t.setDate(n, 1), o = t.getWeekDay(a), i = t.addDate(a, r - o);
  8667. return t.getMonth(i) === t.getMonth(n) && t.getDate(i) > 1 && (i = t.addDate(i, -7)), i;
  8668. }
  8669. function Vt(e, t) {
  8670. var n = t.generateConfig, r = t.locale, a = t.format;
  8671. return e ? typeof a == "function" ? a(e) : n.locale.format(r.locale, e, a) : "";
  8672. }
  8673. function Lo(e, t, n) {
  8674. var r = t, a = ["getHour", "getMinute", "getSecond", "getMillisecond"], o = ["setHour", "setMinute", "setSecond", "setMillisecond"];
  8675. return o.forEach(function(i, u) {
  8676. n ? r = e[i](r, e[a[u]](n)) : r = e[i](r, 0);
  8677. }), r;
  8678. }
  8679. function A0(e, t, n, r, a) {
  8680. var o = Ct(function(i, u) {
  8681. return !!(n && n(i, u) || r && e.isAfter(r, i) && !ln(e, t, r, i, u.type) || a && e.isAfter(i, a) && !ln(e, t, a, i, u.type));
  8682. });
  8683. return o;
  8684. }
  8685. function j0(e, t, n) {
  8686. return d.useMemo(function() {
  8687. var r = Zd(e, t, n), a = Xr(r), o = a[0], i = _t(o) === "object" && o.type === "mask" ? o.format : null;
  8688. return [
  8689. // Format list
  8690. a.map(function(u) {
  8691. return typeof u == "string" || typeof u == "function" ? u : u.format;
  8692. }),
  8693. // Mask Format
  8694. i
  8695. ];
  8696. }, [e, t, n]);
  8697. }
  8698. function F0(e, t, n) {
  8699. return typeof e[0] == "function" || n ? !0 : t;
  8700. }
  8701. function z0(e, t, n, r) {
  8702. var a = Ct(function(o, i) {
  8703. var u = re({
  8704. type: t
  8705. }, i);
  8706. if (delete u.activeIndex, // Date object is invalid
  8707. !e.isValidate(o) || // Date is disabled by `disabledDate`
  8708. n && n(o, u))
  8709. return !0;
  8710. if ((t === "date" || t === "time") && r) {
  8711. var l, c = i && i.activeIndex === 1 ? "end" : "start", s = ((l = r.disabledTime) === null || l === void 0 ? void 0 : l.call(r, o, c, {
  8712. from: u.from
  8713. })) || {}, v = s.disabledHours, C = s.disabledMinutes, p = s.disabledSeconds, m = s.disabledMilliseconds, b = r.disabledHours, f = r.disabledMinutes, h = r.disabledSeconds, g = v || b, y = C || f, w = p || h, E = e.getHour(o), S = e.getMinute(o), x = e.getSecond(o), R = e.getMillisecond(o);
  8714. if (g && g().includes(E) || y && y(E).includes(S) || w && w(E, S).includes(x) || m && m(E, S, x).includes(R))
  8715. return !0;
  8716. }
  8717. return !1;
  8718. });
  8719. return a;
  8720. }
  8721. function ao(e) {
  8722. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = d.useMemo(function() {
  8723. var r = e && Xr(e);
  8724. return t && r && (r[1] = r[1] || r[0]), r;
  8725. }, [e, t]);
  8726. return n;
  8727. }
  8728. function H0(e, t) {
  8729. var n = e.generateConfig, r = e.locale, a = e.picker, o = a === void 0 ? "date" : a, i = e.prefixCls, u = i === void 0 ? "rc-picker" : i, l = e.styles, c = l === void 0 ? {} : l, s = e.classNames, v = s === void 0 ? {} : s, C = e.order, p = C === void 0 ? !0 : C, m = e.components, b = m === void 0 ? {} : m, f = e.inputRender, h = e.allowClear, g = e.clearIcon, y = e.needConfirm, w = e.multiple, E = e.format, S = e.inputReadOnly, x = e.disabledDate, R = e.minDate, k = e.maxDate, L = e.showTime, O = e.value, N = e.defaultValue, F = e.pickerValue, I = e.defaultPickerValue, T = ao(O), P = ao(N), z = ao(F), _ = ao(I), A = o === "date" && L ? "datetime" : o, H = A === "time" || A === "datetime", $ = H || w, U = y != null ? y : H, G = rf(e), B = Z(G, 4), ne = B[0], le = B[1], ee = B[2], V = B[3], X = ef(r, le), J = d.useMemo(function() {
  8730. return af(A, ee, V, ne, X);
  8731. }, [A, ee, V, ne, X]), M = d.useMemo(function() {
  8732. return re(re({}, e), {}, {
  8733. prefixCls: u,
  8734. locale: X,
  8735. picker: o,
  8736. styles: c,
  8737. classNames: v,
  8738. order: p,
  8739. components: re({
  8740. input: f
  8741. }, b),
  8742. clearIcon: L0(u, h, g),
  8743. showTime: J,
  8744. value: T,
  8745. defaultValue: P,
  8746. pickerValue: z,
  8747. defaultPickerValue: _
  8748. }, void 0);
  8749. }, [e]), D = j0(A, X, E), j = Z(D, 2), W = j[0], K = j[1], Y = F0(W, S, w), te = A0(n, r, x, R, k), Q = z0(n, o, te, J), ae = d.useMemo(function() {
  8750. return re(re({}, M), {}, {
  8751. needConfirm: U,
  8752. inputReadOnly: Y,
  8753. disabledDate: te
  8754. });
  8755. }, [M, U, Y, te]);
  8756. return [ae, A, $, W, K, Q];
  8757. }
  8758. function V0(e, t, n) {
  8759. var r = Gt(t, {
  8760. value: e
  8761. }), a = Z(r, 2), o = a[0], i = a[1], u = me.useRef(e), l = me.useRef(), c = function() {
  8762. st.cancel(l.current);
  8763. }, s = Ct(function() {
  8764. i(u.current), n && o !== u.current && n(u.current);
  8765. }), v = Ct(function(C, p) {
  8766. c(), u.current = C, C || p ? s() : l.current = st(s);
  8767. });
  8768. return me.useEffect(function() {
  8769. return c;
  8770. }, []), [o, v];
  8771. }
  8772. function W0(e, t) {
  8773. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], r = arguments.length > 3 ? arguments[3] : void 0, a = n.every(function(s) {
  8774. return s;
  8775. }) ? !1 : e, o = V0(a, t || !1, r), i = Z(o, 2), u = i[0], l = i[1];
  8776. function c(s) {
  8777. var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  8778. (!v.inherit || u) && l(s, v.force);
  8779. }
  8780. return [u, c];
  8781. }
  8782. function B0(e) {
  8783. var t = d.useRef();
  8784. return d.useImperativeHandle(e, function() {
  8785. var n;
  8786. return {
  8787. nativeElement: (n = t.current) === null || n === void 0 ? void 0 : n.nativeElement,
  8788. focus: function(a) {
  8789. var o;
  8790. (o = t.current) === null || o === void 0 || o.focus(a);
  8791. },
  8792. blur: function() {
  8793. var a;
  8794. (a = t.current) === null || a === void 0 || a.blur();
  8795. }
  8796. };
  8797. }), t;
  8798. }
  8799. function U0(e, t) {
  8800. return d.useMemo(function() {
  8801. return e || [];
  8802. }, [e, t]);
  8803. }
  8804. function ju(e, t) {
  8805. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, r = d.useRef(t);
  8806. r.current = t, Wr(function() {
  8807. if (e)
  8808. r.current(e);
  8809. else {
  8810. var a = st(function() {
  8811. r.current(e);
  8812. }, n);
  8813. return function() {
  8814. st.cancel(a);
  8815. };
  8816. }
  8817. }, [e]);
  8818. }
  8819. function q0(e) {
  8820. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, r = d.useState(0), a = Z(r, 2), o = a[0], i = a[1], u = d.useState(!1), l = Z(u, 2), c = l[0], s = l[1], v = d.useRef([]), C = d.useRef(null), p = function(h) {
  8821. s(h);
  8822. }, m = function(h) {
  8823. return h && (C.current = h), C.current;
  8824. }, b = function(h) {
  8825. var g = v.current, y = new Set(g.filter(function(E) {
  8826. return h[E] || t[E];
  8827. })), w = g[g.length - 1] === 0 ? 1 : 0;
  8828. return y.size >= 2 || e[w] ? null : w;
  8829. };
  8830. return ju(c || n, function() {
  8831. c || (v.current = []);
  8832. }), d.useEffect(function() {
  8833. c && v.current.push(o);
  8834. }, [c, o]), [c, p, m, o, i, b, v.current];
  8835. }
  8836. function K0(e, t, n, r) {
  8837. switch (t) {
  8838. case "date":
  8839. case "week":
  8840. return e.addMonth(n, r);
  8841. case "month":
  8842. case "quarter":
  8843. return e.addYear(n, r);
  8844. case "year":
  8845. return e.addYear(n, r * 10);
  8846. case "decade":
  8847. return e.addYear(n, r * 100);
  8848. default:
  8849. return n;
  8850. }
  8851. }
  8852. var yi = [];
  8853. function Y0(e, t, n, r, a, o, i, u) {
  8854. var l = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : yi, c = arguments.length > 9 && arguments[9] !== void 0 ? arguments[9] : yi, s = arguments.length > 10 && arguments[10] !== void 0 ? arguments[10] : yi, v = arguments.length > 11 ? arguments[11] : void 0, C = arguments.length > 12 ? arguments[12] : void 0, p = arguments.length > 13 ? arguments[13] : void 0, m = i === "time", b = o || 0, f = function(z) {
  8855. var _ = e.getNow();
  8856. return m && (_ = Lo(e, _)), l[z] || n[z] || _;
  8857. }, h = Z(c, 2), g = h[0], y = h[1], w = Gt(function() {
  8858. return f(0);
  8859. }, {
  8860. value: g
  8861. }), E = Z(w, 2), S = E[0], x = E[1], R = Gt(function() {
  8862. return f(1);
  8863. }, {
  8864. value: y
  8865. }), k = Z(R, 2), L = k[0], O = k[1], N = d.useMemo(function() {
  8866. var P = [S, L][b];
  8867. return m ? P : Lo(e, P, s[b]);
  8868. }, [m, S, L, b, e, s]), F = function(z) {
  8869. var _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "panel", A = [x, O][b];
  8870. A(z);
  8871. var H = [S, L];
  8872. H[b] = z, v && (!ln(e, t, S, H[0], i) || !ln(e, t, L, H[1], i)) && v(H, {
  8873. source: _,
  8874. range: b === 1 ? "end" : "start",
  8875. mode: r
  8876. });
  8877. }, I = function(z, _) {
  8878. return _;
  8879. }, T = d.useRef(null);
  8880. return St(function() {
  8881. if (a && !l[b]) {
  8882. var P = m ? null : e.getNow();
  8883. if (T.current !== null && T.current !== b ? P = [S, L][b ^ 1] : n[b] ? P = b === 0 ? n[0] : I(n[0], n[1]) : n[b ^ 1] && (P = n[b ^ 1]), P) {
  8884. C && e.isAfter(C, P) && (P = C);
  8885. var z = P;
  8886. p && e.isAfter(z, p) && (P = p), F(P, "reset");
  8887. }
  8888. }
  8889. }, [a, b, n[b]]), d.useEffect(function() {
  8890. a ? T.current = b : T.current = null;
  8891. }, [a, b]), St(function() {
  8892. a && l && l[b] && F(l[b], "reset");
  8893. }, [a, b]), [N, F];
  8894. }
  8895. function lf(e, t) {
  8896. var n = d.useRef(e), r = d.useState({}), a = Z(r, 2), o = a[1], i = function(c) {
  8897. return c && t !== void 0 ? t : n.current;
  8898. }, u = function(c) {
  8899. n.current = c, o({});
  8900. };
  8901. return [i, u, i(!0)];
  8902. }
  8903. var G0 = [];
  8904. function sf(e, t, n) {
  8905. var r = function(i) {
  8906. return i.map(function(u) {
  8907. return Vt(u, {
  8908. generateConfig: e,
  8909. locale: t,
  8910. format: n[0]
  8911. });
  8912. });
  8913. }, a = function(i, u) {
  8914. for (var l = Math.max(i.length, u.length), c = -1, s = 0; s < l; s += 1) {
  8915. var v = i[s] || null, C = u[s] || null;
  8916. if (v !== C && !uf(e, v, C)) {
  8917. c = s;
  8918. break;
  8919. }
  8920. }
  8921. return [c < 0, c !== 0];
  8922. };
  8923. return [r, a];
  8924. }
  8925. function cf(e, t) {
  8926. return ft(e).sort(function(n, r) {
  8927. return t.isAfter(n, r) ? 1 : -1;
  8928. });
  8929. }
  8930. function X0(e) {
  8931. var t = lf(e), n = Z(t, 2), r = n[0], a = n[1], o = Ct(function() {
  8932. a(e);
  8933. });
  8934. return d.useEffect(function() {
  8935. o();
  8936. }, [e]), [r, a];
  8937. }
  8938. function Z0(e, t, n, r, a, o, i, u, l) {
  8939. var c = Gt(o, {
  8940. value: i
  8941. }), s = Z(c, 2), v = s[0], C = s[1], p = v || G0, m = X0(p), b = Z(m, 2), f = b[0], h = b[1], g = sf(e, t, n), y = Z(g, 2), w = y[0], E = y[1], S = Ct(function(R) {
  8942. var k = ft(R);
  8943. a && (k = cf(k.filter(function(T) {
  8944. return T;
  8945. }), e));
  8946. var L = E(f(), k), O = Z(L, 2), N = O[0], F = O[1];
  8947. if (!N) {
  8948. h(k);
  8949. {
  8950. var I = w(k);
  8951. u(k, I, {
  8952. range: F ? "end" : "start"
  8953. });
  8954. }
  8955. }
  8956. }), x = function() {
  8957. l(f());
  8958. };
  8959. return [p, C, f, S, x];
  8960. }
  8961. function Q0(e, t, n, r, a, o, i, u, l, c) {
  8962. var s = e.generateConfig, v = e.locale, C = e.picker, p = e.onChange, m = e.allowEmpty, b = e.order, f = o.some(function(I) {
  8963. return I;
  8964. }) ? !1 : b, h = sf(s, v, i), g = Z(h, 2), y = g[0], w = g[1], E = lf(t), S = Z(E, 2), x = S[0], R = S[1], k = Ct(function() {
  8965. R(t);
  8966. });
  8967. d.useEffect(function() {
  8968. k();
  8969. }, [t]);
  8970. var L = Ct(function(I) {
  8971. var T = I === null, P = ft(I || x());
  8972. if (T)
  8973. for (var z = Math.max(o.length, P.length), _ = 0; _ < z; _ += 1)
  8974. o[_] || (P[_] = null);
  8975. f && P[0] && P[1] && (P = cf(P, s)), a(P);
  8976. var A = P, H = Z(A, 2), $ = H[0], U = H[1], G = !$, B = !U, ne = m ? (
  8977. // Validate empty start
  8978. (!G || m[0]) && // Validate empty end
  8979. (!B || m[1])
  8980. ) : !0, le = !b || G || B || ln(s, v, $, U, C) || s.isAfter(U, $), ee = (
  8981. // Validate start
  8982. (o[0] || !$ || !c($, {
  8983. activeIndex: 0
  8984. })) && // Validate end
  8985. (o[1] || !U || !c(U, {
  8986. from: $,
  8987. activeIndex: 1
  8988. }))
  8989. ), V = (
  8990. // Null value is from clear button
  8991. T || // Normal check
  8992. ne && le && ee
  8993. );
  8994. if (V) {
  8995. n(P);
  8996. var X = w(P, t), J = Z(X, 1), M = J[0];
  8997. p && !M && p(
  8998. // Return null directly if all date are empty
  8999. T && P.every(function(D) {
  9000. return !D;
  9001. }) ? null : P,
  9002. y(P)
  9003. );
  9004. }
  9005. return V;
  9006. }), O = Ct(function(I, T) {
  9007. var P = Xd(x(), I, r()[I]);
  9008. R(P), T && L();
  9009. }), N = !u && !l;
  9010. ju(!N, function() {
  9011. N && (L(), a(t), k());
  9012. }, 2);
  9013. function F(I) {
  9014. return !!x()[I];
  9015. }
  9016. return [O, L, F];
  9017. }
  9018. function J0(e, t, n, r, a) {
  9019. return t !== "date" && t !== "time" ? !1 : n !== void 0 ? n : r !== void 0 ? r : e === "date" || e === "time";
  9020. }
  9021. function ey(e, t, n, r, a, o) {
  9022. var i = e;
  9023. function u(v, C, p) {
  9024. var m = o[v](i), b = p.find(function(y) {
  9025. return y.value === m;
  9026. });
  9027. if (!b || b.disabled) {
  9028. var f = p.filter(function(y) {
  9029. return !y.disabled;
  9030. }), h = ft(f).reverse(), g = h.find(function(y) {
  9031. return y.value <= m;
  9032. }) || f[0];
  9033. g && (m = g.value, i = o[C](i, m));
  9034. }
  9035. return m;
  9036. }
  9037. var l = u("getHour", "setHour", t()), c = u("getMinute", "setMinute", n(l)), s = u("getSecond", "setSecond", r(l, c));
  9038. return u("getMillisecond", "setMillisecond", a(l, c, s)), i;
  9039. }
  9040. function oo() {
  9041. return [];
  9042. }
  9043. function io(e, t) {
  9044. for (var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [], o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 2, i = [], u = n >= 1 ? n | 0 : 1, l = e; l <= t; l += u) {
  9045. var c = a.includes(l);
  9046. (!c || !r) && i.push({
  9047. label: Tu(l, o),
  9048. value: l,
  9049. disabled: c
  9050. });
  9051. }
  9052. return i;
  9053. }
  9054. function Fu(e) {
  9055. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0, r = t || {}, a = r.use12Hours, o = r.hourStep, i = o === void 0 ? 1 : o, u = r.minuteStep, l = u === void 0 ? 1 : u, c = r.secondStep, s = c === void 0 ? 1 : c, v = r.millisecondStep, C = v === void 0 ? 100 : v, p = r.hideDisabledOptions, m = r.disabledTime, b = r.disabledHours, f = r.disabledMinutes, h = r.disabledSeconds, g = d.useMemo(function() {
  9056. return n || e.getNow();
  9057. }, [n, e]), y = d.useCallback(function(_) {
  9058. var A = (m == null ? void 0 : m(_)) || {};
  9059. return [A.disabledHours || b || oo, A.disabledMinutes || f || oo, A.disabledSeconds || h || oo, A.disabledMilliseconds || oo];
  9060. }, [m, b, f, h]), w = d.useMemo(function() {
  9061. return y(g);
  9062. }, [g, y]), E = Z(w, 4), S = E[0], x = E[1], R = E[2], k = E[3], L = d.useCallback(function(_, A, H, $) {
  9063. var U = io(0, 23, i, p, _()), G = a ? U.map(function(ee) {
  9064. return re(re({}, ee), {}, {
  9065. label: Tu(ee.value % 12 || 12, 2)
  9066. });
  9067. }) : U, B = function(V) {
  9068. return io(0, 59, l, p, A(V));
  9069. }, ne = function(V, X) {
  9070. return io(0, 59, s, p, H(V, X));
  9071. }, le = function(V, X, J) {
  9072. return io(0, 999, C, p, $(V, X, J), 3);
  9073. };
  9074. return [G, B, ne, le];
  9075. }, [p, i, a, C, l, s]), O = d.useMemo(function() {
  9076. return L(S, x, R, k);
  9077. }, [L, S, x, R, k]), N = Z(O, 4), F = N[0], I = N[1], T = N[2], P = N[3], z = function(A, H) {
  9078. var $ = function() {
  9079. return F;
  9080. }, U = I, G = T, B = P;
  9081. if (H) {
  9082. var ne = y(H), le = Z(ne, 4), ee = le[0], V = le[1], X = le[2], J = le[3], M = L(ee, V, X, J), D = Z(M, 4), j = D[0], W = D[1], K = D[2], Y = D[3];
  9083. $ = function() {
  9084. return j;
  9085. }, U = W, G = K, B = Y;
  9086. }
  9087. var te = ey(A, $, U, G, B, e);
  9088. return te;
  9089. };
  9090. return [
  9091. // getValidTime
  9092. z,
  9093. // Units
  9094. F,
  9095. I,
  9096. T,
  9097. P
  9098. ];
  9099. }
  9100. function ty(e) {
  9101. var t = e.mode, n = e.internalMode, r = e.renderExtraFooter, a = e.showNow, o = e.showTime, i = e.onSubmit, u = e.onNow, l = e.invalid, c = e.needConfirm, s = e.generateConfig, v = e.disabledDate, C = d.useContext(Hn), p = C.prefixCls, m = C.locale, b = C.button, f = b === void 0 ? "button" : b, h = s.getNow(), g = Fu(s, o, h), y = Z(g, 1), w = y[0], E = r == null ? void 0 : r(t), S = v(h, {
  9102. type: t
  9103. }), x = function() {
  9104. if (!S) {
  9105. var I = w(h);
  9106. u(I);
  9107. }
  9108. }, R = "".concat(p, "-now"), k = "".concat(R, "-btn"), L = a && /* @__PURE__ */ d.createElement("li", {
  9109. className: R
  9110. }, /* @__PURE__ */ d.createElement("a", {
  9111. className: xe(k, S && "".concat(k, "-disabled")),
  9112. "aria-disabled": S,
  9113. onClick: x
  9114. }, n === "date" ? m.today : m.now)), O = c && /* @__PURE__ */ d.createElement("li", {
  9115. className: "".concat(p, "-ok")
  9116. }, /* @__PURE__ */ d.createElement(f, {
  9117. disabled: l,
  9118. onClick: i
  9119. }, m.ok)), N = (L || O) && /* @__PURE__ */ d.createElement("ul", {
  9120. className: "".concat(p, "-ranges")
  9121. }, L, O);
  9122. return !E && !N ? null : /* @__PURE__ */ d.createElement("div", {
  9123. className: "".concat(p, "-footer")
  9124. }, E && /* @__PURE__ */ d.createElement("div", {
  9125. className: "".concat(p, "-footer-extra")
  9126. }, E), N);
  9127. }
  9128. function df(e, t, n) {
  9129. function r(a, o) {
  9130. var i = a.findIndex(function(l) {
  9131. return ln(e, t, l, o, n);
  9132. });
  9133. if (i === -1)
  9134. return [].concat(ft(a), [o]);
  9135. var u = ft(a);
  9136. return u.splice(i, 1), u;
  9137. }
  9138. return r;
  9139. }
  9140. var Mr = /* @__PURE__ */ d.createContext(null);
  9141. function Yo() {
  9142. return d.useContext(Mr);
  9143. }
  9144. function Zr(e, t) {
  9145. var n = e.prefixCls, r = e.generateConfig, a = e.locale, o = e.disabledDate, i = e.minDate, u = e.maxDate, l = e.cellRender, c = e.hoverValue, s = e.hoverRangeValue, v = e.onHover, C = e.values, p = e.pickerValue, m = e.onSelect, b = e.prevIcon, f = e.nextIcon, h = e.superPrevIcon, g = e.superNextIcon, y = r.getNow(), w = {
  9146. now: y,
  9147. values: C,
  9148. pickerValue: p,
  9149. prefixCls: n,
  9150. disabledDate: o,
  9151. minDate: i,
  9152. maxDate: u,
  9153. cellRender: l,
  9154. hoverValue: c,
  9155. hoverRangeValue: s,
  9156. onHover: v,
  9157. locale: a,
  9158. generateConfig: r,
  9159. onSelect: m,
  9160. panelType: t,
  9161. // Icons
  9162. prevIcon: b,
  9163. nextIcon: f,
  9164. superPrevIcon: h,
  9165. superNextIcon: g
  9166. };
  9167. return [w, y];
  9168. }
  9169. var ar = /* @__PURE__ */ d.createContext({});
  9170. function Fa(e) {
  9171. for (var t = e.rowNum, n = e.colNum, r = e.baseDate, a = e.getCellDate, o = e.prefixColumn, i = e.rowClassName, u = e.titleFormat, l = e.getCellText, c = e.getCellClassName, s = e.headerCells, v = e.cellSelection, C = v === void 0 ? !0 : v, p = e.disabledDate, m = Yo(), b = m.prefixCls, f = m.panelType, h = m.now, g = m.disabledDate, y = m.cellRender, w = m.onHover, E = m.hoverValue, S = m.hoverRangeValue, x = m.generateConfig, R = m.values, k = m.locale, L = m.onSelect, O = p || g, N = "".concat(b, "-cell"), F = d.useContext(ar), I = F.onCellDblClick, T = function(G) {
  9172. return R.some(function(B) {
  9173. return B && ln(x, k, G, B, f);
  9174. });
  9175. }, P = [], z = 0; z < t; z += 1) {
  9176. for (var _ = [], A = void 0, H = function() {
  9177. var G = z * n + $, B = a(r, G), ne = O == null ? void 0 : O(B, {
  9178. type: f
  9179. });
  9180. $ === 0 && (A = B, o && _.push(o(A)));
  9181. var le = !1, ee = !1, V = !1;
  9182. if (C && S) {
  9183. var X = Z(S, 2), J = X[0], M = X[1];
  9184. le = Ko(x, J, M, B), ee = ln(x, k, B, J, f), V = ln(x, k, B, M, f);
  9185. }
  9186. var D = u ? Vt(B, {
  9187. locale: k,
  9188. format: u,
  9189. generateConfig: x
  9190. }) : void 0, j = /* @__PURE__ */ d.createElement("div", {
  9191. className: "".concat(N, "-inner")
  9192. }, l(B));
  9193. _.push(/* @__PURE__ */ d.createElement("td", {
  9194. key: $,
  9195. title: D,
  9196. className: xe(N, re(ie(ie(ie(ie(ie(ie({}, "".concat(N, "-disabled"), ne), "".concat(N, "-hover"), (E || []).some(function(W) {
  9197. return ln(x, k, B, W, f);
  9198. })), "".concat(N, "-in-range"), le && !ee && !V), "".concat(N, "-range-start"), ee), "".concat(N, "-range-end"), V), "".concat(b, "-cell-selected"), !S && // WeekPicker use row instead
  9199. f !== "week" && T(B)), c(B))),
  9200. onClick: function() {
  9201. ne || L(B);
  9202. },
  9203. onDoubleClick: function() {
  9204. !ne && I && I();
  9205. },
  9206. onMouseEnter: function() {
  9207. ne || w == null || w(B);
  9208. },
  9209. onMouseLeave: function() {
  9210. ne || w == null || w(null);
  9211. }
  9212. }, y ? y(B, {
  9213. prefixCls: b,
  9214. originNode: j,
  9215. today: h,
  9216. type: f,
  9217. locale: k
  9218. }) : j));
  9219. }, $ = 0; $ < n; $ += 1)
  9220. H();
  9221. P.push(/* @__PURE__ */ d.createElement("tr", {
  9222. key: z,
  9223. className: i == null ? void 0 : i(A)
  9224. }, _));
  9225. }
  9226. return /* @__PURE__ */ d.createElement("div", {
  9227. className: "".concat(b, "-body")
  9228. }, /* @__PURE__ */ d.createElement("table", {
  9229. className: "".concat(b, "-content")
  9230. }, s && /* @__PURE__ */ d.createElement("thead", null, /* @__PURE__ */ d.createElement("tr", null, s)), /* @__PURE__ */ d.createElement("tbody", null, P)));
  9231. }
  9232. var uo = {
  9233. visibility: "hidden"
  9234. };
  9235. function Qr(e) {
  9236. var t = e.offset, n = e.superOffset, r = e.onChange, a = e.getStart, o = e.getEnd, i = e.children, u = Yo(), l = u.prefixCls, c = u.prevIcon, s = c === void 0 ? "‹" : c, v = u.nextIcon, C = v === void 0 ? "›" : v, p = u.superPrevIcon, m = p === void 0 ? "«" : p, b = u.superNextIcon, f = b === void 0 ? "»" : b, h = u.minDate, g = u.maxDate, y = u.generateConfig, w = u.locale, E = u.pickerValue, S = u.panelType, x = "".concat(l, "-header"), R = d.useContext(ar), k = R.hidePrev, L = R.hideNext, O = R.hideHeader, N = d.useMemo(function() {
  9237. if (!h || !t || !o)
  9238. return !1;
  9239. var U = o(t(-1, E));
  9240. return !ro(y, w, U, h, S);
  9241. }, [h, t, E, o, y, w, S]), F = d.useMemo(function() {
  9242. if (!h || !n || !o)
  9243. return !1;
  9244. var U = o(n(-1, E));
  9245. return !ro(y, w, U, h, S);
  9246. }, [h, n, E, o, y, w, S]), I = d.useMemo(function() {
  9247. if (!g || !t || !a)
  9248. return !1;
  9249. var U = a(t(1, E));
  9250. return !ro(y, w, g, U, S);
  9251. }, [g, t, E, a, y, w, S]), T = d.useMemo(function() {
  9252. if (!g || !n || !a)
  9253. return !1;
  9254. var U = a(n(1, E));
  9255. return !ro(y, w, g, U, S);
  9256. }, [g, n, E, a, y, w, S]), P = function(G) {
  9257. t && r(t(G, E));
  9258. }, z = function(G) {
  9259. n && r(n(G, E));
  9260. };
  9261. if (O)
  9262. return null;
  9263. var _ = "".concat(x, "-prev-btn"), A = "".concat(x, "-next-btn"), H = "".concat(x, "-super-prev-btn"), $ = "".concat(x, "-super-next-btn");
  9264. return /* @__PURE__ */ d.createElement("div", {
  9265. className: x
  9266. }, n && /* @__PURE__ */ d.createElement("button", {
  9267. type: "button",
  9268. "aria-label": "super-prev-year",
  9269. onClick: function() {
  9270. return z(-1);
  9271. },
  9272. tabIndex: -1,
  9273. className: xe(H, F && "".concat(H, "-disabled")),
  9274. disabled: F,
  9275. style: k ? uo : {}
  9276. }, m), t && /* @__PURE__ */ d.createElement("button", {
  9277. type: "button",
  9278. "aria-label": "prev-year",
  9279. onClick: function() {
  9280. return P(-1);
  9281. },
  9282. tabIndex: -1,
  9283. className: xe(_, N && "".concat(_, "-disabled")),
  9284. disabled: N,
  9285. style: k ? uo : {}
  9286. }, s), /* @__PURE__ */ d.createElement("div", {
  9287. className: "".concat(x, "-view")
  9288. }, i), t && /* @__PURE__ */ d.createElement("button", {
  9289. type: "button",
  9290. "aria-label": "next-year",
  9291. onClick: function() {
  9292. return P(1);
  9293. },
  9294. tabIndex: -1,
  9295. className: xe(A, I && "".concat(A, "-disabled")),
  9296. disabled: I,
  9297. style: L ? uo : {}
  9298. }, C), n && /* @__PURE__ */ d.createElement("button", {
  9299. type: "button",
  9300. "aria-label": "super-next-year",
  9301. onClick: function() {
  9302. return z(1);
  9303. },
  9304. tabIndex: -1,
  9305. className: xe($, T && "".concat($, "-disabled")),
  9306. disabled: T,
  9307. style: L ? uo : {}
  9308. }, f));
  9309. }
  9310. function Go(e) {
  9311. var t = e.prefixCls, n = e.panelName, r = n === void 0 ? "date" : n, a = e.locale, o = e.generateConfig, i = e.pickerValue, u = e.onPickerValueChange, l = e.onModeChange, c = e.mode, s = c === void 0 ? "date" : c, v = e.disabledDate, C = e.onSelect, p = e.onHover, m = e.showWeek, b = "".concat(t, "-").concat(r, "-panel"), f = "".concat(t, "-cell"), h = s === "week", g = Zr(e, s), y = Z(g, 2), w = y[0], E = y[1], S = o.locale.getWeekFirstDay(a.locale), x = o.setDate(i, 1), R = $0(a.locale, o, x), k = o.getMonth(i), L = m === void 0 ? h : m, O = L ? function(U) {
  9312. var G = v == null ? void 0 : v(U, {
  9313. type: "week"
  9314. });
  9315. return /* @__PURE__ */ d.createElement("td", {
  9316. key: "week",
  9317. className: xe(f, "".concat(f, "-week"), ie({}, "".concat(f, "-disabled"), G)),
  9318. onClick: function() {
  9319. G || C(U);
  9320. },
  9321. onMouseEnter: function() {
  9322. G || p == null || p(U);
  9323. },
  9324. onMouseLeave: function() {
  9325. G || p == null || p(null);
  9326. }
  9327. }, /* @__PURE__ */ d.createElement("div", {
  9328. className: "".concat(f, "-inner")
  9329. }, o.locale.getWeek(a.locale, U)));
  9330. } : null, N = [], F = a.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(a.locale) : []);
  9331. O && N.push(/* @__PURE__ */ d.createElement("th", {
  9332. key: "empty",
  9333. "aria-label": "empty cell"
  9334. }));
  9335. for (var I = 0; I < gi; I += 1)
  9336. N.push(/* @__PURE__ */ d.createElement("th", {
  9337. key: I
  9338. }, F[(I + S) % gi]));
  9339. var T = function(G, B) {
  9340. return o.addDate(G, B);
  9341. }, P = function(G) {
  9342. return Vt(G, {
  9343. locale: a,
  9344. format: a.cellDateFormat,
  9345. generateConfig: o
  9346. });
  9347. }, z = function(G) {
  9348. var B = ie(ie({}, "".concat(t, "-cell-in-view"), $u(o, G, i)), "".concat(t, "-cell-today"), Au(o, G, E));
  9349. return B;
  9350. }, _ = a.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(a.locale) : []), A = /* @__PURE__ */ d.createElement("button", {
  9351. type: "button",
  9352. "aria-label": "year panel",
  9353. key: "year",
  9354. onClick: function() {
  9355. l("year", i);
  9356. },
  9357. tabIndex: -1,
  9358. className: "".concat(t, "-year-btn")
  9359. }, Vt(i, {
  9360. locale: a,
  9361. format: a.yearFormat,
  9362. generateConfig: o
  9363. })), H = /* @__PURE__ */ d.createElement("button", {
  9364. type: "button",
  9365. "aria-label": "month panel",
  9366. key: "month",
  9367. onClick: function() {
  9368. l("month", i);
  9369. },
  9370. tabIndex: -1,
  9371. className: "".concat(t, "-month-btn")
  9372. }, a.monthFormat ? Vt(i, {
  9373. locale: a,
  9374. format: a.monthFormat,
  9375. generateConfig: o
  9376. }) : _[k]), $ = a.monthBeforeYear ? [H, A] : [A, H];
  9377. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9378. value: w
  9379. }, /* @__PURE__ */ d.createElement("div", {
  9380. className: xe(b, m && "".concat(b, "-show-week"))
  9381. }, /* @__PURE__ */ d.createElement(Qr, {
  9382. offset: function(G) {
  9383. return o.addMonth(i, G);
  9384. },
  9385. superOffset: function(G) {
  9386. return o.addYear(i, G);
  9387. },
  9388. onChange: u,
  9389. getStart: function(G) {
  9390. return o.setDate(G, 1);
  9391. },
  9392. getEnd: function(G) {
  9393. var B = o.setDate(G, 1);
  9394. return B = o.addMonth(B, 1), o.addDate(B, -1);
  9395. }
  9396. }, $), /* @__PURE__ */ d.createElement(Fa, _e({
  9397. titleFormat: a.fieldDateFormat
  9398. }, e, {
  9399. colNum: gi,
  9400. rowNum: 6,
  9401. baseDate: R,
  9402. headerCells: N,
  9403. getCellDate: T,
  9404. getCellText: P,
  9405. getCellClassName: z,
  9406. prefixColumn: O,
  9407. cellSelection: !h
  9408. }))));
  9409. }
  9410. var ny = 1 / 3;
  9411. function ry(e, t) {
  9412. var n = d.useRef(!1), r = d.useRef(null), a = d.useRef(null), o = function() {
  9413. return n.current;
  9414. }, i = function() {
  9415. st.cancel(r.current), n.current = !1;
  9416. }, u = d.useRef(), l = function() {
  9417. var v = e.current;
  9418. if (a.current = null, u.current = 0, v) {
  9419. var C = v.querySelector('[data-value="'.concat(t, '"]')), p = v.querySelector("li"), m = function b() {
  9420. i(), n.current = !0, u.current += 1;
  9421. var f = v.scrollTop, h = p.offsetTop, g = C.offsetTop, y = g - h;
  9422. if (g === 0 && C !== p || !_u(v)) {
  9423. u.current <= 5 && (r.current = st(b));
  9424. return;
  9425. }
  9426. var w = f + (y - f) * ny, E = Math.abs(y - w);
  9427. if (a.current !== null && a.current < E) {
  9428. i();
  9429. return;
  9430. }
  9431. if (a.current = E, E <= 1) {
  9432. v.scrollTop = y, i();
  9433. return;
  9434. }
  9435. v.scrollTop = w, r.current = st(b);
  9436. };
  9437. C && p && m();
  9438. }
  9439. }, c = Ct(l);
  9440. return [c, i, o];
  9441. }
  9442. var ay = 300;
  9443. function sa(e) {
  9444. var t = e.units, n = e.value, r = e.optionalValue, a = e.type, o = e.onChange, i = e.onHover, u = e.onDblClick, l = e.changeOnScroll, c = Yo(), s = c.prefixCls, v = c.cellRender, C = c.now, p = c.locale, m = "".concat(s, "-time-panel"), b = "".concat(s, "-time-panel-cell"), f = d.useRef(null), h = d.useRef(), g = function() {
  9445. clearTimeout(h.current);
  9446. }, y = ry(f, n != null ? n : r), w = Z(y, 3), E = w[0], S = w[1], x = w[2];
  9447. St(function() {
  9448. return E(), g(), function() {
  9449. S(), g();
  9450. };
  9451. }, [n, r, t]);
  9452. var R = function(O) {
  9453. g();
  9454. var N = O.target;
  9455. !x() && l && (h.current = setTimeout(function() {
  9456. var F = f.current, I = F.querySelector("li").offsetTop, T = Array.from(F.querySelectorAll("li")), P = T.map(function($) {
  9457. return $.offsetTop - I;
  9458. }), z = P.map(function($, U) {
  9459. return t[U].disabled ? Number.MAX_SAFE_INTEGER : Math.abs($ - N.scrollTop);
  9460. }), _ = Math.min.apply(Math, ft(z)), A = z.findIndex(function($) {
  9461. return $ === _;
  9462. }), H = t[A];
  9463. H && !H.disabled && o(H.value);
  9464. }, ay));
  9465. }, k = "".concat(m, "-column");
  9466. return /* @__PURE__ */ d.createElement("ul", {
  9467. className: k,
  9468. ref: f,
  9469. "data-type": a,
  9470. onScroll: R
  9471. }, t.map(function(L) {
  9472. var O = L.label, N = L.value, F = L.disabled, I = /* @__PURE__ */ d.createElement("div", {
  9473. className: "".concat(b, "-inner")
  9474. }, O);
  9475. return /* @__PURE__ */ d.createElement("li", {
  9476. key: N,
  9477. className: xe(b, ie(ie({}, "".concat(b, "-selected"), n === N), "".concat(b, "-disabled"), F)),
  9478. onClick: function() {
  9479. F || o(N);
  9480. },
  9481. onDoubleClick: function() {
  9482. !F && u && u();
  9483. },
  9484. onMouseEnter: function() {
  9485. i(N);
  9486. },
  9487. onMouseLeave: function() {
  9488. i(null);
  9489. },
  9490. "data-value": N
  9491. }, v ? v(N, {
  9492. prefixCls: s,
  9493. originNode: I,
  9494. today: C,
  9495. type: "time",
  9496. subType: a,
  9497. locale: p
  9498. }) : I);
  9499. }));
  9500. }
  9501. function Zn(e) {
  9502. return e < 12;
  9503. }
  9504. function oy(e) {
  9505. var t = e.showHour, n = e.showMinute, r = e.showSecond, a = e.showMillisecond, o = e.use12Hours, i = e.changeOnScroll, u = Yo(), l = u.prefixCls, c = u.values, s = u.generateConfig, v = u.locale, C = u.onSelect, p = u.onHover, m = p === void 0 ? function() {
  9506. } : p, b = u.pickerValue, f = (c == null ? void 0 : c[0]) || null, h = d.useContext(ar), g = h.onCellDblClick, y = Fu(s, e, f), w = Z(y, 5), E = w[0], S = w[1], x = w[2], R = w[3], k = w[4], L = function(be) {
  9507. var Xe = f && s[be](f), it = b && s[be](b);
  9508. return [Xe, it];
  9509. }, O = L("getHour"), N = Z(O, 2), F = N[0], I = N[1], T = L("getMinute"), P = Z(T, 2), z = P[0], _ = P[1], A = L("getSecond"), H = Z(A, 2), $ = H[0], U = H[1], G = L("getMillisecond"), B = Z(G, 2), ne = B[0], le = B[1], ee = F === null ? null : Zn(F) ? "am" : "pm", V = d.useMemo(function() {
  9510. return o ? Zn(F) ? S.filter(function(de) {
  9511. return Zn(de.value);
  9512. }) : S.filter(function(de) {
  9513. return !Zn(de.value);
  9514. }) : S;
  9515. }, [F, S, o]), X = function(be, Xe) {
  9516. var it, tt = be.filter(function($e) {
  9517. return !$e.disabled;
  9518. });
  9519. return Xe != null ? Xe : (
  9520. // Fallback to enabled value
  9521. tt == null || (it = tt[0]) === null || it === void 0 ? void 0 : it.value
  9522. );
  9523. }, J = X(S, F), M = d.useMemo(function() {
  9524. return x(J);
  9525. }, [x, J]), D = X(M, z), j = d.useMemo(function() {
  9526. return R(J, D);
  9527. }, [R, J, D]), W = X(j, $), K = d.useMemo(function() {
  9528. return k(J, D, W);
  9529. }, [k, J, D, W]), Y = X(K, ne), te = d.useMemo(function() {
  9530. if (!o)
  9531. return [];
  9532. var de = s.getNow(), be = s.setHour(de, 6), Xe = s.setHour(de, 18), it = function($e, ge) {
  9533. var ke = v.cellMeridiemFormat;
  9534. return ke ? Vt($e, {
  9535. generateConfig: s,
  9536. locale: v,
  9537. format: ke
  9538. }) : ge;
  9539. };
  9540. return [{
  9541. label: it(be, "AM"),
  9542. value: "am",
  9543. disabled: S.every(function(tt) {
  9544. return tt.disabled || !Zn(tt.value);
  9545. })
  9546. }, {
  9547. label: it(Xe, "PM"),
  9548. value: "pm",
  9549. disabled: S.every(function(tt) {
  9550. return tt.disabled || Zn(tt.value);
  9551. })
  9552. }];
  9553. }, [S, o, s, v]), Q = function(be) {
  9554. var Xe = E(be);
  9555. C(Xe);
  9556. }, ae = d.useMemo(function() {
  9557. var de = f || b || s.getNow(), be = function(it) {
  9558. return it != null;
  9559. };
  9560. return be(F) ? (de = s.setHour(de, F), de = s.setMinute(de, z), de = s.setSecond(de, $), de = s.setMillisecond(de, ne)) : be(I) ? (de = s.setHour(de, I), de = s.setMinute(de, _), de = s.setSecond(de, U), de = s.setMillisecond(de, le)) : be(J) && (de = s.setHour(de, J), de = s.setMinute(de, D), de = s.setSecond(de, W), de = s.setMillisecond(de, Y)), de;
  9561. }, [f, b, F, z, $, ne, J, D, W, Y, I, _, U, le, s]), ue = function(be, Xe) {
  9562. return be === null ? null : s[Xe](ae, be);
  9563. }, se = function(be) {
  9564. return ue(be, "setHour");
  9565. }, pe = function(be) {
  9566. return ue(be, "setMinute");
  9567. }, oe = function(be) {
  9568. return ue(be, "setSecond");
  9569. }, ve = function(be) {
  9570. return ue(be, "setMillisecond");
  9571. }, ze = function(be) {
  9572. return be === null ? null : be === "am" && !Zn(F) ? s.setHour(ae, F - 12) : be === "pm" && Zn(F) ? s.setHour(ae, F + 12) : ae;
  9573. }, Re = function(be) {
  9574. Q(se(be));
  9575. }, Be = function(be) {
  9576. Q(pe(be));
  9577. }, je = function(be) {
  9578. Q(oe(be));
  9579. }, He = function(be) {
  9580. Q(ve(be));
  9581. }, Ye = function(be) {
  9582. Q(ze(be));
  9583. }, nt = function(be) {
  9584. m(se(be));
  9585. }, Ge = function(be) {
  9586. m(pe(be));
  9587. }, Ne = function(be) {
  9588. m(oe(be));
  9589. }, ce = function(be) {
  9590. m(ve(be));
  9591. }, he = function(be) {
  9592. m(ze(be));
  9593. }, Ve = {
  9594. onDblClick: g,
  9595. changeOnScroll: i
  9596. };
  9597. return /* @__PURE__ */ d.createElement("div", {
  9598. className: "".concat(l, "-content")
  9599. }, t && /* @__PURE__ */ d.createElement(sa, _e({
  9600. units: V,
  9601. value: F,
  9602. optionalValue: I,
  9603. type: "hour",
  9604. onChange: Re,
  9605. onHover: nt
  9606. }, Ve)), n && /* @__PURE__ */ d.createElement(sa, _e({
  9607. units: M,
  9608. value: z,
  9609. optionalValue: _,
  9610. type: "minute",
  9611. onChange: Be,
  9612. onHover: Ge
  9613. }, Ve)), r && /* @__PURE__ */ d.createElement(sa, _e({
  9614. units: j,
  9615. value: $,
  9616. optionalValue: U,
  9617. type: "second",
  9618. onChange: je,
  9619. onHover: Ne
  9620. }, Ve)), a && /* @__PURE__ */ d.createElement(sa, _e({
  9621. units: K,
  9622. value: ne,
  9623. optionalValue: le,
  9624. type: "millisecond",
  9625. onChange: He,
  9626. onHover: ce
  9627. }, Ve)), o && /* @__PURE__ */ d.createElement(sa, _e({
  9628. units: te,
  9629. value: ee,
  9630. type: "meridiem",
  9631. onChange: Ye,
  9632. onHover: he
  9633. }, Ve)));
  9634. }
  9635. function ff(e) {
  9636. var t = e.prefixCls, n = e.value, r = e.locale, a = e.generateConfig, o = e.showTime, i = o || {}, u = i.format, l = "".concat(t, "-time-panel"), c = Zr(e, "time"), s = Z(c, 1), v = s[0];
  9637. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9638. value: v
  9639. }, /* @__PURE__ */ d.createElement("div", {
  9640. className: xe(l)
  9641. }, /* @__PURE__ */ d.createElement(Qr, null, n ? Vt(n, {
  9642. locale: r,
  9643. format: u,
  9644. generateConfig: a
  9645. }) : " "), /* @__PURE__ */ d.createElement(oy, o)));
  9646. }
  9647. function iy(e) {
  9648. var t = e.prefixCls, n = e.generateConfig, r = e.showTime, a = e.onSelect, o = e.value, i = e.pickerValue, u = e.onHover, l = "".concat(t, "-datetime-panel"), c = Fu(n, r), s = Z(c, 1), v = s[0], C = function(f) {
  9649. return o ? Lo(n, f, o) : Lo(n, f, i);
  9650. }, p = function(f) {
  9651. u == null || u(f && C(f));
  9652. }, m = function(f) {
  9653. var h = C(f);
  9654. a(v(h, h));
  9655. };
  9656. return /* @__PURE__ */ d.createElement("div", {
  9657. className: l
  9658. }, /* @__PURE__ */ d.createElement(Go, _e({}, e, {
  9659. onSelect: m,
  9660. onHover: p
  9661. })), /* @__PURE__ */ d.createElement(ff, e));
  9662. }
  9663. function uy(e) {
  9664. var t = e.prefixCls, n = e.locale, r = e.generateConfig, a = e.pickerValue, o = e.disabledDate, i = e.onPickerValueChange, u = "".concat(t, "-decade-panel"), l = Zr(e, "decade"), c = Z(l, 1), s = c[0], v = function(S) {
  9665. var x = Math.floor(r.getYear(S) / 100) * 100;
  9666. return r.setYear(S, x);
  9667. }, C = function(S) {
  9668. var x = v(S);
  9669. return r.addYear(x, 99);
  9670. }, p = v(a), m = C(a), b = r.addYear(p, -10), f = function(S, x) {
  9671. return r.addYear(S, x * 10);
  9672. }, h = function(S) {
  9673. var x = n.cellYearFormat, R = Vt(S, {
  9674. locale: n,
  9675. format: x,
  9676. generateConfig: r
  9677. }), k = Vt(r.addYear(S, 9), {
  9678. locale: n,
  9679. format: x,
  9680. generateConfig: r
  9681. });
  9682. return "".concat(R, "-").concat(k);
  9683. }, g = function(S) {
  9684. return ie({}, "".concat(t, "-cell-in-view"), eu(r, S, p) || eu(r, S, m) || Ko(r, p, m, S));
  9685. }, y = o ? function(E, S) {
  9686. var x = r.setDate(E, 1), R = r.setMonth(x, 0), k = r.setYear(R, Math.floor(r.getYear(R) / 10) * 10), L = r.addYear(k, 10), O = r.addDate(L, -1);
  9687. return o(k, S) && o(O, S);
  9688. } : null, w = "".concat(Vt(p, {
  9689. locale: n,
  9690. format: n.yearFormat,
  9691. generateConfig: r
  9692. }), "-").concat(Vt(m, {
  9693. locale: n,
  9694. format: n.yearFormat,
  9695. generateConfig: r
  9696. }));
  9697. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9698. value: s
  9699. }, /* @__PURE__ */ d.createElement("div", {
  9700. className: u
  9701. }, /* @__PURE__ */ d.createElement(Qr, {
  9702. superOffset: function(S) {
  9703. return r.addYear(a, S * 100);
  9704. },
  9705. onChange: i,
  9706. getStart: v,
  9707. getEnd: C
  9708. }, w), /* @__PURE__ */ d.createElement(Fa, _e({}, e, {
  9709. disabledDate: y,
  9710. colNum: 3,
  9711. rowNum: 4,
  9712. baseDate: b,
  9713. getCellDate: f,
  9714. getCellText: h,
  9715. getCellClassName: g
  9716. }))));
  9717. }
  9718. function ly(e) {
  9719. var t = e.prefixCls, n = e.locale, r = e.generateConfig, a = e.pickerValue, o = e.disabledDate, i = e.onPickerValueChange, u = e.onModeChange, l = "".concat(t, "-month-panel"), c = Zr(e, "month"), s = Z(c, 1), v = s[0], C = r.setMonth(a, 0), p = n.shortMonths || (r.locale.getShortMonths ? r.locale.getShortMonths(n.locale) : []), m = function(w, E) {
  9720. return r.addMonth(w, E);
  9721. }, b = function(w) {
  9722. var E = r.getMonth(w);
  9723. return n.monthFormat ? Vt(w, {
  9724. locale: n,
  9725. format: n.monthFormat,
  9726. generateConfig: r
  9727. }) : p[E];
  9728. }, f = function() {
  9729. return ie({}, "".concat(t, "-cell-in-view"), !0);
  9730. }, h = o ? function(y, w) {
  9731. var E = r.setDate(y, 1), S = r.setMonth(E, r.getMonth(E) + 1), x = r.addDate(S, -1);
  9732. return o(E, w) && o(x, w);
  9733. } : null, g = /* @__PURE__ */ d.createElement("button", {
  9734. type: "button",
  9735. key: "year",
  9736. "aria-label": "year panel",
  9737. onClick: function() {
  9738. u("year");
  9739. },
  9740. tabIndex: -1,
  9741. className: "".concat(t, "-year-btn")
  9742. }, Vt(a, {
  9743. locale: n,
  9744. format: n.yearFormat,
  9745. generateConfig: r
  9746. }));
  9747. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9748. value: v
  9749. }, /* @__PURE__ */ d.createElement("div", {
  9750. className: l
  9751. }, /* @__PURE__ */ d.createElement(Qr, {
  9752. superOffset: function(w) {
  9753. return r.addYear(a, w);
  9754. },
  9755. onChange: i,
  9756. getStart: function(w) {
  9757. return r.setMonth(w, 0);
  9758. },
  9759. getEnd: function(w) {
  9760. return r.setMonth(w, 11);
  9761. }
  9762. }, g), /* @__PURE__ */ d.createElement(Fa, _e({}, e, {
  9763. disabledDate: h,
  9764. titleFormat: n.fieldMonthFormat,
  9765. colNum: 3,
  9766. rowNum: 4,
  9767. baseDate: C,
  9768. getCellDate: m,
  9769. getCellText: b,
  9770. getCellClassName: f
  9771. }))));
  9772. }
  9773. function sy(e) {
  9774. var t = e.prefixCls, n = e.locale, r = e.generateConfig, a = e.pickerValue, o = e.onPickerValueChange, i = e.onModeChange, u = "".concat(t, "-quarter-panel"), l = Zr(e, "quarter"), c = Z(l, 1), s = c[0], v = r.setMonth(a, 0), C = function(h, g) {
  9775. return r.addMonth(h, g * 3);
  9776. }, p = function(h) {
  9777. return Vt(h, {
  9778. locale: n,
  9779. format: n.cellQuarterFormat,
  9780. generateConfig: r
  9781. });
  9782. }, m = function() {
  9783. return ie({}, "".concat(t, "-cell-in-view"), !0);
  9784. }, b = /* @__PURE__ */ d.createElement("button", {
  9785. type: "button",
  9786. key: "year",
  9787. "aria-label": "year panel",
  9788. onClick: function() {
  9789. i("year");
  9790. },
  9791. tabIndex: -1,
  9792. className: "".concat(t, "-year-btn")
  9793. }, Vt(a, {
  9794. locale: n,
  9795. format: n.yearFormat,
  9796. generateConfig: r
  9797. }));
  9798. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9799. value: s
  9800. }, /* @__PURE__ */ d.createElement("div", {
  9801. className: u
  9802. }, /* @__PURE__ */ d.createElement(Qr, {
  9803. superOffset: function(h) {
  9804. return r.addYear(a, h);
  9805. },
  9806. onChange: o,
  9807. getStart: function(h) {
  9808. return r.setMonth(h, 0);
  9809. },
  9810. getEnd: function(h) {
  9811. return r.setMonth(h, 11);
  9812. }
  9813. }, b), /* @__PURE__ */ d.createElement(Fa, _e({}, e, {
  9814. titleFormat: n.fieldQuarterFormat,
  9815. colNum: 4,
  9816. rowNum: 1,
  9817. baseDate: v,
  9818. getCellDate: C,
  9819. getCellText: p,
  9820. getCellClassName: m
  9821. }))));
  9822. }
  9823. function cy(e) {
  9824. var t = e.prefixCls, n = e.generateConfig, r = e.locale, a = e.value, o = e.hoverValue, i = e.hoverRangeValue, u = r.locale, l = "".concat(t, "-week-panel-row"), c = function(v) {
  9825. var C = {};
  9826. if (i) {
  9827. var p = Z(i, 2), m = p[0], b = p[1], f = xa(n, u, m, v), h = xa(n, u, b, v);
  9828. C["".concat(l, "-range-start")] = f, C["".concat(l, "-range-end")] = h, C["".concat(l, "-range-hover")] = !f && !h && Ko(n, m, b, v);
  9829. }
  9830. return o && (C["".concat(l, "-hover")] = o.some(function(g) {
  9831. return xa(n, u, v, g);
  9832. })), xe(
  9833. l,
  9834. ie({}, "".concat(l, "-selected"), !i && xa(n, u, a, v)),
  9835. // Patch for hover range
  9836. C
  9837. );
  9838. };
  9839. return /* @__PURE__ */ d.createElement(Go, _e({}, e, {
  9840. mode: "week",
  9841. panelName: "week",
  9842. rowClassName: c
  9843. }));
  9844. }
  9845. function dy(e) {
  9846. var t = e.prefixCls, n = e.locale, r = e.generateConfig, a = e.pickerValue, o = e.disabledDate, i = e.onPickerValueChange, u = e.onModeChange, l = "".concat(t, "-year-panel"), c = Zr(e, "year"), s = Z(c, 1), v = s[0], C = function(x) {
  9847. var R = Math.floor(r.getYear(x) / 10) * 10;
  9848. return r.setYear(x, R);
  9849. }, p = function(x) {
  9850. var R = C(x);
  9851. return r.addYear(R, 9);
  9852. }, m = C(a), b = p(a), f = r.addYear(m, -1), h = function(x, R) {
  9853. return r.addYear(x, R);
  9854. }, g = function(x) {
  9855. return Vt(x, {
  9856. locale: n,
  9857. format: n.cellYearFormat,
  9858. generateConfig: r
  9859. });
  9860. }, y = function(x) {
  9861. return ie({}, "".concat(t, "-cell-in-view"), Sr(r, x, m) || Sr(r, x, b) || Ko(r, m, b, x));
  9862. }, w = o ? function(S, x) {
  9863. var R = r.setMonth(S, 0), k = r.setDate(R, 1), L = r.addYear(k, 1), O = r.addDate(L, -1);
  9864. return o(k, x) && o(O, x);
  9865. } : null, E = /* @__PURE__ */ d.createElement("button", {
  9866. type: "button",
  9867. key: "decade",
  9868. "aria-label": "decade panel",
  9869. onClick: function() {
  9870. u("decade");
  9871. },
  9872. tabIndex: -1,
  9873. className: "".concat(t, "-decade-btn")
  9874. }, Vt(m, {
  9875. locale: n,
  9876. format: n.yearFormat,
  9877. generateConfig: r
  9878. }), "-", Vt(b, {
  9879. locale: n,
  9880. format: n.yearFormat,
  9881. generateConfig: r
  9882. }));
  9883. return /* @__PURE__ */ d.createElement(Mr.Provider, {
  9884. value: v
  9885. }, /* @__PURE__ */ d.createElement("div", {
  9886. className: l
  9887. }, /* @__PURE__ */ d.createElement(Qr, {
  9888. superOffset: function(x) {
  9889. return r.addYear(a, x * 10);
  9890. },
  9891. onChange: i,
  9892. getStart: C,
  9893. getEnd: p
  9894. }, E), /* @__PURE__ */ d.createElement(Fa, _e({}, e, {
  9895. disabledDate: w,
  9896. titleFormat: n.fieldYearFormat,
  9897. colNum: 3,
  9898. rowNum: 4,
  9899. baseDate: f,
  9900. getCellDate: h,
  9901. getCellText: g,
  9902. getCellClassName: y
  9903. }))));
  9904. }
  9905. var fy = {
  9906. date: Go,
  9907. datetime: iy,
  9908. week: cy,
  9909. month: ly,
  9910. quarter: sy,
  9911. year: dy,
  9912. decade: uy,
  9913. time: ff
  9914. };
  9915. function vy(e, t) {
  9916. var n, r = e.locale, a = e.generateConfig, o = e.direction, i = e.prefixCls, u = e.tabIndex, l = u === void 0 ? 0 : u, c = e.multiple, s = e.defaultValue, v = e.value, C = e.onChange, p = e.onSelect, m = e.defaultPickerValue, b = e.pickerValue, f = e.onPickerValueChange, h = e.mode, g = e.onPanelChange, y = e.picker, w = y === void 0 ? "date" : y, E = e.showTime, S = e.hoverValue, x = e.hoverRangeValue, R = e.cellRender, k = e.dateRender, L = e.monthCellRender, O = e.components, N = O === void 0 ? {} : O, F = e.hideHeader, I = ((n = d.useContext(Hn)) === null || n === void 0 ? void 0 : n.prefixCls) || i || "rc-picker", T = d.useRef();
  9917. d.useImperativeHandle(t, function() {
  9918. return {
  9919. nativeElement: T.current
  9920. };
  9921. });
  9922. var P = rf(e), z = Z(P, 4), _ = z[0], A = z[1], H = z[2], $ = z[3], U = ef(r, A), G = w === "date" && E ? "datetime" : w, B = d.useMemo(function() {
  9923. return af(G, H, $, _, U);
  9924. }, [G, H, $, _, U]), ne = a.getNow(), le = Gt(w, {
  9925. value: h,
  9926. postState: function(he) {
  9927. return he || "date";
  9928. }
  9929. }), ee = Z(le, 2), V = ee[0], X = ee[1], J = V === "date" && B ? "datetime" : V, M = df(a, r, G), D = Gt(s, {
  9930. value: v
  9931. }), j = Z(D, 2), W = j[0], K = j[1], Y = d.useMemo(function() {
  9932. var ce = Xr(W).filter(function(he) {
  9933. return he;
  9934. });
  9935. return c ? ce : ce.slice(0, 1);
  9936. }, [W, c]), te = Ct(function(ce) {
  9937. K(ce), C && (ce === null || Y.length !== ce.length || Y.some(function(he, Ve) {
  9938. return !ln(a, r, he, ce[Ve], G);
  9939. })) && (C == null || C(c ? ce : ce[0]));
  9940. }), Q = Ct(function(ce) {
  9941. if (p == null || p(ce), V === w) {
  9942. var he = c ? M(Y, ce) : [ce];
  9943. te(he);
  9944. }
  9945. }), ae = Gt(m || Y[0] || ne, {
  9946. value: b
  9947. }), ue = Z(ae, 2), se = ue[0], pe = ue[1];
  9948. d.useEffect(function() {
  9949. Y[0] && !b && pe(Y[0]);
  9950. }, [Y[0]]);
  9951. var oe = function(he, Ve) {
  9952. g == null || g(he || b, Ve || V);
  9953. }, ve = function(he) {
  9954. var Ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  9955. pe(he), f == null || f(he), Ve && oe(he);
  9956. }, ze = function(he, Ve) {
  9957. X(he), Ve && ve(Ve), oe(Ve, he);
  9958. }, Re = function(he) {
  9959. if (Q(he), ve(he), V !== w) {
  9960. var Ve = ["decade", "year"], de = [].concat(Ve, ["month"]), be = {
  9961. quarter: [].concat(Ve, ["quarter"]),
  9962. week: [].concat(ft(de), ["week"]),
  9963. date: [].concat(ft(de), ["date"])
  9964. }, Xe = be[w] || de, it = Xe.indexOf(V), tt = Xe[it + 1];
  9965. tt && ze(tt, he);
  9966. }
  9967. }, Be = d.useMemo(function() {
  9968. var ce, he;
  9969. if (Array.isArray(x)) {
  9970. var Ve = Z(x, 2);
  9971. ce = Ve[0], he = Ve[1];
  9972. } else
  9973. ce = x;
  9974. return !ce && !he ? null : (ce = ce || he, he = he || ce, a.isAfter(ce, he) ? [he, ce] : [ce, he]);
  9975. }, [x, a]), je = Qd(R, k, L), He = N[J] || fy[J] || Go, Ye = d.useContext(ar), nt = d.useMemo(function() {
  9976. return re(re({}, Ye), {}, {
  9977. hideHeader: F
  9978. });
  9979. }, [Ye, F]), Ge = "".concat(I, "-panel"), Ne = qo(e, [
  9980. // Week
  9981. "showWeek",
  9982. // Icons
  9983. "prevIcon",
  9984. "nextIcon",
  9985. "superPrevIcon",
  9986. "superNextIcon",
  9987. // Disabled
  9988. "disabledDate",
  9989. "minDate",
  9990. "maxDate",
  9991. // Hover
  9992. "onHover"
  9993. ]);
  9994. return /* @__PURE__ */ d.createElement(ar.Provider, {
  9995. value: nt
  9996. }, /* @__PURE__ */ d.createElement("div", {
  9997. ref: T,
  9998. tabIndex: l,
  9999. className: xe(Ge, ie({}, "".concat(Ge, "-rtl"), o === "rtl"))
  10000. }, /* @__PURE__ */ d.createElement(He, _e({}, Ne, {
  10001. // Time
  10002. showTime: B,
  10003. prefixCls: I,
  10004. locale: U,
  10005. generateConfig: a,
  10006. onModeChange: ze,
  10007. pickerValue: se,
  10008. onPickerValueChange: function(he) {
  10009. ve(he, !0);
  10010. },
  10011. value: Y[0],
  10012. onSelect: Re,
  10013. values: Y,
  10014. cellRender: je,
  10015. hoverRangeValue: Be,
  10016. hoverValue: S
  10017. }))));
  10018. }
  10019. var po = /* @__PURE__ */ d.memo(/* @__PURE__ */ d.forwardRef(vy));
  10020. function my(e) {
  10021. var t = e.picker, n = e.multiplePanel, r = e.pickerValue, a = e.onPickerValueChange, o = e.needConfirm, i = e.onSubmit, u = e.range, l = e.hoverValue, c = d.useContext(Hn), s = c.prefixCls, v = c.generateConfig, C = d.useCallback(function(g, y) {
  10022. return K0(v, t, g, y);
  10023. }, [v, t]), p = d.useMemo(function() {
  10024. return C(r, 1);
  10025. }, [r, C]), m = function(y) {
  10026. a(C(y, -1));
  10027. }, b = {
  10028. onCellDblClick: function() {
  10029. o && i();
  10030. }
  10031. }, f = t === "time", h = re(re({}, e), {}, {
  10032. hoverValue: null,
  10033. hoverRangeValue: null,
  10034. hideHeader: f
  10035. });
  10036. return u ? h.hoverRangeValue = l : h.hoverValue = l, n ? /* @__PURE__ */ d.createElement("div", {
  10037. className: "".concat(s, "-panels")
  10038. }, /* @__PURE__ */ d.createElement(ar.Provider, {
  10039. value: re(re({}, b), {}, {
  10040. hideNext: !0
  10041. })
  10042. }, /* @__PURE__ */ d.createElement(po, h)), /* @__PURE__ */ d.createElement(ar.Provider, {
  10043. value: re(re({}, b), {}, {
  10044. hidePrev: !0
  10045. })
  10046. }, /* @__PURE__ */ d.createElement(po, _e({}, h, {
  10047. pickerValue: p,
  10048. onPickerValueChange: m
  10049. })))) : /* @__PURE__ */ d.createElement(ar.Provider, {
  10050. value: re({}, b)
  10051. }, /* @__PURE__ */ d.createElement(po, h));
  10052. }
  10053. function ss(e) {
  10054. return typeof e == "function" ? e() : e;
  10055. }
  10056. function py(e) {
  10057. var t = e.prefixCls, n = e.presets, r = e.onClick, a = e.onHover;
  10058. return n.length ? /* @__PURE__ */ d.createElement("div", {
  10059. className: "".concat(t, "-presets")
  10060. }, /* @__PURE__ */ d.createElement("ul", null, n.map(function(o, i) {
  10061. var u = o.label, l = o.value;
  10062. return /* @__PURE__ */ d.createElement("li", {
  10063. key: i,
  10064. onClick: function() {
  10065. r(ss(l));
  10066. },
  10067. onMouseEnter: function() {
  10068. a(ss(l));
  10069. },
  10070. onMouseLeave: function() {
  10071. a(null);
  10072. }
  10073. }, u);
  10074. }))) : null;
  10075. }
  10076. function hy(e) {
  10077. var t = e.panelRender, n = e.internalMode, r = e.picker, a = e.showNow, o = e.range, i = e.multiple, u = e.activeOffset, l = u === void 0 ? 0 : u, c = e.placement, s = e.presets, v = e.onPresetHover, C = e.onPresetSubmit, p = e.onFocus, m = e.onBlur, b = e.onPanelMouseDown, f = e.direction, h = e.value, g = e.onSelect, y = e.isInvalid, w = e.defaultOpenValue, E = e.onOk, S = e.onSubmit, x = d.useContext(Hn), R = x.prefixCls, k = "".concat(R, "-panel"), L = f === "rtl", O = d.useRef(null), N = d.useRef(null), F = d.useState(0), I = Z(F, 2), T = I[0], P = I[1], z = d.useState(0), _ = Z(z, 2), A = _[0], H = _[1], $ = function(te) {
  10078. te.offsetWidth && P(te.offsetWidth);
  10079. };
  10080. d.useEffect(function() {
  10081. if (o) {
  10082. var Y, te = ((Y = O.current) === null || Y === void 0 ? void 0 : Y.offsetWidth) || 0, Q = T - te;
  10083. l <= Q ? H(0) : H(l + te - T);
  10084. }
  10085. }, [T, l, o]);
  10086. function U(Y) {
  10087. return Y.filter(function(te) {
  10088. return te;
  10089. });
  10090. }
  10091. var G = d.useMemo(function() {
  10092. return U(Xr(h));
  10093. }, [h]), B = r === "time" && !G.length, ne = d.useMemo(function() {
  10094. return B ? U([w]) : G;
  10095. }, [B, G, w]), le = B ? w : G, ee = d.useMemo(function() {
  10096. return ne.length ? ne.some(function(Y) {
  10097. return y(Y);
  10098. }) : !0;
  10099. }, [ne, y]), V = function() {
  10100. B && g(w), E(), S();
  10101. }, X = /* @__PURE__ */ d.createElement("div", {
  10102. className: "".concat(R, "-panel-layout")
  10103. }, /* @__PURE__ */ d.createElement(py, {
  10104. prefixCls: R,
  10105. presets: s,
  10106. onClick: C,
  10107. onHover: v
  10108. }), /* @__PURE__ */ d.createElement("div", null, /* @__PURE__ */ d.createElement(my, _e({}, e, {
  10109. value: le
  10110. })), /* @__PURE__ */ d.createElement(ty, _e({}, e, {
  10111. showNow: i ? !1 : a,
  10112. invalid: ee,
  10113. onSubmit: V
  10114. }))));
  10115. t && (X = t(X));
  10116. var J = "".concat(k, "-container"), M = "marginLeft", D = "marginRight", j = /* @__PURE__ */ d.createElement("div", {
  10117. onMouseDown: b,
  10118. tabIndex: -1,
  10119. className: xe(
  10120. J,
  10121. // Used for Today Button style, safe to remove if no need
  10122. "".concat(R, "-").concat(n, "-panel-container")
  10123. ),
  10124. style: ie(ie({}, L ? D : M, A), L ? M : D, "auto"),
  10125. onFocus: p,
  10126. onBlur: m
  10127. }, X);
  10128. if (o) {
  10129. var W = Lu(c, L), K = R0(W, L);
  10130. j = /* @__PURE__ */ d.createElement("div", {
  10131. onMouseDown: b,
  10132. ref: N,
  10133. className: xe("".concat(R, "-range-wrapper"), "".concat(R, "-").concat(r, "-range-wrapper"))
  10134. }, /* @__PURE__ */ d.createElement("div", {
  10135. ref: O,
  10136. className: "".concat(R, "-range-arrow"),
  10137. style: ie({}, K, l)
  10138. }), /* @__PURE__ */ d.createElement(cr, {
  10139. onResize: $
  10140. }, j));
  10141. }
  10142. return j;
  10143. }
  10144. function gy(e, t) {
  10145. var n = e.format, r = e.maskFormat, a = e.generateConfig, o = e.locale, i = e.preserveInvalidOnBlur, u = e.inputReadOnly, l = e.required, c = e["aria-required"], s = e.onSubmit, v = e.onFocus, C = e.onBlur, p = e.onInputChange, m = e.onInvalid, b = e.open, f = e.onOpenChange, h = e.onKeyDown, g = e.onChange, y = e.activeHelp, w = e.name, E = e.autoComplete, S = e.id, x = e.value, R = e.invalid, k = e.placeholder, L = e.disabled, O = e.activeIndex, N = e.allHelp, F = e.picker, I = function(U, G) {
  10146. var B = a.locale.parse(o.locale, U, [G]);
  10147. return B && a.isValidate(B) ? B : null;
  10148. }, T = n[0], P = d.useCallback(function($) {
  10149. return Vt($, {
  10150. locale: o,
  10151. format: T,
  10152. generateConfig: a
  10153. });
  10154. }, [o, a, T]), z = d.useMemo(function() {
  10155. return x.map(P);
  10156. }, [x, P]), _ = d.useMemo(function() {
  10157. var $ = F === "time" ? 8 : 10, U = typeof T == "function" ? T(a.getNow()).length : T.length;
  10158. return Math.max($, U) + 2;
  10159. }, [T, F, a]), A = function(U) {
  10160. for (var G = 0; G < n.length; G += 1) {
  10161. var B = n[G];
  10162. if (typeof B == "string") {
  10163. var ne = I(U, B);
  10164. if (ne)
  10165. return ne;
  10166. }
  10167. }
  10168. return !1;
  10169. }, H = function(U) {
  10170. function G(le) {
  10171. return U !== void 0 ? le[U] : le;
  10172. }
  10173. var B = or(e, {
  10174. aria: !0,
  10175. data: !0
  10176. }), ne = re(re({}, B), {}, {
  10177. // ============== Shared ==============
  10178. format: r,
  10179. validateFormat: function(ee) {
  10180. return !!A(ee);
  10181. },
  10182. preserveInvalidOnBlur: i,
  10183. readOnly: u,
  10184. required: l,
  10185. "aria-required": c,
  10186. name: w,
  10187. autoComplete: E,
  10188. size: _,
  10189. // ============= By Index =============
  10190. id: G(S),
  10191. value: G(z) || "",
  10192. invalid: G(R),
  10193. placeholder: G(k),
  10194. active: O === U,
  10195. helped: N || y && O === U,
  10196. disabled: G(L),
  10197. onFocus: function(ee) {
  10198. v(ee, U);
  10199. },
  10200. onBlur: function(ee) {
  10201. C(ee, U);
  10202. },
  10203. onSubmit: s,
  10204. // Get validate text value
  10205. onChange: function(ee) {
  10206. p();
  10207. var V = A(ee);
  10208. if (V) {
  10209. m(!1, U), g(V, U);
  10210. return;
  10211. }
  10212. m(!!ee, U);
  10213. },
  10214. onHelp: function() {
  10215. f(!0, {
  10216. index: U
  10217. });
  10218. },
  10219. onKeyDown: function(ee) {
  10220. var V = !1;
  10221. if (h == null || h(ee, function() {
  10222. V = !0;
  10223. }), !ee.defaultPrevented && !V)
  10224. switch (ee.key) {
  10225. case "Escape":
  10226. f(!1, {
  10227. index: U
  10228. });
  10229. break;
  10230. case "Enter":
  10231. b || f(!0);
  10232. break;
  10233. }
  10234. }
  10235. }, t == null ? void 0 : t({
  10236. valueTexts: z
  10237. }));
  10238. return Object.keys(ne).forEach(function(le) {
  10239. ne[le] === void 0 && delete ne[le];
  10240. }), ne;
  10241. };
  10242. return [H, P];
  10243. }
  10244. var yy = ["onMouseEnter", "onMouseLeave"];
  10245. function by(e) {
  10246. return d.useMemo(function() {
  10247. return qo(e, yy);
  10248. }, [e]);
  10249. }
  10250. var Cy = ["icon", "type"], Sy = ["onClear"];
  10251. function zu(e) {
  10252. var t = e.icon, n = e.type, r = mt(e, Cy), a = d.useContext(Hn), o = a.prefixCls;
  10253. return t ? /* @__PURE__ */ d.createElement("span", _e({
  10254. className: "".concat(o, "-").concat(n)
  10255. }, r), t) : null;
  10256. }
  10257. function cs(e) {
  10258. var t = e.onClear, n = mt(e, Sy);
  10259. return /* @__PURE__ */ d.createElement(zu, _e({}, n, {
  10260. type: "clear",
  10261. role: "button",
  10262. onMouseDown: function(a) {
  10263. a.preventDefault();
  10264. },
  10265. onClick: function(a) {
  10266. a.stopPropagation(), t();
  10267. }
  10268. }));
  10269. }
  10270. var bi = ["YYYY", "MM", "DD", "HH", "mm", "ss", "SSS"], ds = "顧", wy = /* @__PURE__ */ function() {
  10271. function e(t) {
  10272. Rr(this, e), ie(this, "format", void 0), ie(this, "maskFormat", void 0), ie(this, "cells", void 0), ie(this, "maskCells", void 0), this.format = t;
  10273. var n = bi.map(function(u) {
  10274. return "(".concat(u, ")");
  10275. }).join("|"), r = new RegExp(n, "g");
  10276. this.maskFormat = t.replace(
  10277. r,
  10278. // Use Chinese character to avoid user use it in format
  10279. function(u) {
  10280. return ds.repeat(u.length);
  10281. }
  10282. );
  10283. var a = new RegExp("(".concat(bi.join("|"), ")")), o = (t.split(a) || []).filter(function(u) {
  10284. return u;
  10285. }), i = 0;
  10286. this.cells = o.map(function(u) {
  10287. var l = bi.includes(u), c = i, s = i + u.length;
  10288. return i = s, {
  10289. text: u,
  10290. mask: l,
  10291. start: c,
  10292. end: s
  10293. };
  10294. }), this.maskCells = this.cells.filter(function(u) {
  10295. return u.mask;
  10296. });
  10297. }
  10298. return Pr(e, [{
  10299. key: "getSelection",
  10300. value: function(n) {
  10301. var r = this.maskCells[n] || {}, a = r.start, o = r.end;
  10302. return [a || 0, o || 0];
  10303. }
  10304. /** Check given text match format */
  10305. }, {
  10306. key: "match",
  10307. value: function(n) {
  10308. for (var r = 0; r < this.maskFormat.length; r += 1) {
  10309. var a = this.maskFormat[r], o = n[r];
  10310. if (!o || a !== ds && a !== o)
  10311. return !1;
  10312. }
  10313. return !0;
  10314. }
  10315. /** Get mask cell count */
  10316. }, {
  10317. key: "size",
  10318. value: function() {
  10319. return this.maskCells.length;
  10320. }
  10321. }, {
  10322. key: "getMaskCellIndex",
  10323. value: function(n) {
  10324. for (var r = Number.MAX_SAFE_INTEGER, a = 0, o = 0; o < this.maskCells.length; o += 1) {
  10325. var i = this.maskCells[o], u = i.start, l = i.end;
  10326. if (n >= u && n <= l)
  10327. return o;
  10328. var c = Math.min(Math.abs(n - u), Math.abs(n - l));
  10329. c < r && (r = c, a = o);
  10330. }
  10331. return a;
  10332. }
  10333. }]), e;
  10334. }();
  10335. function xy(e) {
  10336. var t = {
  10337. YYYY: [0, 9999, (/* @__PURE__ */ new Date()).getFullYear()],
  10338. MM: [1, 12],
  10339. DD: [1, 31],
  10340. HH: [0, 23],
  10341. mm: [0, 59],
  10342. ss: [0, 59],
  10343. SSS: [0, 999]
  10344. };
  10345. return t[e];
  10346. }
  10347. var Ey = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"], Ry = /* @__PURE__ */ d.forwardRef(function(e, t) {
  10348. var n = e.active, r = e.showActiveCls, a = r === void 0 ? !0 : r, o = e.suffixIcon, i = e.format, u = e.validateFormat, l = e.onChange;
  10349. e.onInput;
  10350. var c = e.helped, s = e.onHelp, v = e.onSubmit, C = e.onKeyDown, p = e.preserveInvalidOnBlur, m = p === void 0 ? !1 : p, b = e.invalid, f = e.clearIcon, h = mt(e, Ey), g = e.value, y = e.onFocus, w = e.onBlur, E = e.onMouseUp, S = d.useContext(Hn), x = S.prefixCls, R = S.input, k = R === void 0 ? "input" : R, L = "".concat(x, "-input"), O = d.useState(!1), N = Z(O, 2), F = N[0], I = N[1], T = d.useState(g), P = Z(T, 2), z = P[0], _ = P[1], A = d.useState(""), H = Z(A, 2), $ = H[0], U = H[1], G = d.useState(null), B = Z(G, 2), ne = B[0], le = B[1], ee = d.useState(null), V = Z(ee, 2), X = V[0], J = V[1], M = z || "";
  10351. d.useEffect(function() {
  10352. _(g);
  10353. }, [g]);
  10354. var D = d.useRef(), j = d.useRef();
  10355. d.useImperativeHandle(t, function() {
  10356. return {
  10357. nativeElement: D.current,
  10358. inputElement: j.current,
  10359. focus: function(ce) {
  10360. j.current.focus(ce);
  10361. },
  10362. blur: function() {
  10363. j.current.blur();
  10364. }
  10365. };
  10366. });
  10367. var W = d.useMemo(function() {
  10368. return new wy(i || "");
  10369. }, [i]), K = d.useMemo(function() {
  10370. return c ? [0, 0] : W.getSelection(ne);
  10371. }, [W, ne, c]), Y = Z(K, 2), te = Y[0], Q = Y[1], ae = function(ce) {
  10372. ce && ce !== i && ce !== g && s();
  10373. }, ue = Ct(function(Ne) {
  10374. u(Ne) && l(Ne), _(Ne), ae(Ne);
  10375. }), se = function(ce) {
  10376. if (!i) {
  10377. var he = ce.target.value;
  10378. ae(he), _(he), l(he);
  10379. }
  10380. }, pe = function(ce) {
  10381. var he = ce.clipboardData.getData("text");
  10382. u(he) && ue(he);
  10383. }, oe = d.useRef(!1), ve = function() {
  10384. oe.current = !0;
  10385. }, ze = function(ce) {
  10386. var he = ce.target, Ve = he.selectionStart, de = W.getMaskCellIndex(Ve);
  10387. le(de), J({}), E == null || E(ce), oe.current = !1;
  10388. }, Re = function(ce) {
  10389. I(!0), le(0), U(""), y(ce);
  10390. }, Be = function(ce) {
  10391. w(ce);
  10392. }, je = function(ce) {
  10393. I(!1), Be(ce);
  10394. };
  10395. ju(n, function() {
  10396. !n && !m && _(g);
  10397. });
  10398. var He = function(ce) {
  10399. ce.key === "Enter" && u(M) && v(), C == null || C(ce);
  10400. }, Ye = function(ce) {
  10401. He(ce);
  10402. var he = ce.key, Ve = null, de = null, be = Q - te, Xe = i.slice(te, Q), it = function(ke) {
  10403. le(function(Te) {
  10404. var Ke = Te + ke;
  10405. return Ke = Math.max(Ke, 0), Ke = Math.min(Ke, W.size() - 1), Ke;
  10406. });
  10407. }, tt = function(ke) {
  10408. var Te = xy(Xe), Ke = Z(Te, 3), De = Ke[0], we = Ke[1], ye = Ke[2], ut = M.slice(te, Q), yt = Number(ut);
  10409. if (isNaN(yt))
  10410. return String(ye || (ke > 0 ? De : we));
  10411. var Ie = yt + ke, Oe = we - De + 1;
  10412. return String(De + (Oe + Ie - De) % Oe);
  10413. };
  10414. switch (he) {
  10415. // =============== Remove ===============
  10416. case "Backspace":
  10417. case "Delete":
  10418. Ve = "", de = Xe;
  10419. break;
  10420. // =============== Arrows ===============
  10421. // Left key
  10422. case "ArrowLeft":
  10423. Ve = "", it(-1);
  10424. break;
  10425. // Right key
  10426. case "ArrowRight":
  10427. Ve = "", it(1);
  10428. break;
  10429. // Up key
  10430. case "ArrowUp":
  10431. Ve = "", de = tt(1);
  10432. break;
  10433. // Down key
  10434. case "ArrowDown":
  10435. Ve = "", de = tt(-1);
  10436. break;
  10437. // =============== Number ===============
  10438. default:
  10439. isNaN(Number(he)) || (Ve = $ + he, de = Ve);
  10440. break;
  10441. }
  10442. if (Ve !== null && (U(Ve), Ve.length >= be && (it(1), U(""))), de !== null) {
  10443. var $e = (
  10444. // before
  10445. M.slice(0, te) + // replace
  10446. Tu(de, be) + // after
  10447. M.slice(Q)
  10448. );
  10449. ue($e.slice(0, i.length));
  10450. }
  10451. J({});
  10452. }, nt = d.useRef();
  10453. St(function() {
  10454. if (!(!F || !i || oe.current)) {
  10455. if (!W.match(M)) {
  10456. ue(i);
  10457. return;
  10458. }
  10459. return j.current.setSelectionRange(te, Q), nt.current = st(function() {
  10460. j.current.setSelectionRange(te, Q);
  10461. }), function() {
  10462. st.cancel(nt.current);
  10463. };
  10464. }
  10465. }, [W, i, F, M, ne, te, Q, X, ue]);
  10466. var Ge = i ? {
  10467. onFocus: Re,
  10468. onBlur: je,
  10469. onKeyDown: Ye,
  10470. onMouseDown: ve,
  10471. onMouseUp: ze,
  10472. onPaste: pe
  10473. } : {};
  10474. return /* @__PURE__ */ d.createElement("div", {
  10475. ref: D,
  10476. className: xe(L, ie(ie({}, "".concat(L, "-active"), n && a), "".concat(L, "-placeholder"), c))
  10477. }, /* @__PURE__ */ d.createElement(k, _e({
  10478. ref: j,
  10479. "aria-invalid": b,
  10480. autoComplete: "off"
  10481. }, h, {
  10482. onKeyDown: He,
  10483. onBlur: Be
  10484. // Replace with format
  10485. }, Ge, {
  10486. // Value
  10487. value: M,
  10488. onChange: se
  10489. })), /* @__PURE__ */ d.createElement(zu, {
  10490. type: "suffix",
  10491. icon: o
  10492. }), f);
  10493. }), Py = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], Or = void 0;
  10494. function My(e, t) {
  10495. var n = e.prefixCls, r = e.invalidate, a = e.item, o = e.renderItem, i = e.responsive, u = e.responsiveDisabled, l = e.registerSize, c = e.itemKey, s = e.className, v = e.style, C = e.children, p = e.display, m = e.order, b = e.component, f = b === void 0 ? "div" : b, h = mt(e, Py), g = i && !p;
  10496. function y(R) {
  10497. l(c, R);
  10498. }
  10499. d.useEffect(function() {
  10500. return function() {
  10501. y(null);
  10502. };
  10503. }, []);
  10504. var w = o && a !== Or ? o(a) : C, E;
  10505. r || (E = {
  10506. opacity: g ? 0 : 1,
  10507. height: g ? 0 : Or,
  10508. overflowY: g ? "hidden" : Or,
  10509. order: i ? m : Or,
  10510. pointerEvents: g ? "none" : Or,
  10511. position: g ? "absolute" : Or
  10512. });
  10513. var S = {};
  10514. g && (S["aria-hidden"] = !0);
  10515. var x = /* @__PURE__ */ d.createElement(f, _e({
  10516. className: xe(!r && n, s),
  10517. style: re(re({}, E), v)
  10518. }, S, h, {
  10519. ref: t
  10520. }), w);
  10521. return i && (x = /* @__PURE__ */ d.createElement(cr, {
  10522. onResize: function(k) {
  10523. var L = k.offsetWidth;
  10524. y(L);
  10525. },
  10526. disabled: u
  10527. }, x)), x;
  10528. }
  10529. var ka = /* @__PURE__ */ d.forwardRef(My);
  10530. ka.displayName = "Item";
  10531. function ky(e) {
  10532. if (typeof MessageChannel > "u")
  10533. st(e);
  10534. else {
  10535. var t = new MessageChannel();
  10536. t.port1.onmessage = function() {
  10537. return e();
  10538. }, t.port2.postMessage(void 0);
  10539. }
  10540. }
  10541. function Dy() {
  10542. var e = d.useRef(null), t = function(r) {
  10543. e.current || (e.current = [], ky(function() {
  10544. lv(function() {
  10545. e.current.forEach(function(a) {
  10546. a();
  10547. }), e.current = null;
  10548. });
  10549. })), e.current.push(r);
  10550. };
  10551. return t;
  10552. }
  10553. function ca(e, t) {
  10554. var n = d.useState(t), r = Z(n, 2), a = r[0], o = r[1], i = Ct(function(u) {
  10555. e(function() {
  10556. o(u);
  10557. });
  10558. });
  10559. return [a, i];
  10560. }
  10561. var To = /* @__PURE__ */ me.createContext(null), Ny = ["component"], Iy = ["className"], Oy = ["className"], _y = function(t, n) {
  10562. var r = d.useContext(To);
  10563. if (!r) {
  10564. var a = t.component, o = a === void 0 ? "div" : a, i = mt(t, Ny);
  10565. return /* @__PURE__ */ d.createElement(o, _e({}, i, {
  10566. ref: n
  10567. }));
  10568. }
  10569. var u = r.className, l = mt(r, Iy), c = t.className, s = mt(t, Oy);
  10570. return /* @__PURE__ */ d.createElement(To.Provider, {
  10571. value: null
  10572. }, /* @__PURE__ */ d.createElement(ka, _e({
  10573. ref: n,
  10574. className: xe(u, c)
  10575. }, l, s)));
  10576. }, vf = /* @__PURE__ */ d.forwardRef(_y);
  10577. vf.displayName = "RawItem";
  10578. var Ly = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"], mf = "responsive", pf = "invalidate";
  10579. function Ty(e) {
  10580. return "+ ".concat(e.length, " ...");
  10581. }
  10582. function $y(e, t) {
  10583. var n = e.prefixCls, r = n === void 0 ? "rc-overflow" : n, a = e.data, o = a === void 0 ? [] : a, i = e.renderItem, u = e.renderRawItem, l = e.itemKey, c = e.itemWidth, s = c === void 0 ? 10 : c, v = e.ssr, C = e.style, p = e.className, m = e.maxCount, b = e.renderRest, f = e.renderRawRest, h = e.suffix, g = e.component, y = g === void 0 ? "div" : g, w = e.itemComponent, E = e.onVisibleChange, S = mt(e, Ly), x = v === "full", R = Dy(), k = ca(R, null), L = Z(k, 2), O = L[0], N = L[1], F = O || 0, I = ca(R, /* @__PURE__ */ new Map()), T = Z(I, 2), P = T[0], z = T[1], _ = ca(R, 0), A = Z(_, 2), H = A[0], $ = A[1], U = ca(R, 0), G = Z(U, 2), B = G[0], ne = G[1], le = ca(R, 0), ee = Z(le, 2), V = ee[0], X = ee[1], J = rt(null), M = Z(J, 2), D = M[0], j = M[1], W = rt(null), K = Z(W, 2), Y = K[0], te = K[1], Q = d.useMemo(function() {
  10584. return Y === null && x ? Number.MAX_SAFE_INTEGER : Y || 0;
  10585. }, [Y, O]), ae = rt(!1), ue = Z(ae, 2), se = ue[0], pe = ue[1], oe = "".concat(r, "-item"), ve = Math.max(H, B), ze = m === mf, Re = o.length && ze, Be = m === pf, je = Re || typeof m == "number" && o.length > m, He = Ht(function() {
  10586. var De = o;
  10587. return Re ? O === null && x ? De = o : De = o.slice(0, Math.min(o.length, F / s)) : typeof m == "number" && (De = o.slice(0, m)), De;
  10588. }, [o, s, O, m, Re]), Ye = Ht(function() {
  10589. return Re ? o.slice(Q + 1) : o.slice(He.length);
  10590. }, [o, He, Re, Q]), nt = Ot(function(De, we) {
  10591. var ye;
  10592. return typeof l == "function" ? l(De) : (ye = l && (De == null ? void 0 : De[l])) !== null && ye !== void 0 ? ye : we;
  10593. }, [l]), Ge = Ot(i || function(De) {
  10594. return De;
  10595. }, [i]);
  10596. function Ne(De, we, ye) {
  10597. Y === De && (we === void 0 || we === D) || (te(De), ye || (pe(De < o.length - 1), E == null || E(De)), we !== void 0 && j(we));
  10598. }
  10599. function ce(De, we) {
  10600. N(we.clientWidth);
  10601. }
  10602. function he(De, we) {
  10603. z(function(ye) {
  10604. var ut = new Map(ye);
  10605. return we === null ? ut.delete(De) : ut.set(De, we), ut;
  10606. });
  10607. }
  10608. function Ve(De, we) {
  10609. ne(we), $(B);
  10610. }
  10611. function de(De, we) {
  10612. X(we);
  10613. }
  10614. function be(De) {
  10615. return P.get(nt(He[De], De));
  10616. }
  10617. St(function() {
  10618. if (F && typeof ve == "number" && He) {
  10619. var De = V, we = He.length, ye = we - 1;
  10620. if (!we) {
  10621. Ne(0, null);
  10622. return;
  10623. }
  10624. for (var ut = 0; ut < we; ut += 1) {
  10625. var yt = be(ut);
  10626. if (x && (yt = yt || 0), yt === void 0) {
  10627. Ne(ut - 1, void 0, !0);
  10628. break;
  10629. }
  10630. if (De += yt, // Only one means `totalWidth` is the final width
  10631. ye === 0 && De <= F || // Last two width will be the final width
  10632. ut === ye - 1 && De + be(ye) <= F) {
  10633. Ne(ye, null);
  10634. break;
  10635. } else if (De + ve > F) {
  10636. Ne(ut - 1, De - yt - V + B);
  10637. break;
  10638. }
  10639. }
  10640. h && be(0) + V > F && j(null);
  10641. }
  10642. }, [F, P, B, V, nt, He]);
  10643. var Xe = se && !!Ye.length, it = {};
  10644. D !== null && Re && (it = {
  10645. position: "absolute",
  10646. left: D,
  10647. top: 0
  10648. });
  10649. var tt = {
  10650. prefixCls: oe,
  10651. responsive: Re,
  10652. component: w,
  10653. invalidate: Be
  10654. }, $e = u ? function(De, we) {
  10655. var ye = nt(De, we);
  10656. return /* @__PURE__ */ d.createElement(To.Provider, {
  10657. key: ye,
  10658. value: re(re({}, tt), {}, {
  10659. order: we,
  10660. item: De,
  10661. itemKey: ye,
  10662. registerSize: he,
  10663. display: we <= Q
  10664. })
  10665. }, u(De, we));
  10666. } : function(De, we) {
  10667. var ye = nt(De, we);
  10668. return /* @__PURE__ */ d.createElement(ka, _e({}, tt, {
  10669. order: we,
  10670. key: ye,
  10671. item: De,
  10672. renderItem: Ge,
  10673. itemKey: ye,
  10674. registerSize: he,
  10675. display: we <= Q
  10676. }));
  10677. }, ge, ke = {
  10678. order: Xe ? Q : Number.MAX_SAFE_INTEGER,
  10679. className: "".concat(oe, "-rest"),
  10680. registerSize: Ve,
  10681. display: Xe
  10682. };
  10683. if (f)
  10684. f && (ge = /* @__PURE__ */ d.createElement(To.Provider, {
  10685. value: re(re({}, tt), ke)
  10686. }, f(Ye)));
  10687. else {
  10688. var Te = b || Ty;
  10689. ge = /* @__PURE__ */ d.createElement(ka, _e({}, tt, ke), typeof Te == "function" ? Te(Ye) : Te);
  10690. }
  10691. var Ke = /* @__PURE__ */ d.createElement(y, _e({
  10692. className: xe(!Be && r, p),
  10693. style: C,
  10694. ref: t
  10695. }, S), He.map($e), je ? ge : null, h && /* @__PURE__ */ d.createElement(ka, _e({}, tt, {
  10696. responsive: ze,
  10697. responsiveDisabled: !Re,
  10698. order: Q,
  10699. className: "".concat(oe, "-suffix"),
  10700. registerSize: de,
  10701. display: !0,
  10702. style: it
  10703. }), h));
  10704. return ze && (Ke = /* @__PURE__ */ d.createElement(cr, {
  10705. onResize: ce,
  10706. disabled: !Re
  10707. }, Ke)), Ke;
  10708. }
  10709. var kn = /* @__PURE__ */ d.forwardRef($y);
  10710. kn.displayName = "Overflow";
  10711. kn.Item = vf;
  10712. kn.RESPONSIVE = mf;
  10713. kn.INVALIDATE = pf;
  10714. function Ay(e) {
  10715. var t = e.prefixCls, n = e.value, r = e.onRemove, a = e.removeIcon, o = a === void 0 ? "×" : a, i = e.formatDate, u = e.disabled, l = e.maxTagCount, c = e.placeholder, s = "".concat(t, "-selector"), v = "".concat(t, "-selection"), C = "".concat(v, "-overflow");
  10716. function p(f, h) {
  10717. return /* @__PURE__ */ d.createElement("span", {
  10718. className: xe("".concat(v, "-item")),
  10719. title: typeof f == "string" ? f : null
  10720. }, /* @__PURE__ */ d.createElement("span", {
  10721. className: "".concat(v, "-item-content")
  10722. }, f), !u && h && /* @__PURE__ */ d.createElement("span", {
  10723. onMouseDown: function(y) {
  10724. y.preventDefault();
  10725. },
  10726. onClick: h,
  10727. className: "".concat(v, "-item-remove")
  10728. }, o));
  10729. }
  10730. function m(f) {
  10731. var h = i(f), g = function(w) {
  10732. w && w.stopPropagation(), r(f);
  10733. };
  10734. return p(h, g);
  10735. }
  10736. function b(f) {
  10737. var h = "+ ".concat(f.length, " ...");
  10738. return p(h);
  10739. }
  10740. return /* @__PURE__ */ d.createElement("div", {
  10741. className: s
  10742. }, /* @__PURE__ */ d.createElement(kn, {
  10743. prefixCls: C,
  10744. data: n,
  10745. renderItem: m,
  10746. renderRest: b,
  10747. itemKey: function(h) {
  10748. return i(h);
  10749. },
  10750. maxCount: l
  10751. }), !n.length && /* @__PURE__ */ d.createElement("span", {
  10752. className: "".concat(t, "-selection-placeholder")
  10753. }, c));
  10754. }
  10755. var jy = ["id", "open", "prefix", "clearIcon", "suffixIcon", "activeHelp", "allHelp", "focused", "onFocus", "onBlur", "onKeyDown", "locale", "generateConfig", "placeholder", "className", "style", "onClick", "onClear", "internalPicker", "value", "onChange", "onSubmit", "onInputChange", "multiple", "maxTagCount", "format", "maskFormat", "preserveInvalidOnBlur", "onInvalid", "disabled", "invalid", "inputReadOnly", "direction", "onOpenChange", "onMouseDown", "required", "aria-required", "autoFocus", "tabIndex", "removeIcon"];
  10756. function Fy(e, t) {
  10757. e.id;
  10758. var n = e.open, r = e.prefix, a = e.clearIcon, o = e.suffixIcon;
  10759. e.activeHelp, e.allHelp;
  10760. var i = e.focused;
  10761. e.onFocus, e.onBlur, e.onKeyDown;
  10762. var u = e.locale, l = e.generateConfig, c = e.placeholder, s = e.className, v = e.style, C = e.onClick, p = e.onClear, m = e.internalPicker, b = e.value, f = e.onChange, h = e.onSubmit;
  10763. e.onInputChange;
  10764. var g = e.multiple, y = e.maxTagCount;
  10765. e.format, e.maskFormat, e.preserveInvalidOnBlur, e.onInvalid;
  10766. var w = e.disabled, E = e.invalid;
  10767. e.inputReadOnly;
  10768. var S = e.direction;
  10769. e.onOpenChange;
  10770. var x = e.onMouseDown;
  10771. e.required, e["aria-required"];
  10772. var R = e.autoFocus, k = e.tabIndex, L = e.removeIcon, O = mt(e, jy), N = S === "rtl", F = d.useContext(Hn), I = F.prefixCls, T = d.useRef(), P = d.useRef();
  10773. d.useImperativeHandle(t, function() {
  10774. return {
  10775. nativeElement: T.current,
  10776. focus: function(ee) {
  10777. var V;
  10778. (V = P.current) === null || V === void 0 || V.focus(ee);
  10779. },
  10780. blur: function() {
  10781. var ee;
  10782. (ee = P.current) === null || ee === void 0 || ee.blur();
  10783. }
  10784. };
  10785. });
  10786. var z = by(O), _ = function(ee) {
  10787. f([ee]);
  10788. }, A = function(ee) {
  10789. var V = b.filter(function(X) {
  10790. return X && !ln(l, u, X, ee, m);
  10791. });
  10792. f(V), n || h();
  10793. }, H = gy(re(re({}, e), {}, {
  10794. onChange: _
  10795. }), function(le) {
  10796. var ee = le.valueTexts;
  10797. return {
  10798. value: ee[0] || "",
  10799. active: i
  10800. };
  10801. }), $ = Z(H, 2), U = $[0], G = $[1], B = !!(a && b.length && !w), ne = g ? /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(Ay, {
  10802. prefixCls: I,
  10803. value: b,
  10804. onRemove: A,
  10805. formatDate: G,
  10806. maxTagCount: y,
  10807. disabled: w,
  10808. removeIcon: L,
  10809. placeholder: c
  10810. }), /* @__PURE__ */ d.createElement("input", {
  10811. className: "".concat(I, "-multiple-input"),
  10812. value: b.map(G).join(","),
  10813. ref: P,
  10814. readOnly: !0,
  10815. autoFocus: R,
  10816. tabIndex: k
  10817. }), /* @__PURE__ */ d.createElement(zu, {
  10818. type: "suffix",
  10819. icon: o
  10820. }), B && /* @__PURE__ */ d.createElement(cs, {
  10821. icon: a,
  10822. onClear: p
  10823. })) : /* @__PURE__ */ d.createElement(Ry, _e({
  10824. ref: P
  10825. }, U(), {
  10826. autoFocus: R,
  10827. tabIndex: k,
  10828. suffixIcon: o,
  10829. clearIcon: B && /* @__PURE__ */ d.createElement(cs, {
  10830. icon: a,
  10831. onClear: p
  10832. }),
  10833. showActiveCls: !1
  10834. }));
  10835. return /* @__PURE__ */ d.createElement("div", _e({}, z, {
  10836. className: xe(I, ie(ie(ie(ie(ie({}, "".concat(I, "-multiple"), g), "".concat(I, "-focused"), i), "".concat(I, "-disabled"), w), "".concat(I, "-invalid"), E), "".concat(I, "-rtl"), N), s),
  10837. style: v,
  10838. ref: T,
  10839. onClick: C,
  10840. onMouseDown: function(ee) {
  10841. var V, X = ee.target;
  10842. X !== ((V = P.current) === null || V === void 0 ? void 0 : V.inputElement) && ee.preventDefault(), x == null || x(ee);
  10843. }
  10844. }), r && /* @__PURE__ */ d.createElement("div", {
  10845. className: "".concat(I, "-prefix")
  10846. }, r), ne);
  10847. }
  10848. var zy = /* @__PURE__ */ d.forwardRef(Fy);
  10849. function Hy(e, t) {
  10850. var n = H0(e), r = Z(n, 6), a = r[0], o = r[1], i = r[2], u = r[3], l = r[4], c = r[5], s = a, v = s.prefixCls, C = s.styles, p = s.classNames, m = s.order, b = s.defaultValue, f = s.value, h = s.needConfirm, g = s.onChange, y = s.onKeyDown, w = s.disabled, E = s.disabledDate, S = s.minDate, x = s.maxDate, R = s.defaultOpen, k = s.open, L = s.onOpenChange, O = s.locale, N = s.generateConfig, F = s.picker, I = s.showNow, T = s.showToday, P = s.showTime, z = s.mode, _ = s.onPanelChange, A = s.onCalendarChange, H = s.onOk, $ = s.multiple, U = s.defaultPickerValue, G = s.pickerValue, B = s.onPickerValueChange, ne = s.inputReadOnly, le = s.suffixIcon, ee = s.removeIcon, V = s.onFocus, X = s.onBlur, J = s.presets, M = s.components, D = s.cellRender, j = s.dateRender, W = s.monthCellRender, K = s.onClick, Y = B0(t);
  10851. function te(Se) {
  10852. return Se === null ? null : $ ? Se : Se[0];
  10853. }
  10854. var Q = df(N, O, o), ae = W0(k, R, [w], L), ue = Z(ae, 2), se = ue[0], pe = ue[1], oe = function(Me, gt, Rt) {
  10855. if (A) {
  10856. var Kt = re({}, Rt);
  10857. delete Kt.range, A(te(Me), te(gt), Kt);
  10858. }
  10859. }, ve = function(Me) {
  10860. H == null || H(te(Me));
  10861. }, ze = Z0(N, O, u, !1, m, b, f, oe, ve), Re = Z(ze, 5), Be = Re[0], je = Re[1], He = Re[2], Ye = Re[3], nt = Re[4], Ge = He(), Ne = q0([w]), ce = Z(Ne, 4), he = ce[0], Ve = ce[1], de = ce[2], be = ce[3], Xe = function(Me) {
  10862. Ve(!0), V == null || V(Me, {});
  10863. }, it = function(Me) {
  10864. Ve(!1), X == null || X(Me, {});
  10865. }, tt = Gt(F, {
  10866. value: z
  10867. }), $e = Z(tt, 2), ge = $e[0], ke = $e[1], Te = ge === "date" && P ? "datetime" : ge, Ke = J0(F, ge, I, T), De = g && function(Se, Me) {
  10868. g(te(Se), te(Me));
  10869. }, we = Q0(
  10870. re(re({}, a), {}, {
  10871. onChange: De
  10872. }),
  10873. Be,
  10874. je,
  10875. He,
  10876. Ye,
  10877. [],
  10878. //disabled,
  10879. u,
  10880. he,
  10881. se,
  10882. c
  10883. ), ye = Z(we, 2), ut = ye[1], yt = D0(Ge, c), Ie = Z(yt, 2), Oe = Ie[0], We = Ie[1], Ue = d.useMemo(function() {
  10884. return Oe.some(function(Se) {
  10885. return Se;
  10886. });
  10887. }, [Oe]), Ze = function(Me, gt) {
  10888. if (B) {
  10889. var Rt = re(re({}, gt), {}, {
  10890. mode: gt.mode[0]
  10891. });
  10892. delete Rt.range, B(Me[0], Rt);
  10893. }
  10894. }, at = Y0(
  10895. N,
  10896. O,
  10897. Ge,
  10898. [ge],
  10899. se,
  10900. be,
  10901. o,
  10902. !1,
  10903. // multiplePanel,
  10904. U,
  10905. G,
  10906. Xr(P == null ? void 0 : P.defaultOpenValue),
  10907. Ze,
  10908. S,
  10909. x
  10910. ), Lt = Z(at, 2), Et = Lt[0], wt = Lt[1], pt = Ct(function(Se, Me, gt) {
  10911. if (ke(Me), _ && gt !== !1) {
  10912. var Rt = Se || Ge[Ge.length - 1];
  10913. _(Rt, Me);
  10914. }
  10915. }), xt = function() {
  10916. ut(He()), pe(!1, {
  10917. force: !0
  10918. });
  10919. }, Ft = function(Me) {
  10920. !w && !Y.current.nativeElement.contains(document.activeElement) && Y.current.focus(), pe(!0), K == null || K(Me);
  10921. }, Mt = function() {
  10922. ut(null), pe(!1, {
  10923. force: !0
  10924. });
  10925. }, Qt = d.useState(null), Le = Z(Qt, 2), Pe = Le[0], qe = Le[1], vt = d.useState(null), ht = Z(vt, 2), Dt = ht[0], Nt = ht[1], an = d.useMemo(function() {
  10926. var Se = [Dt].concat(ft(Ge)).filter(function(Me) {
  10927. return Me;
  10928. });
  10929. return $ ? Se : Se.slice(0, 1);
  10930. }, [Ge, Dt, $]), vn = d.useMemo(function() {
  10931. return !$ && Dt ? [Dt] : Ge.filter(function(Se) {
  10932. return Se;
  10933. });
  10934. }, [Ge, Dt, $]);
  10935. d.useEffect(function() {
  10936. se || Nt(null);
  10937. }, [se]);
  10938. var on = U0(J), Wt = function(Me) {
  10939. Nt(Me), qe("preset");
  10940. }, mn = function(Me) {
  10941. var gt = $ ? Q(He(), Me) : [Me], Rt = ut(gt);
  10942. Rt && !$ && pe(!1, {
  10943. force: !0
  10944. });
  10945. }, Jt = function(Me) {
  10946. mn(Me);
  10947. }, en = function(Me) {
  10948. Nt(Me), qe("cell");
  10949. }, On = function(Me) {
  10950. pe(!0), Xe(Me);
  10951. }, wn = function(Me) {
  10952. de("panel");
  10953. var gt = $ ? Q(He(), Me) : [Me];
  10954. Ye(gt), !h && !i && o === Te && xt();
  10955. }, Bt = function() {
  10956. pe(!1);
  10957. }, Ut = Qd(D, j, W), pn = d.useMemo(function() {
  10958. var Se = or(a, !1), Me = Er(a, [].concat(ft(Object.keys(Se)), ["onChange", "onCalendarChange", "style", "className", "onPanelChange"]));
  10959. return re(re({}, Me), {}, {
  10960. multiple: a.multiple
  10961. });
  10962. }, [a]), hn = /* @__PURE__ */ d.createElement(hy, _e({}, pn, {
  10963. showNow: Ke,
  10964. showTime: P,
  10965. disabledDate: E,
  10966. onFocus: On,
  10967. onBlur: it,
  10968. picker: F,
  10969. mode: ge,
  10970. internalMode: Te,
  10971. onPanelChange: pt,
  10972. format: l,
  10973. value: Ge,
  10974. isInvalid: c,
  10975. onChange: null,
  10976. onSelect: wn,
  10977. pickerValue: Et,
  10978. defaultOpenValue: P == null ? void 0 : P.defaultOpenValue,
  10979. onPickerValueChange: wt,
  10980. hoverValue: an,
  10981. onHover: en,
  10982. needConfirm: h,
  10983. onSubmit: xt,
  10984. onOk: nt,
  10985. presets: on,
  10986. onPresetHover: Wt,
  10987. onPresetSubmit: mn,
  10988. onNow: Jt,
  10989. cellRender: Ut
  10990. })), qt = function(Me) {
  10991. Ye(Me);
  10992. }, xn = function() {
  10993. de("input");
  10994. }, Fe = function(Me) {
  10995. de("input"), pe(!0, {
  10996. inherit: !0
  10997. }), Xe(Me);
  10998. }, Ee = function(Me) {
  10999. pe(!1), it(Me);
  11000. }, Je = function(Me, gt) {
  11001. Me.key === "Tab" && xt(), y == null || y(Me, gt);
  11002. }, ct = d.useMemo(function() {
  11003. return {
  11004. prefixCls: v,
  11005. locale: O,
  11006. generateConfig: N,
  11007. button: M.button,
  11008. input: M.input
  11009. };
  11010. }, [v, O, N, M.button, M.input]);
  11011. return St(function() {
  11012. se && be !== void 0 && pt(null, F, !1);
  11013. }, [se, be, F]), St(function() {
  11014. var Se = de();
  11015. !se && Se === "input" && (pe(!1), xt()), !se && i && !h && Se === "panel" && (pe(!0), xt());
  11016. }, [se]), /* @__PURE__ */ d.createElement(Hn.Provider, {
  11017. value: ct
  11018. }, /* @__PURE__ */ d.createElement(M0, _e({}, k0(a), {
  11019. popupElement: hn,
  11020. popupStyle: C.popup,
  11021. popupClassName: p.popup,
  11022. visible: se,
  11023. onClose: Bt
  11024. }), /* @__PURE__ */ d.createElement(
  11025. zy,
  11026. _e({}, a, {
  11027. // Ref
  11028. ref: Y,
  11029. suffixIcon: le,
  11030. removeIcon: ee,
  11031. activeHelp: !!Dt,
  11032. allHelp: !!Dt && Pe === "preset",
  11033. focused: he,
  11034. onFocus: Fe,
  11035. onBlur: Ee,
  11036. onKeyDown: Je,
  11037. onSubmit: xt,
  11038. value: vn,
  11039. maskFormat: l,
  11040. onChange: qt,
  11041. onInputChange: xn,
  11042. internalPicker: o,
  11043. format: u,
  11044. inputReadOnly: ne,
  11045. disabled: w,
  11046. open: se,
  11047. onOpenChange: pe,
  11048. onClick: Ft,
  11049. onClear: Mt,
  11050. invalid: Ue,
  11051. onInvalid: function(Me) {
  11052. We(Me, 0);
  11053. }
  11054. })
  11055. )));
  11056. }
  11057. var Vy = /* @__PURE__ */ d.forwardRef(Hy), da = {}, Ci = { exports: {} }, fs;
  11058. function Wy() {
  11059. return fs || (fs = 1, function(e) {
  11060. function t(n) {
  11061. return n && n.__esModule ? n : {
  11062. default: n
  11063. };
  11064. }
  11065. e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
  11066. }(Ci)), Ci.exports;
  11067. }
  11068. var ho = { exports: {} }, By = ho.exports, vs;
  11069. function Uy() {
  11070. return vs || (vs = 1, function(e, t) {
  11071. (function(n, r) {
  11072. e.exports = r();
  11073. })(By, function() {
  11074. var n = 1e3, r = 6e4, a = 36e5, o = "millisecond", i = "second", u = "minute", l = "hour", c = "day", s = "week", v = "month", C = "quarter", p = "year", m = "date", b = "Invalid Date", f = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
  11075. var T = ["th", "st", "nd", "rd"], P = I % 100;
  11076. return "[" + I + (T[(P - 20) % 10] || T[P] || T[0]) + "]";
  11077. } }, y = function(I, T, P) {
  11078. var z = String(I);
  11079. return !z || z.length >= T ? I : "" + Array(T + 1 - z.length).join(P) + I;
  11080. }, w = { s: y, z: function(I) {
  11081. var T = -I.utcOffset(), P = Math.abs(T), z = Math.floor(P / 60), _ = P % 60;
  11082. return (T <= 0 ? "+" : "-") + y(z, 2, "0") + ":" + y(_, 2, "0");
  11083. }, m: function I(T, P) {
  11084. if (T.date() < P.date()) return -I(P, T);
  11085. var z = 12 * (P.year() - T.year()) + (P.month() - T.month()), _ = T.clone().add(z, v), A = P - _ < 0, H = T.clone().add(z + (A ? -1 : 1), v);
  11086. return +(-(z + (P - _) / (A ? _ - H : H - _)) || 0);
  11087. }, a: function(I) {
  11088. return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
  11089. }, p: function(I) {
  11090. return { M: v, y: p, w: s, d: c, D: m, h: l, m: u, s: i, ms: o, Q: C }[I] || String(I || "").toLowerCase().replace(/s$/, "");
  11091. }, u: function(I) {
  11092. return I === void 0;
  11093. } }, E = "en", S = {};
  11094. S[E] = g;
  11095. var x = "$isDayjsObject", R = function(I) {
  11096. return I instanceof N || !(!I || !I[x]);
  11097. }, k = function I(T, P, z) {
  11098. var _;
  11099. if (!T) return E;
  11100. if (typeof T == "string") {
  11101. var A = T.toLowerCase();
  11102. S[A] && (_ = A), P && (S[A] = P, _ = A);
  11103. var H = T.split("-");
  11104. if (!_ && H.length > 1) return I(H[0]);
  11105. } else {
  11106. var $ = T.name;
  11107. S[$] = T, _ = $;
  11108. }
  11109. return !z && _ && (E = _), _ || !z && E;
  11110. }, L = function(I, T) {
  11111. if (R(I)) return I.clone();
  11112. var P = typeof T == "object" ? T : {};
  11113. return P.date = I, P.args = arguments, new N(P);
  11114. }, O = w;
  11115. O.l = k, O.i = R, O.w = function(I, T) {
  11116. return L(I, { locale: T.$L, utc: T.$u, x: T.$x, $offset: T.$offset });
  11117. };
  11118. var N = function() {
  11119. function I(P) {
  11120. this.$L = k(P.locale, null, !0), this.parse(P), this.$x = this.$x || P.x || {}, this[x] = !0;
  11121. }
  11122. var T = I.prototype;
  11123. return T.parse = function(P) {
  11124. this.$d = function(z) {
  11125. var _ = z.date, A = z.utc;
  11126. if (_ === null) return /* @__PURE__ */ new Date(NaN);
  11127. if (O.u(_)) return /* @__PURE__ */ new Date();
  11128. if (_ instanceof Date) return new Date(_);
  11129. if (typeof _ == "string" && !/Z$/i.test(_)) {
  11130. var H = _.match(f);
  11131. if (H) {
  11132. var $ = H[2] - 1 || 0, U = (H[7] || "0").substring(0, 3);
  11133. return A ? new Date(Date.UTC(H[1], $, H[3] || 1, H[4] || 0, H[5] || 0, H[6] || 0, U)) : new Date(H[1], $, H[3] || 1, H[4] || 0, H[5] || 0, H[6] || 0, U);
  11134. }
  11135. }
  11136. return new Date(_);
  11137. }(P), this.init();
  11138. }, T.init = function() {
  11139. var P = this.$d;
  11140. this.$y = P.getFullYear(), this.$M = P.getMonth(), this.$D = P.getDate(), this.$W = P.getDay(), this.$H = P.getHours(), this.$m = P.getMinutes(), this.$s = P.getSeconds(), this.$ms = P.getMilliseconds();
  11141. }, T.$utils = function() {
  11142. return O;
  11143. }, T.isValid = function() {
  11144. return this.$d.toString() !== b;
  11145. }, T.isSame = function(P, z) {
  11146. var _ = L(P);
  11147. return this.startOf(z) <= _ && _ <= this.endOf(z);
  11148. }, T.isAfter = function(P, z) {
  11149. return L(P) < this.startOf(z);
  11150. }, T.isBefore = function(P, z) {
  11151. return this.endOf(z) < L(P);
  11152. }, T.$g = function(P, z, _) {
  11153. return O.u(P) ? this[z] : this.set(_, P);
  11154. }, T.unix = function() {
  11155. return Math.floor(this.valueOf() / 1e3);
  11156. }, T.valueOf = function() {
  11157. return this.$d.getTime();
  11158. }, T.startOf = function(P, z) {
  11159. var _ = this, A = !!O.u(z) || z, H = O.p(P), $ = function(X, J) {
  11160. var M = O.w(_.$u ? Date.UTC(_.$y, J, X) : new Date(_.$y, J, X), _);
  11161. return A ? M : M.endOf(c);
  11162. }, U = function(X, J) {
  11163. return O.w(_.toDate()[X].apply(_.toDate("s"), (A ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(J)), _);
  11164. }, G = this.$W, B = this.$M, ne = this.$D, le = "set" + (this.$u ? "UTC" : "");
  11165. switch (H) {
  11166. case p:
  11167. return A ? $(1, 0) : $(31, 11);
  11168. case v:
  11169. return A ? $(1, B) : $(0, B + 1);
  11170. case s:
  11171. var ee = this.$locale().weekStart || 0, V = (G < ee ? G + 7 : G) - ee;
  11172. return $(A ? ne - V : ne + (6 - V), B);
  11173. case c:
  11174. case m:
  11175. return U(le + "Hours", 0);
  11176. case l:
  11177. return U(le + "Minutes", 1);
  11178. case u:
  11179. return U(le + "Seconds", 2);
  11180. case i:
  11181. return U(le + "Milliseconds", 3);
  11182. default:
  11183. return this.clone();
  11184. }
  11185. }, T.endOf = function(P) {
  11186. return this.startOf(P, !1);
  11187. }, T.$set = function(P, z) {
  11188. var _, A = O.p(P), H = "set" + (this.$u ? "UTC" : ""), $ = (_ = {}, _[c] = H + "Date", _[m] = H + "Date", _[v] = H + "Month", _[p] = H + "FullYear", _[l] = H + "Hours", _[u] = H + "Minutes", _[i] = H + "Seconds", _[o] = H + "Milliseconds", _)[A], U = A === c ? this.$D + (z - this.$W) : z;
  11189. if (A === v || A === p) {
  11190. var G = this.clone().set(m, 1);
  11191. G.$d[$](U), G.init(), this.$d = G.set(m, Math.min(this.$D, G.daysInMonth())).$d;
  11192. } else $ && this.$d[$](U);
  11193. return this.init(), this;
  11194. }, T.set = function(P, z) {
  11195. return this.clone().$set(P, z);
  11196. }, T.get = function(P) {
  11197. return this[O.p(P)]();
  11198. }, T.add = function(P, z) {
  11199. var _, A = this;
  11200. P = Number(P);
  11201. var H = O.p(z), $ = function(B) {
  11202. var ne = L(A);
  11203. return O.w(ne.date(ne.date() + Math.round(B * P)), A);
  11204. };
  11205. if (H === v) return this.set(v, this.$M + P);
  11206. if (H === p) return this.set(p, this.$y + P);
  11207. if (H === c) return $(1);
  11208. if (H === s) return $(7);
  11209. var U = (_ = {}, _[u] = r, _[l] = a, _[i] = n, _)[H] || 1, G = this.$d.getTime() + P * U;
  11210. return O.w(G, this);
  11211. }, T.subtract = function(P, z) {
  11212. return this.add(-1 * P, z);
  11213. }, T.format = function(P) {
  11214. var z = this, _ = this.$locale();
  11215. if (!this.isValid()) return _.invalidDate || b;
  11216. var A = P || "YYYY-MM-DDTHH:mm:ssZ", H = O.z(this), $ = this.$H, U = this.$m, G = this.$M, B = _.weekdays, ne = _.months, le = _.meridiem, ee = function(J, M, D, j) {
  11217. return J && (J[M] || J(z, A)) || D[M].slice(0, j);
  11218. }, V = function(J) {
  11219. return O.s($ % 12 || 12, J, "0");
  11220. }, X = le || function(J, M, D) {
  11221. var j = J < 12 ? "AM" : "PM";
  11222. return D ? j.toLowerCase() : j;
  11223. };
  11224. return A.replace(h, function(J, M) {
  11225. return M || function(D) {
  11226. switch (D) {
  11227. case "YY":
  11228. return String(z.$y).slice(-2);
  11229. case "YYYY":
  11230. return O.s(z.$y, 4, "0");
  11231. case "M":
  11232. return G + 1;
  11233. case "MM":
  11234. return O.s(G + 1, 2, "0");
  11235. case "MMM":
  11236. return ee(_.monthsShort, G, ne, 3);
  11237. case "MMMM":
  11238. return ee(ne, G);
  11239. case "D":
  11240. return z.$D;
  11241. case "DD":
  11242. return O.s(z.$D, 2, "0");
  11243. case "d":
  11244. return String(z.$W);
  11245. case "dd":
  11246. return ee(_.weekdaysMin, z.$W, B, 2);
  11247. case "ddd":
  11248. return ee(_.weekdaysShort, z.$W, B, 3);
  11249. case "dddd":
  11250. return B[z.$W];
  11251. case "H":
  11252. return String($);
  11253. case "HH":
  11254. return O.s($, 2, "0");
  11255. case "h":
  11256. return V(1);
  11257. case "hh":
  11258. return V(2);
  11259. case "a":
  11260. return X($, U, !0);
  11261. case "A":
  11262. return X($, U, !1);
  11263. case "m":
  11264. return String(U);
  11265. case "mm":
  11266. return O.s(U, 2, "0");
  11267. case "s":
  11268. return String(z.$s);
  11269. case "ss":
  11270. return O.s(z.$s, 2, "0");
  11271. case "SSS":
  11272. return O.s(z.$ms, 3, "0");
  11273. case "Z":
  11274. return H;
  11275. }
  11276. return null;
  11277. }(J) || H.replace(":", "");
  11278. });
  11279. }, T.utcOffset = function() {
  11280. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  11281. }, T.diff = function(P, z, _) {
  11282. var A, H = this, $ = O.p(z), U = L(P), G = (U.utcOffset() - this.utcOffset()) * r, B = this - U, ne = function() {
  11283. return O.m(H, U);
  11284. };
  11285. switch ($) {
  11286. case p:
  11287. A = ne() / 12;
  11288. break;
  11289. case v:
  11290. A = ne();
  11291. break;
  11292. case C:
  11293. A = ne() / 3;
  11294. break;
  11295. case s:
  11296. A = (B - G) / 6048e5;
  11297. break;
  11298. case c:
  11299. A = (B - G) / 864e5;
  11300. break;
  11301. case l:
  11302. A = B / a;
  11303. break;
  11304. case u:
  11305. A = B / r;
  11306. break;
  11307. case i:
  11308. A = B / n;
  11309. break;
  11310. default:
  11311. A = B;
  11312. }
  11313. return _ ? A : O.a(A);
  11314. }, T.daysInMonth = function() {
  11315. return this.endOf(v).$D;
  11316. }, T.$locale = function() {
  11317. return S[this.$L];
  11318. }, T.locale = function(P, z) {
  11319. if (!P) return this.$L;
  11320. var _ = this.clone(), A = k(P, z, !0);
  11321. return A && (_.$L = A), _;
  11322. }, T.clone = function() {
  11323. return O.w(this.$d, this);
  11324. }, T.toDate = function() {
  11325. return new Date(this.valueOf());
  11326. }, T.toJSON = function() {
  11327. return this.isValid() ? this.toISOString() : null;
  11328. }, T.toISOString = function() {
  11329. return this.$d.toISOString();
  11330. }, T.toString = function() {
  11331. return this.$d.toUTCString();
  11332. }, I;
  11333. }(), F = N.prototype;
  11334. return L.prototype = F, [["$ms", o], ["$s", i], ["$m", u], ["$H", l], ["$W", c], ["$M", v], ["$y", p], ["$D", m]].forEach(function(I) {
  11335. F[I[1]] = function(T) {
  11336. return this.$g(T, I[0], I[1]);
  11337. };
  11338. }), L.extend = function(I, T) {
  11339. return I.$i || (I(T, N, L), I.$i = !0), L;
  11340. }, L.locale = k, L.isDayjs = R, L.unix = function(I) {
  11341. return L(1e3 * I);
  11342. }, L.en = S[E], L.Ls = S, L.p = {}, L;
  11343. });
  11344. }(ho)), ho.exports;
  11345. }
  11346. var un = {}, ms;
  11347. function qy() {
  11348. if (ms) return un;
  11349. ms = 1, Object.defineProperty(un, "__esModule", {
  11350. value: !0
  11351. }), un.call = o, un.default = void 0, un.note = r, un.noteOnce = u, un.preMessage = void 0, un.resetWarned = a, un.warning = n, un.warningOnce = i;
  11352. var e = {}, t = un.preMessage = function(c) {
  11353. };
  11354. function n(l, c) {
  11355. }
  11356. function r(l, c) {
  11357. }
  11358. function a() {
  11359. e = {};
  11360. }
  11361. function o(l, c, s) {
  11362. !c && !e[s] && (l(!1, s), e[s] = !0);
  11363. }
  11364. function i(l, c) {
  11365. o(n, l, c);
  11366. }
  11367. function u(l, c) {
  11368. o(r, l, c);
  11369. }
  11370. return i.preMessage = t, i.resetWarned = a, i.noteOnce = u, un.default = i, un;
  11371. }
  11372. var go = { exports: {} }, Ky = go.exports, ps;
  11373. function Yy() {
  11374. return ps || (ps = 1, function(e, t) {
  11375. (function(n, r) {
  11376. e.exports = r();
  11377. })(Ky, function() {
  11378. return function(n, r) {
  11379. r.prototype.weekday = function(a) {
  11380. var o = this.$locale().weekStart || 0, i = this.$W, u = (i < o ? i + 7 : i) - o;
  11381. return this.$utils().u(a) ? u : this.subtract(u, "day").add(a, "day");
  11382. };
  11383. };
  11384. });
  11385. }(go)), go.exports;
  11386. }
  11387. var yo = { exports: {} }, Gy = yo.exports, hs;
  11388. function Xy() {
  11389. return hs || (hs = 1, function(e, t) {
  11390. (function(n, r) {
  11391. e.exports = r();
  11392. })(Gy, function() {
  11393. return function(n, r, a) {
  11394. var o = r.prototype, i = function(v) {
  11395. return v && (v.indexOf ? v : v.s);
  11396. }, u = function(v, C, p, m, b) {
  11397. var f = v.name ? v : v.$locale(), h = i(f[C]), g = i(f[p]), y = h || g.map(function(E) {
  11398. return E.slice(0, m);
  11399. });
  11400. if (!b) return y;
  11401. var w = f.weekStart;
  11402. return y.map(function(E, S) {
  11403. return y[(S + (w || 0)) % 7];
  11404. });
  11405. }, l = function() {
  11406. return a.Ls[a.locale()];
  11407. }, c = function(v, C) {
  11408. return v.formats[C] || function(p) {
  11409. return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(m, b, f) {
  11410. return b || f.slice(1);
  11411. });
  11412. }(v.formats[C.toUpperCase()]);
  11413. }, s = function() {
  11414. var v = this;
  11415. return { months: function(C) {
  11416. return C ? C.format("MMMM") : u(v, "months");
  11417. }, monthsShort: function(C) {
  11418. return C ? C.format("MMM") : u(v, "monthsShort", "months", 3);
  11419. }, firstDayOfWeek: function() {
  11420. return v.$locale().weekStart || 0;
  11421. }, weekdays: function(C) {
  11422. return C ? C.format("dddd") : u(v, "weekdays");
  11423. }, weekdaysMin: function(C) {
  11424. return C ? C.format("dd") : u(v, "weekdaysMin", "weekdays", 2);
  11425. }, weekdaysShort: function(C) {
  11426. return C ? C.format("ddd") : u(v, "weekdaysShort", "weekdays", 3);
  11427. }, longDateFormat: function(C) {
  11428. return c(v.$locale(), C);
  11429. }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
  11430. };
  11431. o.localeData = function() {
  11432. return s.bind(this)();
  11433. }, a.localeData = function() {
  11434. var v = l();
  11435. return { firstDayOfWeek: function() {
  11436. return v.weekStart || 0;
  11437. }, weekdays: function() {
  11438. return a.weekdays();
  11439. }, weekdaysShort: function() {
  11440. return a.weekdaysShort();
  11441. }, weekdaysMin: function() {
  11442. return a.weekdaysMin();
  11443. }, months: function() {
  11444. return a.months();
  11445. }, monthsShort: function() {
  11446. return a.monthsShort();
  11447. }, longDateFormat: function(C) {
  11448. return c(v, C);
  11449. }, meridiem: v.meridiem, ordinal: v.ordinal };
  11450. }, a.months = function() {
  11451. return u(l(), "months");
  11452. }, a.monthsShort = function() {
  11453. return u(l(), "monthsShort", "months", 3);
  11454. }, a.weekdays = function(v) {
  11455. return u(l(), "weekdays", null, null, v);
  11456. }, a.weekdaysShort = function(v) {
  11457. return u(l(), "weekdaysShort", "weekdays", 3, v);
  11458. }, a.weekdaysMin = function(v) {
  11459. return u(l(), "weekdaysMin", "weekdays", 2, v);
  11460. };
  11461. };
  11462. });
  11463. }(yo)), yo.exports;
  11464. }
  11465. var bo = { exports: {} }, Zy = bo.exports, gs;
  11466. function Qy() {
  11467. return gs || (gs = 1, function(e, t) {
  11468. (function(n, r) {
  11469. e.exports = r();
  11470. })(Zy, function() {
  11471. var n = "week", r = "year";
  11472. return function(a, o, i) {
  11473. var u = o.prototype;
  11474. u.week = function(l) {
  11475. if (l === void 0 && (l = null), l !== null) return this.add(7 * (l - this.week()), "day");
  11476. var c = this.$locale().yearStart || 1;
  11477. if (this.month() === 11 && this.date() > 25) {
  11478. var s = i(this).startOf(r).add(1, r).date(c), v = i(this).endOf(n);
  11479. if (s.isBefore(v)) return 1;
  11480. }
  11481. var C = i(this).startOf(r).date(c).startOf(n).subtract(1, "millisecond"), p = this.diff(C, n, !0);
  11482. return p < 0 ? i(this).startOf("week").week() : Math.ceil(p);
  11483. }, u.weeks = function(l) {
  11484. return l === void 0 && (l = null), this.week(l);
  11485. };
  11486. };
  11487. });
  11488. }(bo)), bo.exports;
  11489. }
  11490. var Co = { exports: {} }, Jy = Co.exports, ys;
  11491. function eb() {
  11492. return ys || (ys = 1, function(e, t) {
  11493. (function(n, r) {
  11494. e.exports = r();
  11495. })(Jy, function() {
  11496. return function(n, r) {
  11497. r.prototype.weekYear = function() {
  11498. var a = this.month(), o = this.week(), i = this.year();
  11499. return o === 1 && a === 11 ? i + 1 : a === 0 && o >= 52 ? i - 1 : i;
  11500. };
  11501. };
  11502. });
  11503. }(Co)), Co.exports;
  11504. }
  11505. var So = { exports: {} }, tb = So.exports, bs;
  11506. function nb() {
  11507. return bs || (bs = 1, function(e, t) {
  11508. (function(n, r) {
  11509. e.exports = r();
  11510. })(tb, function() {
  11511. return function(n, r) {
  11512. var a = r.prototype, o = a.format;
  11513. a.format = function(i) {
  11514. var u = this, l = this.$locale();
  11515. if (!this.isValid()) return o.bind(this)(i);
  11516. var c = this.$utils(), s = (i || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(v) {
  11517. switch (v) {
  11518. case "Q":
  11519. return Math.ceil((u.$M + 1) / 3);
  11520. case "Do":
  11521. return l.ordinal(u.$D);
  11522. case "gggg":
  11523. return u.weekYear();
  11524. case "GGGG":
  11525. return u.isoWeekYear();
  11526. case "wo":
  11527. return l.ordinal(u.week(), "W");
  11528. case "w":
  11529. case "ww":
  11530. return c.s(u.week(), v === "w" ? 1 : 2, "0");
  11531. case "W":
  11532. case "WW":
  11533. return c.s(u.isoWeek(), v === "W" ? 1 : 2, "0");
  11534. case "k":
  11535. case "kk":
  11536. return c.s(String(u.$H === 0 ? 24 : u.$H), v === "k" ? 1 : 2, "0");
  11537. case "X":
  11538. return Math.floor(u.$d.getTime() / 1e3);
  11539. case "x":
  11540. return u.$d.getTime();
  11541. case "z":
  11542. return "[" + u.offsetName() + "]";
  11543. case "zzz":
  11544. return "[" + u.offsetName("long") + "]";
  11545. default:
  11546. return v;
  11547. }
  11548. });
  11549. return o.bind(this)(s);
  11550. };
  11551. };
  11552. });
  11553. }(So)), So.exports;
  11554. }
  11555. var wo = { exports: {} }, rb = wo.exports, Cs;
  11556. function ab() {
  11557. return Cs || (Cs = 1, function(e, t) {
  11558. (function(n, r) {
  11559. e.exports = r();
  11560. })(rb, function() {
  11561. var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d/, o = /\d\d/, i = /\d\d?/, u = /\d*[^-_:/,()\s\d]+/, l = {}, c = function(f) {
  11562. return (f = +f) + (f > 68 ? 1900 : 2e3);
  11563. }, s = function(f) {
  11564. return function(h) {
  11565. this[f] = +h;
  11566. };
  11567. }, v = [/[+-]\d\d:?(\d\d)?|Z/, function(f) {
  11568. (this.zone || (this.zone = {})).offset = function(h) {
  11569. if (!h || h === "Z") return 0;
  11570. var g = h.match(/([+-]|\d\d)/g), y = 60 * g[1] + (+g[2] || 0);
  11571. return y === 0 ? 0 : g[0] === "+" ? -y : y;
  11572. }(f);
  11573. }], C = function(f) {
  11574. var h = l[f];
  11575. return h && (h.indexOf ? h : h.s.concat(h.f));
  11576. }, p = function(f, h) {
  11577. var g, y = l.meridiem;
  11578. if (y) {
  11579. for (var w = 1; w <= 24; w += 1) if (f.indexOf(y(w, 0, h)) > -1) {
  11580. g = w > 12;
  11581. break;
  11582. }
  11583. } else g = f === (h ? "pm" : "PM");
  11584. return g;
  11585. }, m = { A: [u, function(f) {
  11586. this.afternoon = p(f, !1);
  11587. }], a: [u, function(f) {
  11588. this.afternoon = p(f, !0);
  11589. }], Q: [a, function(f) {
  11590. this.month = 3 * (f - 1) + 1;
  11591. }], S: [a, function(f) {
  11592. this.milliseconds = 100 * +f;
  11593. }], SS: [o, function(f) {
  11594. this.milliseconds = 10 * +f;
  11595. }], SSS: [/\d{3}/, function(f) {
  11596. this.milliseconds = +f;
  11597. }], s: [i, s("seconds")], ss: [i, s("seconds")], m: [i, s("minutes")], mm: [i, s("minutes")], H: [i, s("hours")], h: [i, s("hours")], HH: [i, s("hours")], hh: [i, s("hours")], D: [i, s("day")], DD: [o, s("day")], Do: [u, function(f) {
  11598. var h = l.ordinal, g = f.match(/\d+/);
  11599. if (this.day = g[0], h) for (var y = 1; y <= 31; y += 1) h(y).replace(/\[|\]/g, "") === f && (this.day = y);
  11600. }], w: [i, s("week")], ww: [o, s("week")], M: [i, s("month")], MM: [o, s("month")], MMM: [u, function(f) {
  11601. var h = C("months"), g = (C("monthsShort") || h.map(function(y) {
  11602. return y.slice(0, 3);
  11603. })).indexOf(f) + 1;
  11604. if (g < 1) throw new Error();
  11605. this.month = g % 12 || g;
  11606. }], MMMM: [u, function(f) {
  11607. var h = C("months").indexOf(f) + 1;
  11608. if (h < 1) throw new Error();
  11609. this.month = h % 12 || h;
  11610. }], Y: [/[+-]?\d+/, s("year")], YY: [o, function(f) {
  11611. this.year = c(f);
  11612. }], YYYY: [/\d{4}/, s("year")], Z: v, ZZ: v };
  11613. function b(f) {
  11614. var h, g;
  11615. h = f, g = l && l.formats;
  11616. for (var y = (f = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(L, O, N) {
  11617. var F = N && N.toUpperCase();
  11618. return O || g[N] || n[N] || g[F].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(I, T, P) {
  11619. return T || P.slice(1);
  11620. });
  11621. })).match(r), w = y.length, E = 0; E < w; E += 1) {
  11622. var S = y[E], x = m[S], R = x && x[0], k = x && x[1];
  11623. y[E] = k ? { regex: R, parser: k } : S.replace(/^\[|\]$/g, "");
  11624. }
  11625. return function(L) {
  11626. for (var O = {}, N = 0, F = 0; N < w; N += 1) {
  11627. var I = y[N];
  11628. if (typeof I == "string") F += I.length;
  11629. else {
  11630. var T = I.regex, P = I.parser, z = L.slice(F), _ = T.exec(z)[0];
  11631. P.call(O, _), L = L.replace(_, "");
  11632. }
  11633. }
  11634. return function(A) {
  11635. var H = A.afternoon;
  11636. if (H !== void 0) {
  11637. var $ = A.hours;
  11638. H ? $ < 12 && (A.hours += 12) : $ === 12 && (A.hours = 0), delete A.afternoon;
  11639. }
  11640. }(O), O;
  11641. };
  11642. }
  11643. return function(f, h, g) {
  11644. g.p.customParseFormat = !0, f && f.parseTwoDigitYear && (c = f.parseTwoDigitYear);
  11645. var y = h.prototype, w = y.parse;
  11646. y.parse = function(E) {
  11647. var S = E.date, x = E.utc, R = E.args;
  11648. this.$u = x;
  11649. var k = R[1];
  11650. if (typeof k == "string") {
  11651. var L = R[2] === !0, O = R[3] === !0, N = L || O, F = R[2];
  11652. O && (F = R[2]), l = this.$locale(), !L && F && (l = g.Ls[F]), this.$d = function(z, _, A, H) {
  11653. try {
  11654. if (["x", "X"].indexOf(_) > -1) return new Date((_ === "X" ? 1e3 : 1) * z);
  11655. var $ = b(_)(z), U = $.year, G = $.month, B = $.day, ne = $.hours, le = $.minutes, ee = $.seconds, V = $.milliseconds, X = $.zone, J = $.week, M = /* @__PURE__ */ new Date(), D = B || (U || G ? 1 : M.getDate()), j = U || M.getFullYear(), W = 0;
  11656. U && !G || (W = G > 0 ? G - 1 : M.getMonth());
  11657. var K, Y = ne || 0, te = le || 0, Q = ee || 0, ae = V || 0;
  11658. return X ? new Date(Date.UTC(j, W, D, Y, te, Q, ae + 60 * X.offset * 1e3)) : A ? new Date(Date.UTC(j, W, D, Y, te, Q, ae)) : (K = new Date(j, W, D, Y, te, Q, ae), J && (K = H(K).week(J).toDate()), K);
  11659. } catch {
  11660. return /* @__PURE__ */ new Date("");
  11661. }
  11662. }(S, k, x, g), this.init(), F && F !== !0 && (this.$L = this.locale(F).$L), N && S != this.format(k) && (this.$d = /* @__PURE__ */ new Date("")), l = {};
  11663. } else if (k instanceof Array) for (var I = k.length, T = 1; T <= I; T += 1) {
  11664. R[1] = k[T - 1];
  11665. var P = g.apply(this, R);
  11666. if (P.isValid()) {
  11667. this.$d = P.$d, this.$L = P.$L, this.init();
  11668. break;
  11669. }
  11670. T === I && (this.$d = /* @__PURE__ */ new Date(""));
  11671. }
  11672. else w.call(this, E);
  11673. };
  11674. };
  11675. });
  11676. }(wo)), wo.exports;
  11677. }
  11678. var Ss;
  11679. function ob() {
  11680. if (Ss) return da;
  11681. Ss = 1;
  11682. var e = Wy().default;
  11683. Object.defineProperty(da, "__esModule", {
  11684. value: !0
  11685. }), da.default = void 0;
  11686. var t = e(Uy()), n = qy(), r = e(Yy()), a = e(Xy()), o = e(Qy()), i = e(eb()), u = e(nb()), l = e(ab());
  11687. t.default.extend(l.default), t.default.extend(u.default), t.default.extend(r.default), t.default.extend(a.default), t.default.extend(o.default), t.default.extend(i.default), t.default.extend(function(p, m) {
  11688. var b = m.prototype, f = b.format;
  11689. b.format = function(g) {
  11690. var y = (g || "").replace("Wo", "wo");
  11691. return f.bind(this)(y);
  11692. };
  11693. });
  11694. var c = {
  11695. // ar_EG:
  11696. // az_AZ:
  11697. // bg_BG:
  11698. bn_BD: "bn-bd",
  11699. by_BY: "be",
  11700. // ca_ES:
  11701. // cs_CZ:
  11702. // da_DK:
  11703. // de_DE:
  11704. // el_GR:
  11705. en_GB: "en-gb",
  11706. en_US: "en",
  11707. // es_ES:
  11708. // et_EE:
  11709. // fa_IR:
  11710. // fi_FI:
  11711. fr_BE: "fr",
  11712. // todo: dayjs has no fr_BE locale, use fr at present
  11713. fr_CA: "fr-ca",
  11714. // fr_FR:
  11715. // ga_IE:
  11716. // gl_ES:
  11717. // he_IL:
  11718. // hi_IN:
  11719. // hr_HR:
  11720. // hu_HU:
  11721. hy_AM: "hy-am",
  11722. // id_ID:
  11723. // is_IS:
  11724. // it_IT:
  11725. // ja_JP:
  11726. // ka_GE:
  11727. // kk_KZ:
  11728. // km_KH:
  11729. kmr_IQ: "ku",
  11730. // kn_IN:
  11731. // ko_KR:
  11732. // ku_IQ: // previous ku in antd
  11733. // lt_LT:
  11734. // lv_LV:
  11735. // mk_MK:
  11736. // ml_IN:
  11737. // mn_MN:
  11738. // ms_MY:
  11739. // nb_NO:
  11740. // ne_NP:
  11741. nl_BE: "nl-be",
  11742. // nl_NL:
  11743. // pl_PL:
  11744. pt_BR: "pt-br",
  11745. // pt_PT:
  11746. // ro_RO:
  11747. // ru_RU:
  11748. // sk_SK:
  11749. // sl_SI:
  11750. // sr_RS:
  11751. // sv_SE:
  11752. // ta_IN:
  11753. // th_TH:
  11754. // tr_TR:
  11755. // uk_UA:
  11756. // ur_PK:
  11757. // vi_VN:
  11758. zh_CN: "zh-cn",
  11759. zh_HK: "zh-hk",
  11760. zh_TW: "zh-tw"
  11761. }, s = function(m) {
  11762. var b = c[m];
  11763. return b || m.split("_")[0];
  11764. }, v = function() {
  11765. (0, n.noteOnce)(!1, "Not match any format. Please help to fire a issue about this.");
  11766. }, C = {
  11767. // get
  11768. getNow: function() {
  11769. var m = (0, t.default)();
  11770. return typeof m.tz == "function" ? m.tz() : m;
  11771. },
  11772. getFixedDate: function(m) {
  11773. return (0, t.default)(m, ["YYYY-M-DD", "YYYY-MM-DD"]);
  11774. },
  11775. getEndDate: function(m) {
  11776. return m.endOf("month");
  11777. },
  11778. getWeekDay: function(m) {
  11779. var b = m.locale("en");
  11780. return b.weekday() + b.localeData().firstDayOfWeek();
  11781. },
  11782. getYear: function(m) {
  11783. return m.year();
  11784. },
  11785. getMonth: function(m) {
  11786. return m.month();
  11787. },
  11788. getDate: function(m) {
  11789. return m.date();
  11790. },
  11791. getHour: function(m) {
  11792. return m.hour();
  11793. },
  11794. getMinute: function(m) {
  11795. return m.minute();
  11796. },
  11797. getSecond: function(m) {
  11798. return m.second();
  11799. },
  11800. getMillisecond: function(m) {
  11801. return m.millisecond();
  11802. },
  11803. // set
  11804. addYear: function(m, b) {
  11805. return m.add(b, "year");
  11806. },
  11807. addMonth: function(m, b) {
  11808. return m.add(b, "month");
  11809. },
  11810. addDate: function(m, b) {
  11811. return m.add(b, "day");
  11812. },
  11813. setYear: function(m, b) {
  11814. return m.year(b);
  11815. },
  11816. setMonth: function(m, b) {
  11817. return m.month(b);
  11818. },
  11819. setDate: function(m, b) {
  11820. return m.date(b);
  11821. },
  11822. setHour: function(m, b) {
  11823. return m.hour(b);
  11824. },
  11825. setMinute: function(m, b) {
  11826. return m.minute(b);
  11827. },
  11828. setSecond: function(m, b) {
  11829. return m.second(b);
  11830. },
  11831. setMillisecond: function(m, b) {
  11832. return m.millisecond(b);
  11833. },
  11834. // Compare
  11835. isAfter: function(m, b) {
  11836. return m.isAfter(b);
  11837. },
  11838. isValidate: function(m) {
  11839. return m.isValid();
  11840. },
  11841. locale: {
  11842. getWeekFirstDay: function(m) {
  11843. return (0, t.default)().locale(s(m)).localeData().firstDayOfWeek();
  11844. },
  11845. getWeekFirstDate: function(m, b) {
  11846. return b.locale(s(m)).weekday(0);
  11847. },
  11848. getWeek: function(m, b) {
  11849. return b.locale(s(m)).week();
  11850. },
  11851. getShortWeekDays: function(m) {
  11852. return (0, t.default)().locale(s(m)).localeData().weekdaysMin();
  11853. },
  11854. getShortMonths: function(m) {
  11855. return (0, t.default)().locale(s(m)).localeData().monthsShort();
  11856. },
  11857. format: function(m, b, f) {
  11858. return b.locale(s(m)).format(f);
  11859. },
  11860. parse: function(m, b, f) {
  11861. for (var h = s(m), g = 0; g < f.length; g += 1) {
  11862. var y = f[g], w = b;
  11863. if (y.includes("wo") || y.includes("Wo")) {
  11864. for (var E = w.split("-")[0], S = w.split("-")[1], x = (0, t.default)(E, "YYYY").startOf("year").locale(h), R = 0; R <= 52; R += 1) {
  11865. var k = x.add(R, "week");
  11866. if (k.format("Wo") === S)
  11867. return k;
  11868. }
  11869. return v(), null;
  11870. }
  11871. var L = (0, t.default)(w, y, !0).locale(h);
  11872. if (L.isValid())
  11873. return L;
  11874. }
  11875. return b && v(), null;
  11876. }
  11877. }
  11878. };
  11879. return da.default = C, da;
  11880. }
  11881. var ib = ob();
  11882. const hf = /* @__PURE__ */ Aa(ib), ub = "univer-date-picker", lb = "univer-date-picker-rtl", sb = "univer-date-picker-invalid", cb = "univer-date-picker-panel", db = "univer-date-picker-panel-focused", fb = "univer-date-picker-panel-rtl", vb = "univer-date-picker-suffix-icon", mb = "univer-date-picker-decade-panel", pb = "univer-date-picker-year-panel", hb = "univer-date-picker-month-panel", gb = "univer-date-picker-week-panel", yb = "univer-date-picker-date-panel", bb = "univer-date-picker-time-panel", Cb = "univer-date-picker-header", Sb = "univer-date-picker-header-view", wb = "univer-date-picker-header-super-prev-btn", xb = "univer-date-picker-header-super-next-btn", Eb = "univer-date-picker-header-prev-btn", Rb = "univer-date-picker-header-next-btn", Pb = "univer-date-picker-cell", Mb = "univer-date-picker-cell-disabled", kb = "univer-date-picker-cell-inner", Db = "univer-date-picker-cell-in-view", Nb = "univer-date-picker-cell-in-range", Ib = "univer-date-picker-cell-hover", Ob = "univer-date-picker-cell-range-hover-start", _b = "univer-date-picker-cell-range-hover-end", Lb = "univer-date-picker-cell-range-hover", Tb = "univer-date-picker-cell-today", $b = "univer-date-picker-cell-range-start", Ab = "univer-date-picker-cell-range-end", jb = "univer-date-picker-cell-selected", Fb = "univer-date-picker-presets", zb = "univer-date-picker-now", Hb = "univer-date-picker-now-btn", Vb = "univer-date-picker-footer", Wb = "univer-date-picker-picker-footer", Bb = "univer-date-picker-ranges", Ub = "univer-date-picker-ok", qb = "univer-date-picker-content", Kb = "univer-date-picker-week-panel-row", Yb = "univer-date-picker-week-panel-row-selected", Gb = "univer-date-picker-week-panel-row-range-hover", Xb = "univer-date-picker-week-panel-row-range-start", Zb = "univer-date-picker-week-panel-row-range-end", Qb = "univer-date-picker-cell-week", Jb = "univer-date-picker-time-panel-column-title", e1 = "univer-date-picker-time-panel-column", t1 = "univer-date-picker-time-panel-column-active", n1 = "univer-date-picker-time-panel-cell-disabled", r1 = "univer-date-picker-time-panel-cell-selected", a1 = "univer-date-picker-time-panel-cell-inner", o1 = "univer-date-picker-datetime-panel", i1 = "univer-date-picker-datetime-panel-active", u1 = "univer-date-picker-date-panel-active", l1 = "univer-date-picker-time-panel-active", s1 = "univer-date-picker-input", c1 = "univer-date-picker-input-active", d1 = "univer-date-picker-input-placeholder", f1 = "univer-date-picker-clear", v1 = "univer-date-picker-clear-btn", m1 = "univer-date-picker-dropdown", p1 = "univer-date-picker-dropdown-range", h1 = "univer-date-picker-dropdown-hidden", g1 = "univer-date-picker-dropdown-placement-topLeft", y1 = "univer-date-picker-range-arrow", b1 = "univer-date-picker-dropdown-placement-topRight", C1 = "univer-date-picker-dropdown-placement-bottomLeft", S1 = "univer-date-picker-dropdown-placement-bottomright", w1 = "univer-date-picker-dropdown-rtl", x1 = "univer-date-picker-range", E1 = "univer-date-picker-range-wrapper", R1 = "univer-date-picker-active-bar", P1 = "univer-date-picker-focused", M1 = "univer-date-picker-panel-container", k1 = "univer-date-picker-panel-layout", D1 = "univer-date-picker-selector", N1 = "univer-date-picker-selection-overflow", I1 = "univer-date-picker-selection-overflow-item", O1 = "univer-date-picker-selection-item", _1 = "univer-date-picker-multiple-input", tu = {
  11883. datePicker: ub,
  11884. datePickerRtl: lb,
  11885. datePickerInvalid: sb,
  11886. datePickerPanel: cb,
  11887. datePickerPanelFocused: db,
  11888. datePickerPanelRtl: fb,
  11889. datePickerSuffixIcon: vb,
  11890. datePickerDecadePanel: mb,
  11891. datePickerYearPanel: pb,
  11892. datePickerMonthPanel: hb,
  11893. datePickerWeekPanel: gb,
  11894. datePickerDatePanel: yb,
  11895. datePickerTimePanel: bb,
  11896. datePickerHeader: Cb,
  11897. datePickerHeaderView: Sb,
  11898. datePickerHeaderSuperPrevBtn: wb,
  11899. datePickerHeaderSuperNextBtn: xb,
  11900. datePickerHeaderPrevBtn: Eb,
  11901. datePickerHeaderNextBtn: Rb,
  11902. datePickerCell: Pb,
  11903. datePickerCellDisabled: Mb,
  11904. datePickerCellInner: kb,
  11905. datePickerCellInView: Db,
  11906. datePickerCellInRange: Nb,
  11907. datePickerCellHover: Ib,
  11908. datePickerCellRangeHoverStart: Ob,
  11909. datePickerCellRangeHoverEnd: _b,
  11910. datePickerCellRangeHover: Lb,
  11911. datePickerCellToday: Tb,
  11912. datePickerCellRangeStart: $b,
  11913. datePickerCellRangeEnd: Ab,
  11914. datePickerCellSelected: jb,
  11915. datePickerPresets: Fb,
  11916. datePickerNow: zb,
  11917. datePickerNowBtn: Hb,
  11918. datePickerFooter: Vb,
  11919. datePickerPickerFooter: Wb,
  11920. datePickerRanges: Bb,
  11921. datePickerOk: Ub,
  11922. datePickerContent: qb,
  11923. datePickerWeekPanelRow: Kb,
  11924. datePickerWeekPanelRowSelected: Yb,
  11925. datePickerWeekPanelRowRangeHover: Gb,
  11926. datePickerWeekPanelRowRangeStart: Xb,
  11927. datePickerWeekPanelRowRangeEnd: Zb,
  11928. datePickerCellWeek: Qb,
  11929. datePickerTimePanelColumnTitle: Jb,
  11930. datePickerTimePanelColumn: e1,
  11931. datePickerTimePanelColumnActive: t1,
  11932. datePickerTimePanelCellDisabled: n1,
  11933. datePickerTimePanelCellSelected: r1,
  11934. datePickerTimePanelCellInner: a1,
  11935. datePickerDatetimePanel: o1,
  11936. datePickerDatetimePanelActive: i1,
  11937. datePickerDatePanelActive: u1,
  11938. datePickerTimePanelActive: l1,
  11939. datePickerInput: s1,
  11940. datePickerInputActive: c1,
  11941. datePickerInputPlaceholder: d1,
  11942. datePickerClear: f1,
  11943. datePickerClearBtn: v1,
  11944. datePickerDropdown: m1,
  11945. datePickerDropdownRange: p1,
  11946. datePickerDropdownHidden: h1,
  11947. datePickerDropdownPlacementTopLeft: g1,
  11948. datePickerRangeArrow: y1,
  11949. datePickerDropdownPlacementTopRight: b1,
  11950. datePickerDropdownPlacementBottomLeft: C1,
  11951. datePickerDropdownPlacementBottomright: S1,
  11952. datePickerDropdownRtl: w1,
  11953. datePickerRange: x1,
  11954. datePickerRangeWrapper: E1,
  11955. datePickerActiveBar: R1,
  11956. datePickerFocused: P1,
  11957. datePickerPanelContainer: M1,
  11958. datePickerPanelLayout: k1,
  11959. datePickerSelector: D1,
  11960. datePickerSelectionOverflow: N1,
  11961. datePickerSelectionOverflowItem: I1,
  11962. datePickerSelectionItem: O1,
  11963. datePickerMultipleInput: _1
  11964. }, FO = (e) => {
  11965. const { locale: t } = Sn(In);
  11966. return /* @__PURE__ */ q.jsx(
  11967. po,
  11968. {
  11969. ...e,
  11970. generateConfig: hf,
  11971. prefixCls: tu.datePicker,
  11972. locale: t == null ? void 0 : t.Picker
  11973. }
  11974. );
  11975. };
  11976. function zO(e) {
  11977. const { value: t, onChange: n, ...r } = e, { locale: a } = Sn(In);
  11978. function o(i, u) {
  11979. !Array.isArray(i) && !Array.isArray(u) && n(i, u);
  11980. }
  11981. return /* @__PURE__ */ q.jsx(
  11982. Vy,
  11983. {
  11984. ...r,
  11985. value: t,
  11986. prefixCls: tu.datePicker,
  11987. generateConfig: hf,
  11988. locale: a == null ? void 0 : a.Picker,
  11989. suffixIcon: /* @__PURE__ */ q.jsx(wc, { className: tu.datePickerSuffixIcon }),
  11990. onChange: o
  11991. }
  11992. );
  11993. }
  11994. function L1(e, t) {
  11995. if (e == null) return {};
  11996. var n = {};
  11997. for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
  11998. if (t.indexOf(r) >= 0) continue;
  11999. n[r] = e[r];
  12000. }
  12001. return n;
  12002. }
  12003. function T1(e, t) {
  12004. if (e == null) return {};
  12005. var n, r, a = L1(e, t);
  12006. if (Object.getOwnPropertySymbols) {
  12007. var o = Object.getOwnPropertySymbols(e);
  12008. for (r = 0; r < o.length; r++) n = o[r], t.indexOf(n) >= 0 || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
  12009. }
  12010. return a;
  12011. }
  12012. var $1 = fe.ESC, A1 = fe.TAB;
  12013. function j1(e) {
  12014. var t = e.visible, n = e.triggerRef, r = e.onVisibleChange, a = e.autoFocus, o = e.overlayRef, i = d.useRef(!1), u = function() {
  12015. if (t) {
  12016. var v, C;
  12017. (v = n.current) === null || v === void 0 || (C = v.focus) === null || C === void 0 || C.call(v), r == null || r(!1);
  12018. }
  12019. }, l = function() {
  12020. var v;
  12021. return (v = o.current) !== null && v !== void 0 && v.focus ? (o.current.focus(), i.current = !0, !0) : !1;
  12022. }, c = function(v) {
  12023. switch (v.keyCode) {
  12024. case $1:
  12025. u();
  12026. break;
  12027. case A1: {
  12028. var C = !1;
  12029. i.current || (C = l()), C ? v.preventDefault() : u();
  12030. break;
  12031. }
  12032. }
  12033. };
  12034. d.useEffect(function() {
  12035. return t ? (window.addEventListener("keydown", c), a && st(l, 3), function() {
  12036. window.removeEventListener("keydown", c), i.current = !1;
  12037. }) : function() {
  12038. i.current = !1;
  12039. };
  12040. }, [t]);
  12041. }
  12042. var F1 = /* @__PURE__ */ $t(function(e, t) {
  12043. var n = e.overlay, r = e.arrow, a = e.prefixCls, o = Ht(function() {
  12044. var u;
  12045. return typeof n == "function" ? u = n() : u = n, u;
  12046. }, [n]), i = lr(t, o == null ? void 0 : o.ref);
  12047. return /* @__PURE__ */ me.createElement(me.Fragment, null, r && /* @__PURE__ */ me.createElement("div", {
  12048. className: "".concat(a, "-arrow")
  12049. }), /* @__PURE__ */ me.cloneElement(o, {
  12050. ref: xr(o) ? i : void 0
  12051. }));
  12052. }), _r = {
  12053. adjustX: 1,
  12054. adjustY: 1
  12055. }, Lr = [0, 0], z1 = {
  12056. topLeft: {
  12057. points: ["bl", "tl"],
  12058. overflow: _r,
  12059. offset: [0, -4],
  12060. targetOffset: Lr
  12061. },
  12062. top: {
  12063. points: ["bc", "tc"],
  12064. overflow: _r,
  12065. offset: [0, -4],
  12066. targetOffset: Lr
  12067. },
  12068. topRight: {
  12069. points: ["br", "tr"],
  12070. overflow: _r,
  12071. offset: [0, -4],
  12072. targetOffset: Lr
  12073. },
  12074. bottomLeft: {
  12075. points: ["tl", "bl"],
  12076. overflow: _r,
  12077. offset: [0, 4],
  12078. targetOffset: Lr
  12079. },
  12080. bottom: {
  12081. points: ["tc", "bc"],
  12082. overflow: _r,
  12083. offset: [0, 4],
  12084. targetOffset: Lr
  12085. },
  12086. bottomRight: {
  12087. points: ["tr", "br"],
  12088. overflow: _r,
  12089. offset: [0, 4],
  12090. targetOffset: Lr
  12091. }
  12092. }, H1 = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
  12093. function V1(e, t) {
  12094. var n, r = e.arrow, a = r === void 0 ? !1 : r, o = e.prefixCls, i = o === void 0 ? "rc-dropdown" : o, u = e.transitionName, l = e.animation, c = e.align, s = e.placement, v = s === void 0 ? "bottomLeft" : s, C = e.placements, p = C === void 0 ? z1 : C, m = e.getPopupContainer, b = e.showAction, f = e.hideAction, h = e.overlayClassName, g = e.overlayStyle, y = e.visible, w = e.trigger, E = w === void 0 ? ["hover"] : w, S = e.autoFocus, x = e.overlay, R = e.children, k = e.onVisibleChange, L = T1(e, H1), O = me.useState(), N = cn(O, 2), F = N[0], I = N[1], T = "visible" in e ? y : F, P = me.useRef(null), z = me.useRef(null), _ = me.useRef(null);
  12095. me.useImperativeHandle(t, function() {
  12096. return P.current;
  12097. });
  12098. var A = function(V) {
  12099. I(V), k == null || k(V);
  12100. };
  12101. j1({
  12102. visible: T,
  12103. triggerRef: _,
  12104. onVisibleChange: A,
  12105. autoFocus: S,
  12106. overlayRef: z
  12107. });
  12108. var H = function(V) {
  12109. var X = e.onOverlayClick;
  12110. I(!1), X && X(V);
  12111. }, $ = function() {
  12112. return /* @__PURE__ */ me.createElement(F1, {
  12113. ref: z,
  12114. overlay: x,
  12115. prefixCls: i,
  12116. arrow: a
  12117. });
  12118. }, U = function() {
  12119. return typeof x == "function" ? $ : $();
  12120. }, G = function() {
  12121. var V = e.minOverlayWidthMatchTrigger, X = e.alignPoint;
  12122. return "minOverlayWidthMatchTrigger" in e ? V : !X;
  12123. }, B = function() {
  12124. var V = e.openClassName;
  12125. return V !== void 0 ? V : "".concat(i, "-open");
  12126. }, ne = /* @__PURE__ */ me.cloneElement(R, {
  12127. className: xe((n = R.props) === null || n === void 0 ? void 0 : n.className, T && B()),
  12128. ref: xr(R) ? lr(_, R.ref) : void 0
  12129. }), le = f;
  12130. return !le && E.indexOf("contextMenu") !== -1 && (le = ["click"]), /* @__PURE__ */ me.createElement(Uo, ko({
  12131. builtinPlacements: p
  12132. }, L, {
  12133. prefixCls: i,
  12134. ref: P,
  12135. popupClassName: xe(h, Xc({}, "".concat(i, "-show-arrow"), a)),
  12136. popupStyle: g,
  12137. action: E,
  12138. showAction: b,
  12139. hideAction: le,
  12140. popupPlacement: v,
  12141. popupAlign: c,
  12142. popupTransitionName: u,
  12143. popupAnimation: l,
  12144. popupVisible: T,
  12145. stretch: G() ? "minWidth" : "",
  12146. popup: U(),
  12147. onPopupVisibleChange: A,
  12148. onPopupClick: H,
  12149. getPopupContainer: m
  12150. }), ne);
  12151. }
  12152. const W1 = /* @__PURE__ */ me.forwardRef(V1), B1 = "univer-dropdown", U1 = "univer-dropdown-hidden", q1 = "univer-dropdown-slide-up-enter", K1 = "univer-dropdown-slide-up-appear", Y1 = "univer-dropdown-slide-up-leave", G1 = "univer-dropdown-slide-up-enter-active", X1 = "univer-dropdown-placement-bottomLeft", Z1 = "univer-dropdown-slide-up-appear-active", Q1 = "univer-dropdown-placement-bottomCenter", J1 = "univer-dropdown-placement-bottomRight", eC = "univer-dropdown-slide-up-in", tC = "univer-dropdown-placement-topLeft", nC = "univer-dropdown-placement-topCenter", rC = "univer-dropdown-placement-topRight", aC = "univer-dropdown-slide-down-in", oC = "univer-dropdown-slide-up-leave-active", iC = "univer-dropdown-slide-up-out", uC = "univer-dropdown-slide-down-out", lC = {
  12153. dropdown: B1,
  12154. dropdownHidden: U1,
  12155. dropdownSlideUpEnter: q1,
  12156. dropdownSlideUpAppear: K1,
  12157. dropdownSlideUpLeave: Y1,
  12158. dropdownSlideUpEnterActive: G1,
  12159. dropdownPlacementBottomLeft: X1,
  12160. dropdownSlideUpAppearActive: Z1,
  12161. dropdownPlacementBottomCenter: Q1,
  12162. dropdownPlacementBottomRight: J1,
  12163. dropdownSlideUpIn: eC,
  12164. dropdownPlacementTopLeft: tC,
  12165. dropdownPlacementTopCenter: nC,
  12166. dropdownPlacementTopRight: rC,
  12167. dropdownSlideDownIn: aC,
  12168. dropdownSlideUpLeaveActive: oC,
  12169. dropdownSlideUpOut: iC,
  12170. dropdownSlideDownOut: uC
  12171. };
  12172. function sC(e) {
  12173. const {
  12174. className: t,
  12175. placement: n,
  12176. children: r,
  12177. overlay: a,
  12178. alignPoint: o = !1,
  12179. align: i,
  12180. disabled: u,
  12181. onVisibleChange: l
  12182. } = e, c = u ? [] : e.trigger || ["click"], { mountContainer: s } = Sn(In);
  12183. return s && /* @__PURE__ */ q.jsx(
  12184. W1,
  12185. {
  12186. ...e,
  12187. overlayClassName: t,
  12188. prefixCls: lC.dropdown,
  12189. getPopupContainer: () => s,
  12190. trigger: c,
  12191. animation: "slide-up",
  12192. placement: n,
  12193. overlay: a,
  12194. alignPoint: o,
  12195. align: i,
  12196. onVisibleChange: l,
  12197. children: r
  12198. }
  12199. );
  12200. }
  12201. const cC = "univer-form-layout", dC = "univer-form-layout-inner", fC = "univer-form-layout-content", vC = "univer-form-layout-label", mC = "univer-form-layout-desc", pC = "univer-input-affix-wrapper", hC = "univer-select", gC = "univer-range-selector", yC = "univer-form-layout-content-error", bC = "univer-select-single", CC = "univer-select-customize-input", SC = "univer-select-selector", wC = "univer-form-layout-error", xC = "univer-form-dual-column-layout", tr = {
  12202. formLayout: cC,
  12203. formLayoutInner: dC,
  12204. formLayoutContent: fC,
  12205. formLayoutLabel: vC,
  12206. formLayoutDesc: mC,
  12207. inputAffixWrapper: pC,
  12208. select: hC,
  12209. rangeSelector: gC,
  12210. formLayoutContentError: yC,
  12211. selectSingle: bC,
  12212. selectCustomizeInput: CC,
  12213. selectSelector: SC,
  12214. formLayoutError: wC,
  12215. formDualColumnLayout: xC
  12216. }, ws = hu(!1), HO = (e) => {
  12217. const { label: t, desc: n, children: r, style: a, className: o, error: i, contentStyle: u, collapsable: l = !1, defaultCollapsed: c = !1 } = e, [s, v] = rt(c), C = Sn(ws);
  12218. return /* @__PURE__ */ q.jsx(ws.Provider, { value: !0, children: /* @__PURE__ */ q.jsxs("div", { className: jt(tr.formLayout, C ? tr.formLayoutInner : "", o), style: a, children: [
  12219. t && /* @__PURE__ */ q.jsxs("div", { style: { cursor: l ? "pointer" : "default" }, className: tr.formLayoutLabel, onClick: () => v(!s), children: [
  12220. t,
  12221. l ? /* @__PURE__ */ q.jsx(
  12222. Oc,
  12223. {
  12224. style: {
  12225. marginLeft: 4,
  12226. transform: s ? "rotate(180deg)" : "rotate(0deg)",
  12227. transition: "transform 0.3s"
  12228. }
  12229. }
  12230. ) : null
  12231. ] }),
  12232. s && l ? null : /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
  12233. n && /* @__PURE__ */ q.jsx("div", { className: tr.formLayoutDesc, children: n }),
  12234. r ? /* @__PURE__ */ q.jsxs("div", { style: u, className: jt(tr.formLayoutContent, i ? tr.formLayoutContentError : ""), children: [
  12235. r,
  12236. i ? /* @__PURE__ */ q.jsx("div", { className: tr.formLayoutError, children: i }) : null
  12237. ] }) : null
  12238. ] })
  12239. ] }) });
  12240. }, VO = (e) => /* @__PURE__ */ q.jsx("div", { className: tr.formDualColumnLayout, children: e.children });
  12241. function wr(e) {
  12242. "@babel/helpers - typeof";
  12243. return wr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
  12244. return typeof t;
  12245. } : function(t) {
  12246. return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  12247. }, wr(e);
  12248. }
  12249. function EC(e, t) {
  12250. if (wr(e) != "object" || !e) return e;
  12251. var n = e[Symbol.toPrimitive];
  12252. if (n !== void 0) {
  12253. var r = n.call(e, t || "default");
  12254. if (wr(r) != "object") return r;
  12255. throw new TypeError("@@toPrimitive must return a primitive value.");
  12256. }
  12257. return (t === "string" ? String : Number)(e);
  12258. }
  12259. function RC(e) {
  12260. var t = EC(e, "string");
  12261. return wr(t) == "symbol" ? t : t + "";
  12262. }
  12263. function Rn(e, t, n) {
  12264. return (t = RC(t)) in e ? Object.defineProperty(e, t, {
  12265. value: n,
  12266. enumerable: !0,
  12267. configurable: !0,
  12268. writable: !0
  12269. }) : e[t] = n, e;
  12270. }
  12271. function xs(e, t) {
  12272. var n = Object.keys(e);
  12273. if (Object.getOwnPropertySymbols) {
  12274. var r = Object.getOwnPropertySymbols(e);
  12275. t && (r = r.filter(function(a) {
  12276. return Object.getOwnPropertyDescriptor(e, a).enumerable;
  12277. })), n.push.apply(n, r);
  12278. }
  12279. return n;
  12280. }
  12281. function yr(e) {
  12282. for (var t = 1; t < arguments.length; t++) {
  12283. var n = arguments[t] != null ? arguments[t] : {};
  12284. t % 2 ? xs(Object(n), !0).forEach(function(r) {
  12285. Rn(e, r, n[r]);
  12286. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xs(Object(n)).forEach(function(r) {
  12287. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
  12288. });
  12289. }
  12290. return e;
  12291. }
  12292. function La() {
  12293. return La = Object.assign ? Object.assign.bind() : function(e) {
  12294. for (var t = 1; t < arguments.length; t++) {
  12295. var n = arguments[t];
  12296. for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
  12297. }
  12298. return e;
  12299. }, La.apply(null, arguments);
  12300. }
  12301. function PC(e) {
  12302. return !!(e.addonBefore || e.addonAfter);
  12303. }
  12304. function MC(e) {
  12305. return !!(e.prefix || e.suffix || e.allowClear);
  12306. }
  12307. function Es(e, t, n) {
  12308. var r = t.cloneNode(!0), a = Object.create(e, {
  12309. target: {
  12310. value: r
  12311. },
  12312. currentTarget: {
  12313. value: r
  12314. }
  12315. });
  12316. return r.value = n, typeof t.selectionStart == "number" && typeof t.selectionEnd == "number" && (r.selectionStart = t.selectionStart, r.selectionEnd = t.selectionEnd), r.setSelectionRange = function() {
  12317. t.setSelectionRange.apply(t, arguments);
  12318. }, a;
  12319. }
  12320. function Rs(e, t, n, r) {
  12321. if (n) {
  12322. var a = t;
  12323. if (t.type === "click") {
  12324. a = Es(t, e, ""), n(a);
  12325. return;
  12326. }
  12327. if (e.type !== "file" && r !== void 0) {
  12328. a = Es(t, e, r), n(a);
  12329. return;
  12330. }
  12331. n(a);
  12332. }
  12333. }
  12334. function gf(e, t) {
  12335. if (e) {
  12336. e.focus(t);
  12337. var n = t || {}, r = n.cursor;
  12338. if (r) {
  12339. var a = e.value.length;
  12340. switch (r) {
  12341. case "start":
  12342. e.setSelectionRange(0, 0);
  12343. break;
  12344. case "end":
  12345. e.setSelectionRange(a, a);
  12346. break;
  12347. default:
  12348. e.setSelectionRange(0, a);
  12349. }
  12350. }
  12351. }
  12352. }
  12353. var yf = /* @__PURE__ */ me.forwardRef(function(e, t) {
  12354. var n, r, a = e.inputElement, o = e.children, i = e.prefixCls, u = e.prefix, l = e.suffix, c = e.addonBefore, s = e.addonAfter, v = e.className, C = e.style, p = e.disabled, m = e.readOnly, b = e.focused, f = e.triggerFocus, h = e.allowClear, g = e.value, y = e.handleReset, w = e.hidden, E = e.classes, S = e.classNames, x = e.dataAttrs, R = e.styles, k = e.components, L = e.onClear, O = o != null ? o : a, N = (k == null ? void 0 : k.affixWrapper) || "span", F = (k == null ? void 0 : k.groupWrapper) || "span", I = (k == null ? void 0 : k.wrapper) || "span", T = (k == null ? void 0 : k.groupAddon) || "span", P = Ce(null), z = function(W) {
  12355. var K;
  12356. (K = P.current) !== null && K !== void 0 && K.contains(W.target) && (f == null || f());
  12357. }, _ = MC(e), A = /* @__PURE__ */ hc(O, {
  12358. value: g,
  12359. className: xe(O.props.className, !_ && (S == null ? void 0 : S.variant)) || null
  12360. }), H = Ce(null);
  12361. if (me.useImperativeHandle(t, function() {
  12362. return {
  12363. nativeElement: H.current || P.current
  12364. };
  12365. }), _) {
  12366. var $ = null;
  12367. if (h) {
  12368. var U = !p && !m && g, G = "".concat(i, "-clear-icon"), B = wr(h) === "object" && h !== null && h !== void 0 && h.clearIcon ? h.clearIcon : "✖";
  12369. $ = /* @__PURE__ */ me.createElement("span", {
  12370. onClick: function(W) {
  12371. y == null || y(W), L == null || L();
  12372. },
  12373. onMouseDown: function(W) {
  12374. return W.preventDefault();
  12375. },
  12376. className: xe(G, Rn(Rn({}, "".concat(G, "-hidden"), !U), "".concat(G, "-has-suffix"), !!l)),
  12377. role: "button",
  12378. tabIndex: -1
  12379. }, B);
  12380. }
  12381. var ne = "".concat(i, "-affix-wrapper"), le = xe(ne, Rn(Rn(Rn(Rn(Rn({}, "".concat(i, "-disabled"), p), "".concat(ne, "-disabled"), p), "".concat(ne, "-focused"), b), "".concat(ne, "-readonly"), m), "".concat(ne, "-input-with-clear-btn"), l && h && g), E == null ? void 0 : E.affixWrapper, S == null ? void 0 : S.affixWrapper, S == null ? void 0 : S.variant), ee = (l || h) && /* @__PURE__ */ me.createElement("span", {
  12382. className: xe("".concat(i, "-suffix"), S == null ? void 0 : S.suffix),
  12383. style: R == null ? void 0 : R.suffix
  12384. }, $, l);
  12385. A = /* @__PURE__ */ me.createElement(N, La({
  12386. className: le,
  12387. style: R == null ? void 0 : R.affixWrapper,
  12388. onClick: z
  12389. }, x == null ? void 0 : x.affixWrapper, {
  12390. ref: P
  12391. }), u && /* @__PURE__ */ me.createElement("span", {
  12392. className: xe("".concat(i, "-prefix"), S == null ? void 0 : S.prefix),
  12393. style: R == null ? void 0 : R.prefix
  12394. }, u), A, ee);
  12395. }
  12396. if (PC(e)) {
  12397. var V = "".concat(i, "-group"), X = "".concat(V, "-addon"), J = "".concat(V, "-wrapper"), M = xe("".concat(i, "-wrapper"), V, E == null ? void 0 : E.wrapper, S == null ? void 0 : S.wrapper), D = xe(J, Rn({}, "".concat(J, "-disabled"), p), E == null ? void 0 : E.group, S == null ? void 0 : S.groupWrapper);
  12398. A = /* @__PURE__ */ me.createElement(F, {
  12399. className: D,
  12400. ref: H
  12401. }, /* @__PURE__ */ me.createElement(I, {
  12402. className: M
  12403. }, c && /* @__PURE__ */ me.createElement(T, {
  12404. className: X
  12405. }, c), A, s && /* @__PURE__ */ me.createElement(T, {
  12406. className: X
  12407. }, s)));
  12408. }
  12409. return /* @__PURE__ */ me.cloneElement(A, {
  12410. className: xe((n = A.props) === null || n === void 0 ? void 0 : n.className, v) || null,
  12411. style: yr(yr({}, (r = A.props) === null || r === void 0 ? void 0 : r.style), C),
  12412. hidden: w
  12413. });
  12414. });
  12415. function nu(e, t) {
  12416. (t == null || t > e.length) && (t = e.length);
  12417. for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
  12418. return r;
  12419. }
  12420. function kC(e) {
  12421. if (Array.isArray(e)) return nu(e);
  12422. }
  12423. function DC(e) {
  12424. if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
  12425. }
  12426. function bf(e, t) {
  12427. if (e) {
  12428. if (typeof e == "string") return nu(e, t);
  12429. var n = {}.toString.call(e).slice(8, -1);
  12430. return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? nu(e, t) : void 0;
  12431. }
  12432. }
  12433. function NC() {
  12434. throw new TypeError(`Invalid attempt to spread non-iterable instance.
  12435. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  12436. }
  12437. function IC(e) {
  12438. return kC(e) || DC(e) || bf(e) || NC();
  12439. }
  12440. function OC(e) {
  12441. if (Array.isArray(e)) return e;
  12442. }
  12443. function _C(e, t) {
  12444. var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  12445. if (n != null) {
  12446. var r, a, o, i, u = [], l = !0, c = !1;
  12447. try {
  12448. if (o = (n = n.call(e)).next, t !== 0) for (; !(l = (r = o.call(n)).done) && (u.push(r.value), u.length !== t); l = !0) ;
  12449. } catch (s) {
  12450. c = !0, a = s;
  12451. } finally {
  12452. try {
  12453. if (!l && n.return != null && (i = n.return(), Object(i) !== i)) return;
  12454. } finally {
  12455. if (c) throw a;
  12456. }
  12457. }
  12458. return u;
  12459. }
  12460. }
  12461. function LC() {
  12462. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  12463. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  12464. }
  12465. function Si(e, t) {
  12466. return OC(e) || _C(e, t) || bf(e, t) || LC();
  12467. }
  12468. function TC(e, t) {
  12469. if (e == null) return {};
  12470. var n = {};
  12471. for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
  12472. if (t.includes(r)) continue;
  12473. n[r] = e[r];
  12474. }
  12475. return n;
  12476. }
  12477. function Cf(e, t) {
  12478. if (e == null) return {};
  12479. var n, r, a = TC(e, t);
  12480. if (Object.getOwnPropertySymbols) {
  12481. var o = Object.getOwnPropertySymbols(e);
  12482. for (r = 0; r < o.length; r++) n = o[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
  12483. }
  12484. return a;
  12485. }
  12486. var $C = ["show"];
  12487. function AC(e, t) {
  12488. return d.useMemo(function() {
  12489. var n = {};
  12490. t && (n.show = wr(t) === "object" && t.formatter ? t.formatter : !!t), n = yr(yr({}, n), e);
  12491. var r = n, a = r.show, o = Cf(r, $C);
  12492. return yr(yr({}, o), {}, {
  12493. show: !!a,
  12494. showFormatter: typeof a == "function" ? a : void 0,
  12495. strategy: o.strategy || function(i) {
  12496. return i.length;
  12497. }
  12498. });
  12499. }, [e, t]);
  12500. }
  12501. var jC = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"], FC = /* @__PURE__ */ $t(function(e, t) {
  12502. var n = e.autoComplete, r = e.onChange, a = e.onFocus, o = e.onBlur, i = e.onPressEnter, u = e.onKeyDown, l = e.onKeyUp, c = e.prefixCls, s = c === void 0 ? "rc-input" : c, v = e.disabled, C = e.htmlSize, p = e.className, m = e.maxLength, b = e.suffix, f = e.showCount, h = e.count, g = e.type, y = g === void 0 ? "text" : g, w = e.classes, E = e.classNames, S = e.styles, x = e.onCompositionStart, R = e.onCompositionEnd, k = Cf(e, jC), L = rt(!1), O = Si(L, 2), N = O[0], F = O[1], I = Ce(!1), T = Ce(!1), P = Ce(null), z = Ce(null), _ = function(ve) {
  12503. P.current && gf(P.current, ve);
  12504. }, A = Gt(e.defaultValue, {
  12505. value: e.value
  12506. }), H = Si(A, 2), $ = H[0], U = H[1], G = $ == null ? "" : String($), B = rt(null), ne = Si(B, 2), le = ne[0], ee = ne[1], V = AC(h, f), X = V.max || m, J = V.strategy(G), M = !!X && J > X;
  12507. yc(t, function() {
  12508. var oe;
  12509. return {
  12510. focus: _,
  12511. blur: function() {
  12512. var ze;
  12513. (ze = P.current) === null || ze === void 0 || ze.blur();
  12514. },
  12515. setSelectionRange: function(ze, Re, Be) {
  12516. var je;
  12517. (je = P.current) === null || je === void 0 || je.setSelectionRange(ze, Re, Be);
  12518. },
  12519. select: function() {
  12520. var ze;
  12521. (ze = P.current) === null || ze === void 0 || ze.select();
  12522. },
  12523. input: P.current,
  12524. nativeElement: ((oe = z.current) === null || oe === void 0 ? void 0 : oe.nativeElement) || P.current
  12525. };
  12526. }), lt(function() {
  12527. F(function(oe) {
  12528. return oe && v ? !1 : oe;
  12529. });
  12530. }, [v]);
  12531. var D = function(ve, ze, Re) {
  12532. var Be = ze;
  12533. if (!I.current && V.exceedFormatter && V.max && V.strategy(ze) > V.max) {
  12534. if (Be = V.exceedFormatter(ze, {
  12535. max: V.max
  12536. }), ze !== Be) {
  12537. var je, He;
  12538. ee([((je = P.current) === null || je === void 0 ? void 0 : je.selectionStart) || 0, ((He = P.current) === null || He === void 0 ? void 0 : He.selectionEnd) || 0]);
  12539. }
  12540. } else if (Re.source === "compositionEnd")
  12541. return;
  12542. U(Be), P.current && Rs(P.current, ve, r, Be);
  12543. };
  12544. lt(function() {
  12545. if (le) {
  12546. var oe;
  12547. (oe = P.current) === null || oe === void 0 || oe.setSelectionRange.apply(oe, IC(le));
  12548. }
  12549. }, [le]);
  12550. var j = function(ve) {
  12551. D(ve, ve.target.value, {
  12552. source: "change"
  12553. });
  12554. }, W = function(ve) {
  12555. I.current = !1, D(ve, ve.currentTarget.value, {
  12556. source: "compositionEnd"
  12557. }), R == null || R(ve);
  12558. }, K = function(ve) {
  12559. i && ve.key === "Enter" && !T.current && (T.current = !0, i(ve)), u == null || u(ve);
  12560. }, Y = function(ve) {
  12561. ve.key === "Enter" && (T.current = !1), l == null || l(ve);
  12562. }, te = function(ve) {
  12563. F(!0), a == null || a(ve);
  12564. }, Q = function(ve) {
  12565. F(!1), o == null || o(ve);
  12566. }, ae = function(ve) {
  12567. U(""), _(), P.current && Rs(P.current, ve, r);
  12568. }, ue = M && "".concat(s, "-out-of-range"), se = function() {
  12569. var ve = Er(e, [
  12570. "prefixCls",
  12571. "onPressEnter",
  12572. "addonBefore",
  12573. "addonAfter",
  12574. "prefix",
  12575. "suffix",
  12576. "allowClear",
  12577. // Input elements must be either controlled or uncontrolled,
  12578. // specify either the value prop, or the defaultValue prop, but not both.
  12579. "defaultValue",
  12580. "showCount",
  12581. "count",
  12582. "classes",
  12583. "htmlSize",
  12584. "styles",
  12585. "classNames",
  12586. "onClear"
  12587. ]);
  12588. return /* @__PURE__ */ me.createElement("input", La({
  12589. autoComplete: n
  12590. }, ve, {
  12591. onChange: j,
  12592. onFocus: te,
  12593. onBlur: Q,
  12594. onKeyDown: K,
  12595. onKeyUp: Y,
  12596. className: xe(s, Rn({}, "".concat(s, "-disabled"), v), E == null ? void 0 : E.input),
  12597. style: S == null ? void 0 : S.input,
  12598. ref: P,
  12599. size: C,
  12600. type: y,
  12601. onCompositionStart: function(Re) {
  12602. I.current = !0, x == null || x(Re);
  12603. },
  12604. onCompositionEnd: W
  12605. }));
  12606. }, pe = function() {
  12607. var ve = Number(X) > 0;
  12608. if (b || V.show) {
  12609. var ze = V.showFormatter ? V.showFormatter({
  12610. value: G,
  12611. count: J,
  12612. maxLength: X
  12613. }) : "".concat(J).concat(ve ? " / ".concat(X) : "");
  12614. return /* @__PURE__ */ me.createElement(me.Fragment, null, V.show && /* @__PURE__ */ me.createElement("span", {
  12615. className: xe("".concat(s, "-show-count-suffix"), Rn({}, "".concat(s, "-show-count-has-suffix"), !!b), E == null ? void 0 : E.count),
  12616. style: yr({}, S == null ? void 0 : S.count)
  12617. }, ze), b);
  12618. }
  12619. return null;
  12620. };
  12621. return /* @__PURE__ */ me.createElement(yf, La({}, k, {
  12622. prefixCls: s,
  12623. className: xe(p, ue),
  12624. handleReset: ae,
  12625. value: G,
  12626. focused: N,
  12627. triggerFocus: _,
  12628. suffix: pe(),
  12629. disabled: v,
  12630. classes: w,
  12631. classNames: E,
  12632. styles: S
  12633. }), se());
  12634. });
  12635. const zC = "univer-input", HC = "univer-input-affix-wrapper", VC = "univer-input-affix-wrapper-small", WC = "univer-input-affix-wrapper-middle", BC = "univer-input-affix-wrapper-large", UC = "univer-input-affix-wrapper-disabled", qC = "univer-input-suffix", KC = "univer-input-not-allow-clear", YC = "univer-input-clear-icon", GC = "univer-input-clear-icon-hidden", XC = "univer-input-slot-container", ZC = "univer-input-slot", hr = {
  12636. input: zC,
  12637. inputAffixWrapper: HC,
  12638. inputAffixWrapperSmall: VC,
  12639. inputAffixWrapperMiddle: WC,
  12640. inputAffixWrapperLarge: BC,
  12641. inputAffixWrapperDisabled: UC,
  12642. inputSuffix: qC,
  12643. inputNotAllowClear: KC,
  12644. inputClearIcon: YC,
  12645. inputClearIconHidden: GC,
  12646. inputSlotContainer: XC,
  12647. inputSlot: ZC
  12648. };
  12649. function QC(e) {
  12650. const {
  12651. affixWrapperStyle: t,
  12652. autoFocus: n = !1,
  12653. type: r = "text",
  12654. className: a,
  12655. placeholder: o,
  12656. value: i,
  12657. size: u = "middle",
  12658. allowClear: l,
  12659. disabled: c = !1,
  12660. onClick: s,
  12661. onKeyDown: v,
  12662. onChange: C,
  12663. ...p
  12664. } = e;
  12665. function m(f) {
  12666. const { value: h } = f.target;
  12667. C == null || C(h);
  12668. }
  12669. const b = jt(a, {
  12670. [hr.inputAffixWrapperSmall]: u === "small",
  12671. [hr.inputAffixWrapperMiddle]: u === "middle",
  12672. [hr.inputAffixWrapperLarge]: u === "large",
  12673. [hr.inputNotAllowClear]: !l
  12674. }, a);
  12675. return /* @__PURE__ */ q.jsx(
  12676. FC,
  12677. {
  12678. prefixCls: hr.input,
  12679. classNames: { affixWrapper: b },
  12680. styles: { affixWrapper: t },
  12681. autoFocus: n,
  12682. type: r,
  12683. placeholder: o,
  12684. value: i,
  12685. disabled: c,
  12686. onClick: s,
  12687. onKeyDown: v,
  12688. onChange: m,
  12689. allowClear: { clearIcon: l ? /* @__PURE__ */ q.jsx(gu, {}) : /* @__PURE__ */ q.jsx(q.Fragment, {}) },
  12690. ...p
  12691. }
  12692. );
  12693. }
  12694. function Ps(e) {
  12695. switch (e) {
  12696. case "small":
  12697. return 6;
  12698. case "middle":
  12699. return 6;
  12700. case "large":
  12701. return 8;
  12702. default:
  12703. return 6;
  12704. }
  12705. }
  12706. function WO(e) {
  12707. const { slot: t, ...n } = e, r = Ce(null), [a, o] = me.useState(Ps(e.size));
  12708. return lt(() => {
  12709. let i;
  12710. return r.current && (i = new ResizeObserver(() => {
  12711. const u = Ps(e.size) * 2 + r.current.offsetWidth;
  12712. o(u);
  12713. }), i.observe(r.current)), () => {
  12714. i == null || i.disconnect();
  12715. };
  12716. }, [t, r.current, e.size]), /* @__PURE__ */ q.jsxs("div", { className: hr.inputSlotContainer, children: [
  12717. /* @__PURE__ */ q.jsx(QC, { ...n, affixWrapperStyle: { paddingRight: a } }),
  12718. /* @__PURE__ */ q.jsx("div", { ref: r, className: hr.inputSlot, tabIndex: -1, onPointerDown: (i) => i.preventDefault(), children: t })
  12719. ] });
  12720. }
  12721. function ru() {
  12722. return typeof BigInt == "function";
  12723. }
  12724. function Sf(e) {
  12725. return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
  12726. }
  12727. function Cr(e) {
  12728. var t = e.trim(), n = t.startsWith("-");
  12729. n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = "0".concat(t));
  12730. var r = t || "0", a = r.split("."), o = a[0] || "0", i = a[1] || "0";
  12731. o === "0" && i === "0" && (n = !1);
  12732. var u = n ? "-" : "";
  12733. return {
  12734. negative: n,
  12735. negativeStr: u,
  12736. trimStr: r,
  12737. integerStr: o,
  12738. decimalStr: i,
  12739. fullStr: "".concat(u).concat(r)
  12740. };
  12741. }
  12742. function Hu(e) {
  12743. var t = String(e);
  12744. return !Number.isNaN(Number(t)) && t.includes("e");
  12745. }
  12746. function br(e) {
  12747. var t = String(e);
  12748. if (Hu(e)) {
  12749. var n = Number(t.slice(t.indexOf("e-") + 2)), r = t.match(/\.(\d+)/);
  12750. return r != null && r[1] && (n += r[1].length), n;
  12751. }
  12752. return t.includes(".") && Vu(t) ? t.length - t.indexOf(".") - 1 : 0;
  12753. }
  12754. function Xo(e) {
  12755. var t = String(e);
  12756. if (Hu(e)) {
  12757. if (e > Number.MAX_SAFE_INTEGER)
  12758. return String(ru() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
  12759. if (e < Number.MIN_SAFE_INTEGER)
  12760. return String(ru() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
  12761. t = e.toFixed(br(t));
  12762. }
  12763. return Cr(t).fullStr;
  12764. }
  12765. function Vu(e) {
  12766. return typeof e == "number" ? !Number.isNaN(e) : e ? (
  12767. // Normal type: 11.28
  12768. /^\s*-?\d+(\.\d+)?\s*$/.test(e) || // Pre-number: 1.
  12769. /^\s*-?\d+\.\s*$/.test(e) || // Post-number: .1
  12770. /^\s*-?\.\d+\s*$/.test(e)
  12771. ) : !1;
  12772. }
  12773. var JC = /* @__PURE__ */ function() {
  12774. function e(t) {
  12775. if (Rr(this, e), ie(this, "origin", ""), ie(this, "negative", void 0), ie(this, "integer", void 0), ie(this, "decimal", void 0), ie(this, "decimalLen", void 0), ie(this, "empty", void 0), ie(this, "nan", void 0), Sf(t)) {
  12776. this.empty = !0;
  12777. return;
  12778. }
  12779. if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
  12780. this.nan = !0;
  12781. return;
  12782. }
  12783. var n = t;
  12784. if (Hu(n) && (n = Number(n)), n = typeof n == "string" ? n : Xo(n), Vu(n)) {
  12785. var r = Cr(n);
  12786. this.negative = r.negative;
  12787. var a = r.trimStr.split(".");
  12788. this.integer = BigInt(a[0]);
  12789. var o = a[1] || "0";
  12790. this.decimal = BigInt(o), this.decimalLen = o.length;
  12791. } else
  12792. this.nan = !0;
  12793. }
  12794. return Pr(e, [{
  12795. key: "getMark",
  12796. value: function() {
  12797. return this.negative ? "-" : "";
  12798. }
  12799. }, {
  12800. key: "getIntegerStr",
  12801. value: function() {
  12802. return this.integer.toString();
  12803. }
  12804. /**
  12805. * @private get decimal string
  12806. */
  12807. }, {
  12808. key: "getDecimalStr",
  12809. value: function() {
  12810. return this.decimal.toString().padStart(this.decimalLen, "0");
  12811. }
  12812. /**
  12813. * @private Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
  12814. * This is used for add function only.
  12815. */
  12816. }, {
  12817. key: "alignDecimal",
  12818. value: function(n) {
  12819. var r = "".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n, "0"));
  12820. return BigInt(r);
  12821. }
  12822. }, {
  12823. key: "negate",
  12824. value: function() {
  12825. var n = new e(this.toString());
  12826. return n.negative = !n.negative, n;
  12827. }
  12828. }, {
  12829. key: "cal",
  12830. value: function(n, r, a) {
  12831. var o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(o), u = n.alignDecimal(o), l = r(i, u).toString(), c = a(o), s = Cr(l), v = s.negativeStr, C = s.trimStr, p = "".concat(v).concat(C.padStart(c + 1, "0"));
  12832. return new e("".concat(p.slice(0, -c), ".").concat(p.slice(-c)));
  12833. }
  12834. }, {
  12835. key: "add",
  12836. value: function(n) {
  12837. if (this.isInvalidate())
  12838. return new e(n);
  12839. var r = new e(n);
  12840. return r.isInvalidate() ? this : this.cal(r, function(a, o) {
  12841. return a + o;
  12842. }, function(a) {
  12843. return a;
  12844. });
  12845. }
  12846. }, {
  12847. key: "multi",
  12848. value: function(n) {
  12849. var r = new e(n);
  12850. return this.isInvalidate() || r.isInvalidate() ? new e(NaN) : this.cal(r, function(a, o) {
  12851. return a * o;
  12852. }, function(a) {
  12853. return a * 2;
  12854. });
  12855. }
  12856. }, {
  12857. key: "isEmpty",
  12858. value: function() {
  12859. return this.empty;
  12860. }
  12861. }, {
  12862. key: "isNaN",
  12863. value: function() {
  12864. return this.nan;
  12865. }
  12866. }, {
  12867. key: "isInvalidate",
  12868. value: function() {
  12869. return this.isEmpty() || this.isNaN();
  12870. }
  12871. }, {
  12872. key: "equals",
  12873. value: function(n) {
  12874. return this.toString() === (n == null ? void 0 : n.toString());
  12875. }
  12876. }, {
  12877. key: "lessEquals",
  12878. value: function(n) {
  12879. return this.add(n.negate().toString()).toNumber() <= 0;
  12880. }
  12881. }, {
  12882. key: "toNumber",
  12883. value: function() {
  12884. return this.isNaN() ? NaN : Number(this.toString());
  12885. }
  12886. }, {
  12887. key: "toString",
  12888. value: function() {
  12889. var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  12890. return n ? this.isInvalidate() ? "" : Cr("".concat(this.getMark()).concat(this.getIntegerStr(), ".").concat(this.getDecimalStr())).fullStr : this.origin;
  12891. }
  12892. }]), e;
  12893. }(), eS = /* @__PURE__ */ function() {
  12894. function e(t) {
  12895. if (Rr(this, e), ie(this, "origin", ""), ie(this, "number", void 0), ie(this, "empty", void 0), Sf(t)) {
  12896. this.empty = !0;
  12897. return;
  12898. }
  12899. this.origin = String(t), this.number = Number(t);
  12900. }
  12901. return Pr(e, [{
  12902. key: "negate",
  12903. value: function() {
  12904. return new e(-this.toNumber());
  12905. }
  12906. }, {
  12907. key: "add",
  12908. value: function(n) {
  12909. if (this.isInvalidate())
  12910. return new e(n);
  12911. var r = Number(n);
  12912. if (Number.isNaN(r))
  12913. return this;
  12914. var a = this.number + r;
  12915. if (a > Number.MAX_SAFE_INTEGER)
  12916. return new e(Number.MAX_SAFE_INTEGER);
  12917. if (a < Number.MIN_SAFE_INTEGER)
  12918. return new e(Number.MIN_SAFE_INTEGER);
  12919. var o = Math.max(br(this.number), br(r));
  12920. return new e(a.toFixed(o));
  12921. }
  12922. }, {
  12923. key: "multi",
  12924. value: function(n) {
  12925. var r = Number(n);
  12926. if (this.isInvalidate() || Number.isNaN(r))
  12927. return new e(NaN);
  12928. var a = this.number * r;
  12929. if (a > Number.MAX_SAFE_INTEGER)
  12930. return new e(Number.MAX_SAFE_INTEGER);
  12931. if (a < Number.MIN_SAFE_INTEGER)
  12932. return new e(Number.MIN_SAFE_INTEGER);
  12933. var o = Math.max(br(this.number), br(r));
  12934. return new e(a.toFixed(o));
  12935. }
  12936. }, {
  12937. key: "isEmpty",
  12938. value: function() {
  12939. return this.empty;
  12940. }
  12941. }, {
  12942. key: "isNaN",
  12943. value: function() {
  12944. return Number.isNaN(this.number);
  12945. }
  12946. }, {
  12947. key: "isInvalidate",
  12948. value: function() {
  12949. return this.isEmpty() || this.isNaN();
  12950. }
  12951. }, {
  12952. key: "equals",
  12953. value: function(n) {
  12954. return this.toNumber() === (n == null ? void 0 : n.toNumber());
  12955. }
  12956. }, {
  12957. key: "lessEquals",
  12958. value: function(n) {
  12959. return this.add(n.negate().toString()).toNumber() <= 0;
  12960. }
  12961. }, {
  12962. key: "toNumber",
  12963. value: function() {
  12964. return this.number;
  12965. }
  12966. }, {
  12967. key: "toString",
  12968. value: function() {
  12969. var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  12970. return n ? this.isInvalidate() ? "" : Xo(this.number) : this.origin;
  12971. }
  12972. }]), e;
  12973. }();
  12974. function En(e) {
  12975. return ru() ? new JC(e) : new eS(e);
  12976. }
  12977. function xo(e, t, n) {
  12978. var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  12979. if (e === "")
  12980. return "";
  12981. var a = Cr(e), o = a.negativeStr, i = a.integerStr, u = a.decimalStr, l = "".concat(t).concat(u), c = "".concat(o).concat(i);
  12982. if (n >= 0) {
  12983. var s = Number(u[n]);
  12984. if (s >= 5 && !r) {
  12985. var v = En(e).add("".concat(o, "0.").concat("0".repeat(n)).concat(10 - s));
  12986. return xo(v.toString(), t, n, r);
  12987. }
  12988. return n === 0 ? c : "".concat(c).concat(t).concat(u.padEnd(n, "0").slice(0, n));
  12989. }
  12990. return l === ".0" ? c : "".concat(c).concat(l);
  12991. }
  12992. function tS(e, t) {
  12993. return typeof Proxy < "u" && e ? new Proxy(e, {
  12994. get: function(r, a) {
  12995. if (t[a])
  12996. return t[a];
  12997. var o = r[a];
  12998. return typeof o == "function" ? o.bind(r) : o;
  12999. }
  13000. }) : e;
  13001. }
  13002. function nS(e, t) {
  13003. var n = Ce(null);
  13004. function r() {
  13005. try {
  13006. var o = e.selectionStart, i = e.selectionEnd, u = e.value, l = u.substring(0, o), c = u.substring(i);
  13007. n.current = {
  13008. start: o,
  13009. end: i,
  13010. value: u,
  13011. beforeTxt: l,
  13012. afterTxt: c
  13013. };
  13014. } catch {
  13015. }
  13016. }
  13017. function a() {
  13018. if (e && n.current && t)
  13019. try {
  13020. var o = e.value, i = n.current, u = i.beforeTxt, l = i.afterTxt, c = i.start, s = o.length;
  13021. if (o.startsWith(u))
  13022. s = u.length;
  13023. else if (o.endsWith(l))
  13024. s = o.length - n.current.afterTxt.length;
  13025. else {
  13026. var v = u[c - 1], C = o.indexOf(v, c - 1);
  13027. C !== -1 && (s = C + 1);
  13028. }
  13029. e.setSelectionRange(s, s);
  13030. } catch (p) {
  13031. ur(!1, "Something warning of cursor restore. Please fire issue about this: ".concat(p.message));
  13032. }
  13033. }
  13034. return [r, a];
  13035. }
  13036. var rS = function() {
  13037. var t = rt(!1), n = cn(t, 2), r = n[0], a = n[1];
  13038. return St(function() {
  13039. a(Du());
  13040. }, []), r;
  13041. }, aS = 200, oS = 600;
  13042. function iS(e) {
  13043. var t = e.prefixCls, n = e.upNode, r = e.downNode, a = e.upDisabled, o = e.downDisabled, i = e.onStep, u = d.useRef(), l = d.useRef([]), c = d.useRef();
  13044. c.current = i;
  13045. var s = function() {
  13046. clearTimeout(u.current);
  13047. }, v = function(y, w) {
  13048. y.preventDefault(), s(), c.current(w);
  13049. function E() {
  13050. c.current(w), u.current = setTimeout(E, aS);
  13051. }
  13052. u.current = setTimeout(E, oS);
  13053. };
  13054. d.useEffect(function() {
  13055. return function() {
  13056. s(), l.current.forEach(function(g) {
  13057. return st.cancel(g);
  13058. });
  13059. };
  13060. }, []);
  13061. var C = rS();
  13062. if (C)
  13063. return null;
  13064. var p = "".concat(t, "-handler"), m = xe(p, "".concat(p, "-up"), ie({}, "".concat(p, "-up-disabled"), a)), b = xe(p, "".concat(p, "-down"), ie({}, "".concat(p, "-down-disabled"), o)), f = function() {
  13065. return l.current.push(st(s));
  13066. }, h = {
  13067. unselectable: "on",
  13068. role: "button",
  13069. onMouseUp: f,
  13070. onMouseLeave: f
  13071. };
  13072. return /* @__PURE__ */ d.createElement("div", {
  13073. className: "".concat(p, "-wrap")
  13074. }, /* @__PURE__ */ d.createElement("span", _e({}, h, {
  13075. onMouseDown: function(y) {
  13076. v(y, !0);
  13077. },
  13078. "aria-label": "Increase Value",
  13079. "aria-disabled": a,
  13080. className: m
  13081. }), n || /* @__PURE__ */ d.createElement("span", {
  13082. unselectable: "on",
  13083. className: "".concat(t, "-handler-up-inner")
  13084. })), /* @__PURE__ */ d.createElement("span", _e({}, h, {
  13085. onMouseDown: function(y) {
  13086. v(y, !1);
  13087. },
  13088. "aria-label": "Decrease Value",
  13089. "aria-disabled": o,
  13090. className: b
  13091. }), r || /* @__PURE__ */ d.createElement("span", {
  13092. unselectable: "on",
  13093. className: "".concat(t, "-handler-down-inner")
  13094. })));
  13095. }
  13096. function Ms(e) {
  13097. var t = typeof e == "number" ? Xo(e) : Cr(e).fullStr, n = t.includes(".");
  13098. return n ? Cr(t.replace(/(\d)\.(\d)/g, "$1$2.")).fullStr : e + "0";
  13099. }
  13100. const uS = function() {
  13101. var e = Ce(0), t = function() {
  13102. st.cancel(e.current);
  13103. };
  13104. return lt(function() {
  13105. return t;
  13106. }, []), function(n) {
  13107. t(), e.current = st(function() {
  13108. n();
  13109. });
  13110. };
  13111. };
  13112. var lS = ["prefixCls", "className", "style", "min", "max", "step", "defaultValue", "value", "disabled", "readOnly", "upHandler", "downHandler", "keyboard", "changeOnWheel", "controls", "classNames", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "changeOnBlur", "domRef"], sS = ["disabled", "style", "prefixCls", "value", "prefix", "suffix", "addonBefore", "addonAfter", "className", "classNames"], ks = function(t, n) {
  13113. return t || n.isEmpty() ? n.toString() : n.toNumber();
  13114. }, Ds = function(t) {
  13115. var n = En(t);
  13116. return n.isInvalidate() ? null : n;
  13117. }, cS = /* @__PURE__ */ d.forwardRef(function(e, t) {
  13118. var n = e.prefixCls, r = e.className, a = e.style, o = e.min, i = e.max, u = e.step, l = u === void 0 ? 1 : u, c = e.defaultValue, s = e.value, v = e.disabled, C = e.readOnly, p = e.upHandler, m = e.downHandler, b = e.keyboard, f = e.changeOnWheel, h = f === void 0 ? !1 : f, g = e.controls, y = g === void 0 ? !0 : g;
  13119. e.classNames;
  13120. var w = e.stringMode, E = e.parser, S = e.formatter, x = e.precision, R = e.decimalSeparator, k = e.onChange, L = e.onInput, O = e.onPressEnter, N = e.onStep, F = e.changeOnBlur, I = F === void 0 ? !0 : F, T = e.domRef, P = mt(e, lS), z = "".concat(n, "-input"), _ = d.useRef(null), A = d.useState(!1), H = Z(A, 2), $ = H[0], U = H[1], G = d.useRef(!1), B = d.useRef(!1), ne = d.useRef(!1), le = d.useState(function() {
  13121. return En(s != null ? s : c);
  13122. }), ee = Z(le, 2), V = ee[0], X = ee[1];
  13123. function J($e) {
  13124. s === void 0 && X($e);
  13125. }
  13126. var M = d.useCallback(function($e, ge) {
  13127. if (!ge)
  13128. return x >= 0 ? x : Math.max(br($e), br(l));
  13129. }, [x, l]), D = d.useCallback(function($e) {
  13130. var ge = String($e);
  13131. if (E)
  13132. return E(ge);
  13133. var ke = ge;
  13134. return R && (ke = ke.replace(R, ".")), ke.replace(/[^\w.-]+/g, "");
  13135. }, [E, R]), j = d.useRef(""), W = d.useCallback(function($e, ge) {
  13136. if (S)
  13137. return S($e, {
  13138. userTyping: ge,
  13139. input: String(j.current)
  13140. });
  13141. var ke = typeof $e == "number" ? Xo($e) : $e;
  13142. if (!ge) {
  13143. var Te = M(ke, ge);
  13144. if (Vu(ke) && (R || Te >= 0)) {
  13145. var Ke = R || ".";
  13146. ke = xo(ke, Ke, Te);
  13147. }
  13148. }
  13149. return ke;
  13150. }, [S, M, R]), K = d.useState(function() {
  13151. var $e = c != null ? c : s;
  13152. return V.isInvalidate() && ["string", "number"].includes(_t($e)) ? Number.isNaN($e) ? "" : $e : W(V.toString(), !1);
  13153. }), Y = Z(K, 2), te = Y[0], Q = Y[1];
  13154. j.current = te;
  13155. function ae($e, ge) {
  13156. Q(W(
  13157. // Invalidate number is sometime passed by external control, we should let it go
  13158. // Otherwise is controlled by internal interactive logic which check by userTyping
  13159. // You can ref 'show limited value when input is not focused' test for more info.
  13160. $e.isInvalidate() ? $e.toString(!1) : $e.toString(!ge),
  13161. ge
  13162. ));
  13163. }
  13164. var ue = d.useMemo(function() {
  13165. return Ds(i);
  13166. }, [i, x]), se = d.useMemo(function() {
  13167. return Ds(o);
  13168. }, [o, x]), pe = d.useMemo(function() {
  13169. return !ue || !V || V.isInvalidate() ? !1 : ue.lessEquals(V);
  13170. }, [ue, V]), oe = d.useMemo(function() {
  13171. return !se || !V || V.isInvalidate() ? !1 : V.lessEquals(se);
  13172. }, [se, V]), ve = nS(_.current, $), ze = Z(ve, 2), Re = ze[0], Be = ze[1], je = function(ge) {
  13173. return ue && !ge.lessEquals(ue) ? ue : se && !se.lessEquals(ge) ? se : null;
  13174. }, He = function(ge) {
  13175. return !je(ge);
  13176. }, Ye = function(ge, ke) {
  13177. var Te = ge, Ke = He(Te) || Te.isEmpty();
  13178. if (!Te.isEmpty() && !ke && (Te = je(Te) || Te, Ke = !0), !C && !v && Ke) {
  13179. var De = Te.toString(), we = M(De, ke);
  13180. return we >= 0 && (Te = En(xo(De, ".", we)), He(Te) || (Te = En(xo(De, ".", we, !0)))), Te.equals(V) || (J(Te), k == null || k(Te.isEmpty() ? null : ks(w, Te)), s === void 0 && ae(Te, ke)), Te;
  13181. }
  13182. return V;
  13183. }, nt = uS(), Ge = function $e(ge) {
  13184. if (Re(), j.current = ge, Q(ge), !B.current) {
  13185. var ke = D(ge), Te = En(ke);
  13186. Te.isNaN() || Ye(Te, !0);
  13187. }
  13188. L == null || L(ge), nt(function() {
  13189. var Ke = ge;
  13190. E || (Ke = ge.replace(/。/g, ".")), Ke !== ge && $e(Ke);
  13191. });
  13192. }, Ne = function() {
  13193. B.current = !0;
  13194. }, ce = function() {
  13195. B.current = !1, Ge(_.current.value);
  13196. }, he = function(ge) {
  13197. Ge(ge.target.value);
  13198. }, Ve = function(ge) {
  13199. var ke;
  13200. if (!(ge && pe || !ge && oe)) {
  13201. G.current = !1;
  13202. var Te = En(ne.current ? Ms(l) : l);
  13203. ge || (Te = Te.negate());
  13204. var Ke = (V || En(0)).add(Te.toString()), De = Ye(Ke, !1);
  13205. N == null || N(ks(w, De), {
  13206. offset: ne.current ? Ms(l) : l,
  13207. type: ge ? "up" : "down"
  13208. }), (ke = _.current) === null || ke === void 0 || ke.focus();
  13209. }
  13210. }, de = function(ge) {
  13211. var ke = En(D(te)), Te;
  13212. ke.isNaN() ? Te = Ye(V, ge) : Te = Ye(ke, ge), s !== void 0 ? ae(V, !1) : Te.isNaN() || ae(Te, !1);
  13213. }, be = function() {
  13214. G.current = !0;
  13215. }, Xe = function(ge) {
  13216. var ke = ge.key, Te = ge.shiftKey;
  13217. G.current = !0, ne.current = Te, ke === "Enter" && (B.current || (G.current = !1), de(!1), O == null || O(ge)), b !== !1 && !B.current && ["Up", "ArrowUp", "Down", "ArrowDown"].includes(ke) && (Ve(ke === "Up" || ke === "ArrowUp"), ge.preventDefault());
  13218. }, it = function() {
  13219. G.current = !1, ne.current = !1;
  13220. };
  13221. d.useEffect(function() {
  13222. if (h && $) {
  13223. var $e = function(Te) {
  13224. Ve(Te.deltaY < 0), Te.preventDefault();
  13225. }, ge = _.current;
  13226. if (ge)
  13227. return ge.addEventListener("wheel", $e, {
  13228. passive: !1
  13229. }), function() {
  13230. return ge.removeEventListener("wheel", $e);
  13231. };
  13232. }
  13233. });
  13234. var tt = function() {
  13235. I && de(!1), U(!1), G.current = !1;
  13236. };
  13237. return Wr(function() {
  13238. V.isInvalidate() || ae(V, !1);
  13239. }, [x, S]), Wr(function() {
  13240. var $e = En(s);
  13241. X($e);
  13242. var ge = En(D(te));
  13243. (!$e.equals(ge) || !G.current || S) && ae($e, G.current);
  13244. }, [s]), Wr(function() {
  13245. S && Be();
  13246. }, [te]), /* @__PURE__ */ d.createElement("div", {
  13247. ref: T,
  13248. className: xe(n, r, ie(ie(ie(ie(ie({}, "".concat(n, "-focused"), $), "".concat(n, "-disabled"), v), "".concat(n, "-readonly"), C), "".concat(n, "-not-a-number"), V.isNaN()), "".concat(n, "-out-of-range"), !V.isInvalidate() && !He(V))),
  13249. style: a,
  13250. onFocus: function() {
  13251. U(!0);
  13252. },
  13253. onBlur: tt,
  13254. onKeyDown: Xe,
  13255. onKeyUp: it,
  13256. onCompositionStart: Ne,
  13257. onCompositionEnd: ce,
  13258. onBeforeInput: be
  13259. }, y && /* @__PURE__ */ d.createElement(iS, {
  13260. prefixCls: n,
  13261. upNode: p,
  13262. downNode: m,
  13263. upDisabled: pe,
  13264. downDisabled: oe,
  13265. onStep: Ve
  13266. }), /* @__PURE__ */ d.createElement("div", {
  13267. className: "".concat(z, "-wrap")
  13268. }, /* @__PURE__ */ d.createElement("input", _e({
  13269. autoComplete: "off",
  13270. role: "spinbutton",
  13271. "aria-valuemin": o,
  13272. "aria-valuemax": i,
  13273. "aria-valuenow": V.isInvalidate() ? null : V.toString(),
  13274. step: l
  13275. }, P, {
  13276. ref: lr(_, t),
  13277. className: z,
  13278. value: te,
  13279. onChange: he,
  13280. disabled: v,
  13281. readOnly: C
  13282. }))));
  13283. }), dS = /* @__PURE__ */ d.forwardRef(function(e, t) {
  13284. var n = e.disabled, r = e.style, a = e.prefixCls, o = a === void 0 ? "rc-input-number" : a, i = e.value, u = e.prefix, l = e.suffix, c = e.addonBefore, s = e.addonAfter, v = e.className, C = e.classNames, p = mt(e, sS), m = d.useRef(null), b = d.useRef(null), f = d.useRef(null), h = function(y) {
  13285. f.current && gf(f.current, y);
  13286. };
  13287. return d.useImperativeHandle(t, function() {
  13288. return tS(f.current, {
  13289. focus: h,
  13290. nativeElement: m.current.nativeElement || b.current
  13291. });
  13292. }), /* @__PURE__ */ d.createElement(yf, {
  13293. className: v,
  13294. triggerFocus: h,
  13295. prefixCls: o,
  13296. value: i,
  13297. disabled: n,
  13298. style: r,
  13299. prefix: u,
  13300. suffix: l,
  13301. addonAfter: s,
  13302. addonBefore: c,
  13303. classNames: C,
  13304. components: {
  13305. affixWrapper: "div",
  13306. groupWrapper: "div",
  13307. wrapper: "div",
  13308. groupAddon: "div"
  13309. },
  13310. ref: m
  13311. }, /* @__PURE__ */ d.createElement(cS, _e({
  13312. prefixCls: o,
  13313. disabled: n,
  13314. ref: f,
  13315. domRef: b,
  13316. className: C == null ? void 0 : C.input
  13317. }, p)));
  13318. });
  13319. const fS = "univer-input-number", vS = "univer-input-number-focused", mS = "univer-input-number-handler-up", pS = "univer-input-number-handler-wrap", hS = "univer-input-number-handler", gS = "univer-input-number-handler-up-inner", yS = "univer-input-number-handler-down-inner", bS = "univer-input-number-disabled", CS = "univer-input-number-input-wrap", SS = "univer-input-number-input", wS = "univer-input-number-handler-down", xS = "univer-input-number-handler-down-disabled", ES = "univer-input-number-handler-up-disabled", RS = {
  13320. inputNumber: fS,
  13321. inputNumberFocused: vS,
  13322. inputNumberHandlerUp: mS,
  13323. inputNumberHandlerWrap: pS,
  13324. inputNumberHandler: hS,
  13325. inputNumberHandlerUpInner: gS,
  13326. inputNumberHandlerDownInner: yS,
  13327. inputNumberDisabled: bS,
  13328. inputNumberInputWrap: CS,
  13329. inputNumberInput: SS,
  13330. inputNumberHandlerDown: wS,
  13331. inputNumberHandlerDownDisabled: xS,
  13332. inputNumberHandlerUpDisabled: ES
  13333. }, BO = $t((e, t) => {
  13334. const {
  13335. className: n,
  13336. value: r,
  13337. max: a,
  13338. min: o,
  13339. step: i = 1,
  13340. precision: u,
  13341. disabled: l = !1,
  13342. controls: c = !0,
  13343. onClick: s,
  13344. onKeyDown: v,
  13345. onChange: C,
  13346. onPressEnter: p,
  13347. onBlur: m,
  13348. onFocus: b
  13349. } = e;
  13350. function f(h) {
  13351. h !== null && (C == null || C(h));
  13352. }
  13353. return /* @__PURE__ */ q.jsx(
  13354. dS,
  13355. {
  13356. ref: t,
  13357. prefixCls: RS.inputNumber,
  13358. className: n,
  13359. value: r,
  13360. max: a,
  13361. min: o,
  13362. step: i,
  13363. precision: u,
  13364. disabled: l,
  13365. controls: c,
  13366. onClick: s,
  13367. onKeyDown: v,
  13368. onChange: f,
  13369. onPressEnter: p,
  13370. onFocus: b,
  13371. onBlur: m
  13372. }
  13373. );
  13374. });
  13375. function wf(e, t) {
  13376. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, r = /* @__PURE__ */ new Set();
  13377. function a(o, i) {
  13378. var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, l = r.has(o);
  13379. if (ur(!l, "Warning: There may be circular references"), l)
  13380. return !1;
  13381. if (o === i)
  13382. return !0;
  13383. if (n && u > 1)
  13384. return !1;
  13385. r.add(o);
  13386. var c = u + 1;
  13387. if (Array.isArray(o)) {
  13388. if (!Array.isArray(i) || o.length !== i.length)
  13389. return !1;
  13390. for (var s = 0; s < o.length; s++)
  13391. if (!a(o[s], i[s], c))
  13392. return !1;
  13393. return !0;
  13394. }
  13395. if (o && i && Dn(o) === "object" && Dn(i) === "object") {
  13396. var v = Object.keys(o);
  13397. return v.length !== Object.keys(i).length ? !1 : v.every(function(C) {
  13398. return a(o[C], i[C], c);
  13399. });
  13400. }
  13401. return !1;
  13402. }
  13403. return a(e, t);
  13404. }
  13405. var xf = /* @__PURE__ */ d.createContext(null);
  13406. function Ef(e, t) {
  13407. return e === void 0 ? null : "".concat(e, "-").concat(t);
  13408. }
  13409. function Rf(e) {
  13410. var t = d.useContext(xf);
  13411. return Ef(t, e);
  13412. }
  13413. var PS = ["children", "locked"], Nn = /* @__PURE__ */ d.createContext(null);
  13414. function MS(e, t) {
  13415. var n = re({}, e);
  13416. return Object.keys(t).forEach(function(r) {
  13417. var a = t[r];
  13418. a !== void 0 && (n[r] = a);
  13419. }), n;
  13420. }
  13421. function Ta(e) {
  13422. var t = e.children, n = e.locked, r = mt(e, PS), a = d.useContext(Nn), o = Su(function() {
  13423. return MS(a, r);
  13424. }, [a, r], function(i, u) {
  13425. return !n && (i[0] !== u[0] || !wf(i[1], u[1], !0));
  13426. });
  13427. return /* @__PURE__ */ d.createElement(Nn.Provider, {
  13428. value: o
  13429. }, t);
  13430. }
  13431. var kS = [], Pf = /* @__PURE__ */ d.createContext(null);
  13432. function Zo() {
  13433. return d.useContext(Pf);
  13434. }
  13435. var Mf = /* @__PURE__ */ d.createContext(kS);
  13436. function za(e) {
  13437. var t = d.useContext(Mf);
  13438. return d.useMemo(function() {
  13439. return e !== void 0 ? [].concat(ft(t), [e]) : t;
  13440. }, [t, e]);
  13441. }
  13442. var kf = /* @__PURE__ */ d.createContext(null), Wu = /* @__PURE__ */ d.createContext({});
  13443. function Ns(e) {
  13444. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  13445. if (_u(e)) {
  13446. var n = e.nodeName.toLowerCase(), r = (
  13447. // Focusable element
  13448. ["input", "select", "textarea", "button"].includes(n) || // Editable element
  13449. e.isContentEditable || // Anchor with href element
  13450. n === "a" && !!e.getAttribute("href")
  13451. ), a = e.getAttribute("tabindex"), o = Number(a), i = null;
  13452. return a && !Number.isNaN(o) ? i = o : r && i === null && (i = 0), r && e.disabled && (i = null), i !== null && (i >= 0 || t && i < 0);
  13453. }
  13454. return !1;
  13455. }
  13456. function DS(e) {
  13457. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = Yc(e.querySelectorAll("*")).filter(function(r) {
  13458. return Ns(r, t);
  13459. });
  13460. return Ns(e, t) && n.unshift(e), n;
  13461. }
  13462. var au = fe.LEFT, ou = fe.RIGHT, iu = fe.UP, Eo = fe.DOWN, Ro = fe.ENTER, Df = fe.ESC, fa = fe.HOME, va = fe.END, Is = [iu, Eo, au, ou];
  13463. function NS(e, t, n, r) {
  13464. var a, o = "prev", i = "next", u = "children", l = "parent";
  13465. if (e === "inline" && r === Ro)
  13466. return {
  13467. inlineTrigger: !0
  13468. };
  13469. var c = ie(ie({}, iu, o), Eo, i), s = ie(ie(ie(ie({}, au, n ? i : o), ou, n ? o : i), Eo, u), Ro, u), v = ie(ie(ie(ie(ie(ie({}, iu, o), Eo, i), Ro, u), Df, l), au, n ? u : l), ou, n ? l : u), C = {
  13470. inline: c,
  13471. horizontal: s,
  13472. vertical: v,
  13473. inlineSub: c,
  13474. horizontalSub: v,
  13475. verticalSub: v
  13476. }, p = (a = C["".concat(e).concat(t ? "" : "Sub")]) === null || a === void 0 ? void 0 : a[r];
  13477. switch (p) {
  13478. case o:
  13479. return {
  13480. offset: -1,
  13481. sibling: !0
  13482. };
  13483. case i:
  13484. return {
  13485. offset: 1,
  13486. sibling: !0
  13487. };
  13488. case l:
  13489. return {
  13490. offset: -1,
  13491. sibling: !1
  13492. };
  13493. case u:
  13494. return {
  13495. offset: 1,
  13496. sibling: !1
  13497. };
  13498. default:
  13499. return null;
  13500. }
  13501. }
  13502. function IS(e) {
  13503. for (var t = e; t; ) {
  13504. if (t.getAttribute("data-menu-list"))
  13505. return t;
  13506. t = t.parentElement;
  13507. }
  13508. return null;
  13509. }
  13510. function OS(e, t) {
  13511. for (var n = e || document.activeElement; n; ) {
  13512. if (t.has(n))
  13513. return n;
  13514. n = n.parentElement;
  13515. }
  13516. return null;
  13517. }
  13518. function Bu(e, t) {
  13519. var n = DS(e, !0);
  13520. return n.filter(function(r) {
  13521. return t.has(r);
  13522. });
  13523. }
  13524. function Os(e, t, n) {
  13525. var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
  13526. if (!e)
  13527. return null;
  13528. var a = Bu(e, t), o = a.length, i = a.findIndex(function(u) {
  13529. return n === u;
  13530. });
  13531. return r < 0 ? i === -1 ? i = o - 1 : i -= 1 : r > 0 && (i += 1), i = (i + o) % o, a[i];
  13532. }
  13533. var uu = function(t, n) {
  13534. var r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
  13535. return t.forEach(function(i) {
  13536. var u = document.querySelector("[data-menu-id='".concat(Ef(n, i), "']"));
  13537. u && (r.add(u), o.set(u, i), a.set(i, u));
  13538. }), {
  13539. elements: r,
  13540. key2element: a,
  13541. element2key: o
  13542. };
  13543. };
  13544. function _S(e, t, n, r, a, o, i, u, l, c) {
  13545. var s = d.useRef(), v = d.useRef();
  13546. v.current = t;
  13547. var C = function() {
  13548. st.cancel(s.current);
  13549. };
  13550. return d.useEffect(function() {
  13551. return function() {
  13552. C();
  13553. };
  13554. }, []), function(p) {
  13555. var m = p.which;
  13556. if ([].concat(Is, [Ro, Df, fa, va]).includes(m)) {
  13557. var b = o(), f = uu(b, r), h = f, g = h.elements, y = h.key2element, w = h.element2key, E = y.get(t), S = OS(E, g), x = w.get(S), R = NS(e, i(x, !0).length === 1, n, m);
  13558. if (!R && m !== fa && m !== va)
  13559. return;
  13560. (Is.includes(m) || [fa, va].includes(m)) && p.preventDefault();
  13561. var k = function(z) {
  13562. if (z) {
  13563. var _ = z, A = z.querySelector("a");
  13564. A != null && A.getAttribute("href") && (_ = A);
  13565. var H = w.get(z);
  13566. u(H), C(), s.current = st(function() {
  13567. v.current === H && _.focus();
  13568. });
  13569. }
  13570. };
  13571. if ([fa, va].includes(m) || R.sibling || !S) {
  13572. var L;
  13573. !S || e === "inline" ? L = a.current : L = IS(S);
  13574. var O, N = Bu(L, g);
  13575. m === fa ? O = N[0] : m === va ? O = N[N.length - 1] : O = Os(L, g, S, R.offset), k(O);
  13576. } else if (R.inlineTrigger)
  13577. l(x);
  13578. else if (R.offset > 0)
  13579. l(x, !0), C(), s.current = st(function() {
  13580. f = uu(b, r);
  13581. var P = S.getAttribute("aria-controls"), z = document.getElementById(P), _ = Os(z, f.elements);
  13582. k(_);
  13583. }, 5);
  13584. else if (R.offset < 0) {
  13585. var F = i(x, !0), I = F[F.length - 2], T = y.get(I);
  13586. l(I, !1), k(T);
  13587. }
  13588. }
  13589. c == null || c(p);
  13590. };
  13591. }
  13592. function LS(e) {
  13593. Promise.resolve().then(e);
  13594. }
  13595. var Uu = "__RC_UTIL_PATH_SPLIT__", _s = function(t) {
  13596. return t.join(Uu);
  13597. }, TS = function(t) {
  13598. return t.split(Uu);
  13599. }, lu = "rc-menu-more";
  13600. function $S() {
  13601. var e = d.useState({}), t = Z(e, 2), n = t[1], r = Ce(/* @__PURE__ */ new Map()), a = Ce(/* @__PURE__ */ new Map()), o = d.useState([]), i = Z(o, 2), u = i[0], l = i[1], c = Ce(0), s = Ce(!1), v = function() {
  13602. s.current || n({});
  13603. }, C = Ot(function(y, w) {
  13604. var E = _s(w);
  13605. a.current.set(E, y), r.current.set(y, E), c.current += 1;
  13606. var S = c.current;
  13607. LS(function() {
  13608. S === c.current && v();
  13609. });
  13610. }, []), p = Ot(function(y, w) {
  13611. var E = _s(w);
  13612. a.current.delete(E), r.current.delete(y);
  13613. }, []), m = Ot(function(y) {
  13614. l(y);
  13615. }, []), b = Ot(function(y, w) {
  13616. var E = r.current.get(y) || "", S = TS(E);
  13617. return w && u.includes(S[0]) && S.unshift(lu), S;
  13618. }, [u]), f = Ot(function(y, w) {
  13619. return y.filter(function(E) {
  13620. return E !== void 0;
  13621. }).some(function(E) {
  13622. var S = b(E, !0);
  13623. return S.includes(w);
  13624. });
  13625. }, [b]), h = function() {
  13626. var w = ft(r.current.keys());
  13627. return u.length && w.push(lu), w;
  13628. }, g = Ot(function(y) {
  13629. var w = "".concat(r.current.get(y)).concat(Uu), E = /* @__PURE__ */ new Set();
  13630. return ft(a.current.keys()).forEach(function(S) {
  13631. S.startsWith(w) && E.add(a.current.get(S));
  13632. }), E;
  13633. }, []);
  13634. return d.useEffect(function() {
  13635. return function() {
  13636. s.current = !0;
  13637. };
  13638. }, []), {
  13639. // Register
  13640. registerPath: C,
  13641. unregisterPath: p,
  13642. refreshOverflowKeys: m,
  13643. // Util
  13644. isSubPathKey: f,
  13645. getKeyPath: b,
  13646. getKeys: h,
  13647. getSubPathKeys: g
  13648. };
  13649. }
  13650. function Ea(e) {
  13651. var t = d.useRef(e);
  13652. t.current = e;
  13653. var n = d.useCallback(function() {
  13654. for (var r, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
  13655. o[i] = arguments[i];
  13656. return (r = t.current) === null || r === void 0 ? void 0 : r.call.apply(r, [t].concat(o));
  13657. }, []);
  13658. return e ? n : void 0;
  13659. }
  13660. var AS = Math.random().toFixed(5).toString().slice(2), Ls = 0;
  13661. function jS(e) {
  13662. var t = Gt(e, {
  13663. value: e
  13664. }), n = Z(t, 2), r = n[0], a = n[1];
  13665. return d.useEffect(function() {
  13666. Ls += 1;
  13667. var o = "".concat(AS, "-").concat(Ls);
  13668. a("rc-menu-uuid-".concat(o));
  13669. }, []), r;
  13670. }
  13671. function Nf(e, t, n, r) {
  13672. var a = d.useContext(Nn), o = a.activeKey, i = a.onActive, u = a.onInactive, l = {
  13673. active: o === e
  13674. };
  13675. return t || (l.onMouseEnter = function(c) {
  13676. n == null || n({
  13677. key: e,
  13678. domEvent: c
  13679. }), i(e);
  13680. }, l.onMouseLeave = function(c) {
  13681. r == null || r({
  13682. key: e,
  13683. domEvent: c
  13684. }), u(e);
  13685. }), l;
  13686. }
  13687. function If(e) {
  13688. var t = d.useContext(Nn), n = t.mode, r = t.rtl, a = t.inlineIndent;
  13689. if (n !== "inline")
  13690. return null;
  13691. var o = e;
  13692. return r ? {
  13693. paddingRight: o * a
  13694. } : {
  13695. paddingLeft: o * a
  13696. };
  13697. }
  13698. function Of(e) {
  13699. var t = e.icon, n = e.props, r = e.children, a;
  13700. return t === null || t === !1 ? null : (typeof t == "function" ? a = /* @__PURE__ */ d.createElement(t, re({}, n)) : typeof t != "boolean" && (a = t), a || r || null);
  13701. }
  13702. var FS = ["item"];
  13703. function $o(e) {
  13704. var t = e.item, n = mt(e, FS);
  13705. return Object.defineProperty(n, "item", {
  13706. get: function() {
  13707. return ur(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), t;
  13708. }
  13709. }), n;
  13710. }
  13711. var zS = ["title", "attribute", "elementRef"], HS = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], VS = ["active"], WS = /* @__PURE__ */ function(e) {
  13712. Nu(n, e);
  13713. var t = Iu(n);
  13714. function n() {
  13715. return Rr(this, n), t.apply(this, arguments);
  13716. }
  13717. return Pr(n, [{
  13718. key: "render",
  13719. value: function() {
  13720. var a = this.props, o = a.title, i = a.attribute, u = a.elementRef, l = mt(a, zS), c = Er(l, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
  13721. return ur(!i, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ d.createElement(kn.Item, _e({}, i, {
  13722. title: typeof o == "string" ? o : void 0
  13723. }, c, {
  13724. ref: u
  13725. }));
  13726. }
  13727. }]), n;
  13728. }(d.Component), BS = /* @__PURE__ */ d.forwardRef(function(e, t) {
  13729. var n = e.style, r = e.className, a = e.eventKey;
  13730. e.warnKey;
  13731. var o = e.disabled, i = e.itemIcon, u = e.children, l = e.role, c = e.onMouseEnter, s = e.onMouseLeave, v = e.onClick, C = e.onKeyDown, p = e.onFocus, m = mt(e, HS), b = Rf(a), f = d.useContext(Nn), h = f.prefixCls, g = f.onItemClick, y = f.disabled, w = f.overflowDisabled, E = f.itemIcon, S = f.selectedKeys, x = f.onActive, R = d.useContext(Wu), k = R._internalRenderMenuItem, L = "".concat(h, "-item"), O = d.useRef(), N = d.useRef(), F = y || o, I = Gr(t, N), T = za(a), P = function(X) {
  13732. return {
  13733. key: a,
  13734. // Note: For legacy code is reversed which not like other antd component
  13735. keyPath: ft(T).reverse(),
  13736. item: O.current,
  13737. domEvent: X
  13738. };
  13739. }, z = i || E, _ = Nf(a, F, c, s), A = _.active, H = mt(_, VS), $ = S.includes(a), U = If(T.length), G = function(X) {
  13740. if (!F) {
  13741. var J = P(X);
  13742. v == null || v($o(J)), g(J);
  13743. }
  13744. }, B = function(X) {
  13745. if (C == null || C(X), X.which === fe.ENTER) {
  13746. var J = P(X);
  13747. v == null || v($o(J)), g(J);
  13748. }
  13749. }, ne = function(X) {
  13750. x(a), p == null || p(X);
  13751. }, le = {};
  13752. e.role === "option" && (le["aria-selected"] = $);
  13753. var ee = /* @__PURE__ */ d.createElement(WS, _e({
  13754. ref: O,
  13755. elementRef: I,
  13756. role: l === null ? "none" : l || "menuitem",
  13757. tabIndex: o ? null : -1,
  13758. "data-menu-id": w && b ? null : b
  13759. }, Er(m, ["extra"]), H, le, {
  13760. component: "li",
  13761. "aria-disabled": o,
  13762. style: re(re({}, U), n),
  13763. className: xe(L, ie(ie(ie({}, "".concat(L, "-active"), A), "".concat(L, "-selected"), $), "".concat(L, "-disabled"), F), r),
  13764. onClick: G,
  13765. onKeyDown: B,
  13766. onFocus: ne
  13767. }), u, /* @__PURE__ */ d.createElement(Of, {
  13768. props: re(re({}, e), {}, {
  13769. isSelected: $
  13770. }),
  13771. icon: z
  13772. }));
  13773. return k && (ee = k(ee, e, {
  13774. selected: $
  13775. })), ee;
  13776. });
  13777. function US(e, t) {
  13778. var n = e.eventKey, r = Zo(), a = za(n);
  13779. return d.useEffect(function() {
  13780. if (r)
  13781. return r.registerPath(n, a), function() {
  13782. r.unregisterPath(n, a);
  13783. };
  13784. }, [a]), r ? null : /* @__PURE__ */ d.createElement(BS, _e({}, e, {
  13785. ref: t
  13786. }));
  13787. }
  13788. const Qo = /* @__PURE__ */ d.forwardRef(US);
  13789. var qS = ["className", "children"], KS = function(t, n) {
  13790. var r = t.className, a = t.children, o = mt(t, qS), i = d.useContext(Nn), u = i.prefixCls, l = i.mode, c = i.rtl;
  13791. return /* @__PURE__ */ d.createElement("ul", _e({
  13792. className: xe(u, c && "".concat(u, "-rtl"), "".concat(u, "-sub"), "".concat(u, "-").concat(l === "inline" ? "inline" : "vertical"), r),
  13793. role: "menu"
  13794. }, o, {
  13795. "data-menu-list": !0,
  13796. ref: n
  13797. }), a);
  13798. }, qu = /* @__PURE__ */ d.forwardRef(KS);
  13799. qu.displayName = "SubMenuList";
  13800. function Ku(e, t) {
  13801. return Oa(e).map(function(n, r) {
  13802. if (/* @__PURE__ */ d.isValidElement(n)) {
  13803. var a, o, i = n.key, u = (a = (o = n.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && a !== void 0 ? a : i, l = u == null;
  13804. l && (u = "tmp_key-".concat([].concat(ft(t), [r]).join("-")));
  13805. var c = {
  13806. key: u,
  13807. eventKey: u
  13808. };
  13809. return /* @__PURE__ */ d.cloneElement(n, c);
  13810. }
  13811. return n;
  13812. });
  13813. }
  13814. var tn = {
  13815. adjustX: 1,
  13816. adjustY: 1
  13817. }, YS = {
  13818. topLeft: {
  13819. points: ["bl", "tl"],
  13820. overflow: tn
  13821. },
  13822. topRight: {
  13823. points: ["br", "tr"],
  13824. overflow: tn
  13825. },
  13826. bottomLeft: {
  13827. points: ["tl", "bl"],
  13828. overflow: tn
  13829. },
  13830. bottomRight: {
  13831. points: ["tr", "br"],
  13832. overflow: tn
  13833. },
  13834. leftTop: {
  13835. points: ["tr", "tl"],
  13836. overflow: tn
  13837. },
  13838. leftBottom: {
  13839. points: ["br", "bl"],
  13840. overflow: tn
  13841. },
  13842. rightTop: {
  13843. points: ["tl", "tr"],
  13844. overflow: tn
  13845. },
  13846. rightBottom: {
  13847. points: ["bl", "br"],
  13848. overflow: tn
  13849. }
  13850. }, GS = {
  13851. topLeft: {
  13852. points: ["bl", "tl"],
  13853. overflow: tn
  13854. },
  13855. topRight: {
  13856. points: ["br", "tr"],
  13857. overflow: tn
  13858. },
  13859. bottomLeft: {
  13860. points: ["tl", "bl"],
  13861. overflow: tn
  13862. },
  13863. bottomRight: {
  13864. points: ["tr", "br"],
  13865. overflow: tn
  13866. },
  13867. rightTop: {
  13868. points: ["tr", "tl"],
  13869. overflow: tn
  13870. },
  13871. rightBottom: {
  13872. points: ["br", "bl"],
  13873. overflow: tn
  13874. },
  13875. leftTop: {
  13876. points: ["tl", "tr"],
  13877. overflow: tn
  13878. },
  13879. leftBottom: {
  13880. points: ["bl", "br"],
  13881. overflow: tn
  13882. }
  13883. };
  13884. function _f(e, t, n) {
  13885. if (t)
  13886. return t;
  13887. if (n)
  13888. return n[e] || n.other;
  13889. }
  13890. var XS = {
  13891. horizontal: "bottomLeft",
  13892. vertical: "rightTop",
  13893. "vertical-left": "rightTop",
  13894. "vertical-right": "leftTop"
  13895. };
  13896. function ZS(e) {
  13897. var t = e.prefixCls, n = e.visible, r = e.children, a = e.popup, o = e.popupStyle, i = e.popupClassName, u = e.popupOffset, l = e.disabled, c = e.mode, s = e.onVisibleChange, v = d.useContext(Nn), C = v.getPopupContainer, p = v.rtl, m = v.subMenuOpenDelay, b = v.subMenuCloseDelay, f = v.builtinPlacements, h = v.triggerSubMenuAction, g = v.forceSubMenuRender, y = v.rootClassName, w = v.motion, E = v.defaultMotions, S = d.useState(!1), x = Z(S, 2), R = x[0], k = x[1], L = re(p ? re({}, GS) : re({}, YS), f), O = XS[c], N = _f(c, w, E), F = d.useRef(N);
  13898. c !== "inline" && (F.current = N);
  13899. var I = re(re({}, F.current), {}, {
  13900. leavedClassName: "".concat(t, "-hidden"),
  13901. removeOnLeave: !1,
  13902. motionAppear: !0
  13903. }), T = d.useRef();
  13904. return d.useEffect(function() {
  13905. return T.current = st(function() {
  13906. k(n);
  13907. }), function() {
  13908. st.cancel(T.current);
  13909. };
  13910. }, [n]), /* @__PURE__ */ d.createElement(Uo, {
  13911. prefixCls: t,
  13912. popupClassName: xe("".concat(t, "-popup"), ie({}, "".concat(t, "-rtl"), p), i, y),
  13913. stretch: c === "horizontal" ? "minWidth" : null,
  13914. getPopupContainer: C,
  13915. builtinPlacements: L,
  13916. popupPlacement: O,
  13917. popupVisible: R,
  13918. popup: a,
  13919. popupStyle: o,
  13920. popupAlign: u && {
  13921. offset: u
  13922. },
  13923. action: l ? [] : [h],
  13924. mouseEnterDelay: m,
  13925. mouseLeaveDelay: b,
  13926. onPopupVisibleChange: s,
  13927. forceRender: g,
  13928. popupMotion: I,
  13929. fresh: !0
  13930. }, r);
  13931. }
  13932. function QS(e) {
  13933. var t = e.id, n = e.open, r = e.keyPath, a = e.children, o = "inline", i = d.useContext(Nn), u = i.prefixCls, l = i.forceSubMenuRender, c = i.motion, s = i.defaultMotions, v = i.mode, C = d.useRef(!1);
  13934. C.current = v === o;
  13935. var p = d.useState(!C.current), m = Z(p, 2), b = m[0], f = m[1], h = C.current ? n : !1;
  13936. d.useEffect(function() {
  13937. C.current && f(!1);
  13938. }, [v]);
  13939. var g = re({}, _f(o, c, s));
  13940. r.length > 1 && (g.motionAppear = !1);
  13941. var y = g.onVisibleChanged;
  13942. return g.onVisibleChanged = function(w) {
  13943. return !C.current && !w && f(!0), y == null ? void 0 : y(w);
  13944. }, b ? null : /* @__PURE__ */ d.createElement(Ta, {
  13945. mode: o,
  13946. locked: !C.current
  13947. }, /* @__PURE__ */ d.createElement(Bo, _e({
  13948. visible: h
  13949. }, g, {
  13950. forceRender: l,
  13951. removeOnLeave: !1,
  13952. leavedClassName: "".concat(u, "-hidden")
  13953. }), function(w) {
  13954. var E = w.className, S = w.style;
  13955. return /* @__PURE__ */ d.createElement(qu, {
  13956. id: t,
  13957. className: E,
  13958. style: S
  13959. }, a);
  13960. }));
  13961. }
  13962. var JS = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], ew = ["active"], tw = /* @__PURE__ */ d.forwardRef(function(e, t) {
  13963. var n = e.style, r = e.className, a = e.title, o = e.eventKey;
  13964. e.warnKey;
  13965. var i = e.disabled, u = e.internalPopupClose, l = e.children, c = e.itemIcon, s = e.expandIcon, v = e.popupClassName, C = e.popupOffset, p = e.popupStyle, m = e.onClick, b = e.onMouseEnter, f = e.onMouseLeave, h = e.onTitleClick, g = e.onTitleMouseEnter, y = e.onTitleMouseLeave, w = mt(e, JS), E = Rf(o), S = d.useContext(Nn), x = S.prefixCls, R = S.mode, k = S.openKeys, L = S.disabled, O = S.overflowDisabled, N = S.activeKey, F = S.selectedKeys, I = S.itemIcon, T = S.expandIcon, P = S.onItemClick, z = S.onOpenChange, _ = S.onActive, A = d.useContext(Wu), H = A._internalRenderSubMenuItem, $ = d.useContext(kf), U = $.isSubPathKey, G = za(), B = "".concat(x, "-submenu"), ne = L || i, le = d.useRef(), ee = d.useRef(), V = c != null ? c : I, X = s != null ? s : T, J = k.includes(o), M = !O && J, D = U(F, o), j = Nf(o, ne, g, y), W = j.active, K = mt(j, ew), Y = d.useState(!1), te = Z(Y, 2), Q = te[0], ae = te[1], ue = function(he) {
  13966. ne || ae(he);
  13967. }, se = function(he) {
  13968. ue(!0), b == null || b({
  13969. key: o,
  13970. domEvent: he
  13971. });
  13972. }, pe = function(he) {
  13973. ue(!1), f == null || f({
  13974. key: o,
  13975. domEvent: he
  13976. });
  13977. }, oe = d.useMemo(function() {
  13978. return W || (R !== "inline" ? Q || U([N], o) : !1);
  13979. }, [R, W, N, Q, o, U]), ve = If(G.length), ze = function(he) {
  13980. ne || (h == null || h({
  13981. key: o,
  13982. domEvent: he
  13983. }), R === "inline" && z(o, !J));
  13984. }, Re = Ea(function(ce) {
  13985. m == null || m($o(ce)), P(ce);
  13986. }), Be = function(he) {
  13987. R !== "inline" && z(o, he);
  13988. }, je = function() {
  13989. _(o);
  13990. }, He = E && "".concat(E, "-popup"), Ye = /* @__PURE__ */ d.createElement("div", _e({
  13991. role: "menuitem",
  13992. style: ve,
  13993. className: "".concat(B, "-title"),
  13994. tabIndex: ne ? null : -1,
  13995. ref: le,
  13996. title: typeof a == "string" ? a : null,
  13997. "data-menu-id": O && E ? null : E,
  13998. "aria-expanded": M,
  13999. "aria-haspopup": !0,
  14000. "aria-controls": He,
  14001. "aria-disabled": ne,
  14002. onClick: ze,
  14003. onFocus: je
  14004. }, K), a, /* @__PURE__ */ d.createElement(Of, {
  14005. icon: R !== "horizontal" ? X : void 0,
  14006. props: re(re({}, e), {}, {
  14007. isOpen: M,
  14008. // [Legacy] Not sure why need this mark
  14009. isSubMenu: !0
  14010. })
  14011. }, /* @__PURE__ */ d.createElement("i", {
  14012. className: "".concat(B, "-arrow")
  14013. }))), nt = d.useRef(R);
  14014. if (R !== "inline" && G.length > 1 ? nt.current = "vertical" : nt.current = R, !O) {
  14015. var Ge = nt.current;
  14016. Ye = /* @__PURE__ */ d.createElement(ZS, {
  14017. mode: Ge,
  14018. prefixCls: B,
  14019. visible: !u && M && R !== "inline",
  14020. popupClassName: v,
  14021. popupOffset: C,
  14022. popupStyle: p,
  14023. popup: /* @__PURE__ */ d.createElement(
  14024. Ta,
  14025. {
  14026. mode: Ge === "horizontal" ? "vertical" : Ge
  14027. },
  14028. /* @__PURE__ */ d.createElement(qu, {
  14029. id: He,
  14030. ref: ee
  14031. }, l)
  14032. ),
  14033. disabled: ne,
  14034. onVisibleChange: Be
  14035. }, Ye);
  14036. }
  14037. var Ne = /* @__PURE__ */ d.createElement(kn.Item, _e({
  14038. ref: t,
  14039. role: "none"
  14040. }, w, {
  14041. component: "li",
  14042. style: n,
  14043. className: xe(B, "".concat(B, "-").concat(R), r, ie(ie(ie(ie({}, "".concat(B, "-open"), M), "".concat(B, "-active"), oe), "".concat(B, "-selected"), D), "".concat(B, "-disabled"), ne)),
  14044. onMouseEnter: se,
  14045. onMouseLeave: pe
  14046. }), Ye, !O && /* @__PURE__ */ d.createElement(QS, {
  14047. id: He,
  14048. open: M,
  14049. keyPath: G
  14050. }, l));
  14051. return H && (Ne = H(Ne, e, {
  14052. selected: D,
  14053. active: oe,
  14054. open: M,
  14055. disabled: ne
  14056. })), /* @__PURE__ */ d.createElement(Ta, {
  14057. onItemClick: Re,
  14058. mode: R === "horizontal" ? "vertical" : R,
  14059. itemIcon: V,
  14060. expandIcon: X
  14061. }, Ne);
  14062. }), Jo = /* @__PURE__ */ d.forwardRef(function(e, t) {
  14063. var n = e.eventKey, r = e.children, a = za(n), o = Ku(r, a), i = Zo();
  14064. d.useEffect(function() {
  14065. if (i)
  14066. return i.registerPath(n, a), function() {
  14067. i.unregisterPath(n, a);
  14068. };
  14069. }, [a]);
  14070. var u;
  14071. return i ? u = o : u = /* @__PURE__ */ d.createElement(tw, _e({
  14072. ref: t
  14073. }, e), o), /* @__PURE__ */ d.createElement(Mf.Provider, {
  14074. value: a
  14075. }, u);
  14076. });
  14077. function Lf(e) {
  14078. var t = e.className, n = e.style, r = d.useContext(Nn), a = r.prefixCls, o = Zo();
  14079. return o ? null : /* @__PURE__ */ d.createElement("li", {
  14080. role: "separator",
  14081. className: xe("".concat(a, "-item-divider"), t),
  14082. style: n
  14083. });
  14084. }
  14085. var nw = ["className", "title", "eventKey", "children"], rw = /* @__PURE__ */ d.forwardRef(function(e, t) {
  14086. var n = e.className, r = e.title;
  14087. e.eventKey;
  14088. var a = e.children, o = mt(e, nw), i = d.useContext(Nn), u = i.prefixCls, l = "".concat(u, "-item-group");
  14089. return /* @__PURE__ */ d.createElement("li", _e({
  14090. ref: t,
  14091. role: "presentation"
  14092. }, o, {
  14093. onClick: function(s) {
  14094. return s.stopPropagation();
  14095. },
  14096. className: xe(l, n)
  14097. }), /* @__PURE__ */ d.createElement("div", {
  14098. role: "presentation",
  14099. className: "".concat(l, "-title"),
  14100. title: typeof r == "string" ? r : void 0
  14101. }, r), /* @__PURE__ */ d.createElement("ul", {
  14102. role: "group",
  14103. className: "".concat(l, "-list")
  14104. }, a));
  14105. }), Yu = /* @__PURE__ */ d.forwardRef(function(e, t) {
  14106. var n = e.eventKey, r = e.children, a = za(n), o = Ku(r, a), i = Zo();
  14107. return i ? o : /* @__PURE__ */ d.createElement(rw, _e({
  14108. ref: t
  14109. }, Er(e, ["warnKey"])), o);
  14110. }), aw = ["label", "children", "key", "type", "extra"];
  14111. function su(e, t, n) {
  14112. var r = t.item, a = t.group, o = t.submenu, i = t.divider;
  14113. return (e || []).map(function(u, l) {
  14114. if (u && _t(u) === "object") {
  14115. var c = u, s = c.label, v = c.children, C = c.key, p = c.type, m = c.extra, b = mt(c, aw), f = C != null ? C : "tmp-".concat(l);
  14116. return v || p === "group" ? p === "group" ? /* @__PURE__ */ d.createElement(a, _e({
  14117. key: f
  14118. }, b, {
  14119. title: s
  14120. }), su(v, t, n)) : /* @__PURE__ */ d.createElement(o, _e({
  14121. key: f
  14122. }, b, {
  14123. title: s
  14124. }), su(v, t, n)) : p === "divider" ? /* @__PURE__ */ d.createElement(i, _e({
  14125. key: f
  14126. }, b)) : /* @__PURE__ */ d.createElement(r, _e({
  14127. key: f
  14128. }, b, {
  14129. extra: m
  14130. }), s, (!!m || m === 0) && /* @__PURE__ */ d.createElement("span", {
  14131. className: "".concat(n, "-item-extra")
  14132. }, m));
  14133. }
  14134. return null;
  14135. }).filter(function(u) {
  14136. return u;
  14137. });
  14138. }
  14139. function Ts(e, t, n, r, a) {
  14140. var o = e, i = re({
  14141. divider: Lf,
  14142. item: Qo,
  14143. group: Yu,
  14144. submenu: Jo
  14145. }, r);
  14146. return t && (o = su(t, i, a)), Ku(o, n);
  14147. }
  14148. var ow = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], fr = [], iw = /* @__PURE__ */ d.forwardRef(function(e, t) {
  14149. var n, r = e, a = r.prefixCls, o = a === void 0 ? "rc-menu" : a, i = r.rootClassName, u = r.style, l = r.className, c = r.tabIndex, s = c === void 0 ? 0 : c, v = r.items, C = r.children, p = r.direction, m = r.id, b = r.mode, f = b === void 0 ? "vertical" : b, h = r.inlineCollapsed, g = r.disabled, y = r.disabledOverflow, w = r.subMenuOpenDelay, E = w === void 0 ? 0.1 : w, S = r.subMenuCloseDelay, x = S === void 0 ? 0.1 : S, R = r.forceSubMenuRender, k = r.defaultOpenKeys, L = r.openKeys, O = r.activeKey, N = r.defaultActiveFirst, F = r.selectable, I = F === void 0 ? !0 : F, T = r.multiple, P = T === void 0 ? !1 : T, z = r.defaultSelectedKeys, _ = r.selectedKeys, A = r.onSelect, H = r.onDeselect, $ = r.inlineIndent, U = $ === void 0 ? 24 : $, G = r.motion, B = r.defaultMotions, ne = r.triggerSubMenuAction, le = ne === void 0 ? "hover" : ne, ee = r.builtinPlacements, V = r.itemIcon, X = r.expandIcon, J = r.overflowedIndicator, M = J === void 0 ? "..." : J, D = r.overflowedIndicatorPopupClassName, j = r.getPopupContainer, W = r.onClick, K = r.onOpenChange, Y = r.onKeyDown;
  14150. r.openAnimation, r.openTransitionName;
  14151. var te = r._internalRenderMenuItem, Q = r._internalRenderSubMenuItem, ae = r._internalComponents, ue = mt(r, ow), se = d.useMemo(function() {
  14152. return [Ts(C, v, fr, ae, o), Ts(C, v, fr, {}, o)];
  14153. }, [C, v, ae]), pe = Z(se, 2), oe = pe[0], ve = pe[1], ze = d.useState(!1), Re = Z(ze, 2), Be = Re[0], je = Re[1], He = d.useRef(), Ye = jS(m), nt = p === "rtl", Ge = Gt(k, {
  14154. value: L,
  14155. postState: function(Ee) {
  14156. return Ee || fr;
  14157. }
  14158. }), Ne = Z(Ge, 2), ce = Ne[0], he = Ne[1], Ve = function(Ee) {
  14159. var Je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  14160. function ct() {
  14161. he(Ee), K == null || K(Ee);
  14162. }
  14163. Je ? Di(ct) : ct();
  14164. }, de = d.useState(ce), be = Z(de, 2), Xe = be[0], it = be[1], tt = d.useRef(!1), $e = d.useMemo(function() {
  14165. return (f === "inline" || f === "vertical") && h ? ["vertical", h] : [f, !1];
  14166. }, [f, h]), ge = Z($e, 2), ke = ge[0], Te = ge[1], Ke = ke === "inline", De = d.useState(ke), we = Z(De, 2), ye = we[0], ut = we[1], yt = d.useState(Te), Ie = Z(yt, 2), Oe = Ie[0], We = Ie[1];
  14167. d.useEffect(function() {
  14168. ut(ke), We(Te), tt.current && (Ke ? he(Xe) : Ve(fr));
  14169. }, [ke, Te]);
  14170. var Ue = d.useState(0), Ze = Z(Ue, 2), at = Ze[0], Lt = Ze[1], Et = at >= oe.length - 1 || ye !== "horizontal" || y;
  14171. d.useEffect(function() {
  14172. Ke && it(ce);
  14173. }, [ce]), d.useEffect(function() {
  14174. return tt.current = !0, function() {
  14175. tt.current = !1;
  14176. };
  14177. }, []);
  14178. var wt = $S(), pt = wt.registerPath, xt = wt.unregisterPath, Ft = wt.refreshOverflowKeys, Mt = wt.isSubPathKey, Qt = wt.getKeyPath, Le = wt.getKeys, Pe = wt.getSubPathKeys, qe = d.useMemo(function() {
  14179. return {
  14180. registerPath: pt,
  14181. unregisterPath: xt
  14182. };
  14183. }, [pt, xt]), vt = d.useMemo(function() {
  14184. return {
  14185. isSubPathKey: Mt
  14186. };
  14187. }, [Mt]);
  14188. d.useEffect(function() {
  14189. Ft(Et ? fr : oe.slice(at + 1).map(function(Fe) {
  14190. return Fe.key;
  14191. }));
  14192. }, [at, Et]);
  14193. var ht = Gt(O || N && ((n = oe[0]) === null || n === void 0 ? void 0 : n.key), {
  14194. value: O
  14195. }), Dt = Z(ht, 2), Nt = Dt[0], an = Dt[1], vn = Ea(function(Fe) {
  14196. an(Fe);
  14197. }), on = Ea(function() {
  14198. an(void 0);
  14199. });
  14200. yc(t, function() {
  14201. return {
  14202. list: He.current,
  14203. focus: function(Ee) {
  14204. var Je, ct = Le(), Se = uu(ct, Ye), Me = Se.elements, gt = Se.key2element, Rt = Se.element2key, Kt = Bu(He.current, Me), rn = Nt != null ? Nt : Kt[0] ? Rt.get(Kt[0]) : (Je = oe.find(function(yn) {
  14205. return !yn.props.disabled;
  14206. })) === null || Je === void 0 ? void 0 : Je.key, Yt = gt.get(rn);
  14207. if (rn && Yt) {
  14208. var gn;
  14209. Yt == null || (gn = Yt.focus) === null || gn === void 0 || gn.call(Yt, Ee);
  14210. }
  14211. }
  14212. };
  14213. });
  14214. var Wt = Gt(z || [], {
  14215. value: _,
  14216. // Legacy convert key to array
  14217. postState: function(Ee) {
  14218. return Array.isArray(Ee) ? Ee : Ee == null ? fr : [Ee];
  14219. }
  14220. }), mn = Z(Wt, 2), Jt = mn[0], en = mn[1], On = function(Ee) {
  14221. if (I) {
  14222. var Je = Ee.key, ct = Jt.includes(Je), Se;
  14223. P ? ct ? Se = Jt.filter(function(gt) {
  14224. return gt !== Je;
  14225. }) : Se = [].concat(ft(Jt), [Je]) : Se = [Je], en(Se);
  14226. var Me = re(re({}, Ee), {}, {
  14227. selectedKeys: Se
  14228. });
  14229. ct ? H == null || H(Me) : A == null || A(Me);
  14230. }
  14231. !P && ce.length && ye !== "inline" && Ve(fr);
  14232. }, wn = Ea(function(Fe) {
  14233. W == null || W($o(Fe)), On(Fe);
  14234. }), Bt = Ea(function(Fe, Ee) {
  14235. var Je = ce.filter(function(Se) {
  14236. return Se !== Fe;
  14237. });
  14238. if (Ee)
  14239. Je.push(Fe);
  14240. else if (ye !== "inline") {
  14241. var ct = Pe(Fe);
  14242. Je = Je.filter(function(Se) {
  14243. return !ct.has(Se);
  14244. });
  14245. }
  14246. wf(ce, Je, !0) || Ve(Je, !0);
  14247. }), Ut = function(Ee, Je) {
  14248. var ct = Je != null ? Je : !ce.includes(Ee);
  14249. Bt(Ee, ct);
  14250. }, pn = _S(ye, Nt, nt, Ye, He, Le, Qt, an, Ut, Y);
  14251. d.useEffect(function() {
  14252. je(!0);
  14253. }, []);
  14254. var hn = d.useMemo(function() {
  14255. return {
  14256. _internalRenderMenuItem: te,
  14257. _internalRenderSubMenuItem: Q
  14258. };
  14259. }, [te, Q]), qt = ye !== "horizontal" || y ? oe : (
  14260. // Need wrap for overflow dropdown that do not response for open
  14261. oe.map(function(Fe, Ee) {
  14262. return (
  14263. // Always wrap provider to avoid sub node re-mount
  14264. /* @__PURE__ */ d.createElement(Ta, {
  14265. key: Fe.key,
  14266. overflowDisabled: Ee > at
  14267. }, Fe)
  14268. );
  14269. })
  14270. ), xn = /* @__PURE__ */ d.createElement(kn, _e({
  14271. id: m,
  14272. ref: He,
  14273. prefixCls: "".concat(o, "-overflow"),
  14274. component: "ul",
  14275. itemComponent: Qo,
  14276. className: xe(o, "".concat(o, "-root"), "".concat(o, "-").concat(ye), l, ie(ie({}, "".concat(o, "-inline-collapsed"), Oe), "".concat(o, "-rtl"), nt), i),
  14277. dir: p,
  14278. style: u,
  14279. role: "menu",
  14280. tabIndex: s,
  14281. data: qt,
  14282. renderRawItem: function(Ee) {
  14283. return Ee;
  14284. },
  14285. renderRawRest: function(Ee) {
  14286. var Je = Ee.length, ct = Je ? oe.slice(-Je) : null;
  14287. return /* @__PURE__ */ d.createElement(Jo, {
  14288. eventKey: lu,
  14289. title: M,
  14290. disabled: Et,
  14291. internalPopupClose: Je === 0,
  14292. popupClassName: D
  14293. }, ct);
  14294. },
  14295. maxCount: ye !== "horizontal" || y ? kn.INVALIDATE : kn.RESPONSIVE,
  14296. ssr: "full",
  14297. "data-menu-list": !0,
  14298. onVisibleChange: function(Ee) {
  14299. Lt(Ee);
  14300. },
  14301. onKeyDown: pn
  14302. }, ue));
  14303. return /* @__PURE__ */ d.createElement(Wu.Provider, {
  14304. value: hn
  14305. }, /* @__PURE__ */ d.createElement(xf.Provider, {
  14306. value: Ye
  14307. }, /* @__PURE__ */ d.createElement(Ta, {
  14308. prefixCls: o,
  14309. rootClassName: i,
  14310. mode: ye,
  14311. openKeys: ce,
  14312. rtl: nt,
  14313. disabled: g,
  14314. motion: Be ? G : null,
  14315. defaultMotions: Be ? B : null,
  14316. activeKey: Nt,
  14317. onActive: vn,
  14318. onInactive: on,
  14319. selectedKeys: Jt,
  14320. inlineIndent: U,
  14321. subMenuOpenDelay: E,
  14322. subMenuCloseDelay: x,
  14323. forceSubMenuRender: R,
  14324. builtinPlacements: ee,
  14325. triggerSubMenuAction: le,
  14326. getPopupContainer: j,
  14327. itemIcon: V,
  14328. expandIcon: X,
  14329. onItemClick: wn,
  14330. onOpenChange: Bt
  14331. }, /* @__PURE__ */ d.createElement(kf.Provider, {
  14332. value: vt
  14333. }, xn), /* @__PURE__ */ d.createElement("div", {
  14334. style: {
  14335. display: "none"
  14336. },
  14337. "aria-hidden": !0
  14338. }, /* @__PURE__ */ d.createElement(Pf.Provider, {
  14339. value: qe
  14340. }, ve)))));
  14341. }), Ha = iw;
  14342. Ha.Item = Qo;
  14343. Ha.SubMenu = Jo;
  14344. Ha.ItemGroup = Yu;
  14345. Ha.Divider = Lf;
  14346. const uw = "univer-menu", lw = "univer-menu-vertical", sw = "univer-menu-hidden", cw = "univer-menu-submenu-hidden", dw = "univer-menu-item-group", fw = "univer-menu-item-group-list", vw = "univer-menu-item-group-title", mw = "univer-menu-item-active", pw = "univer-menu-submenu-active", hw = "univer-menu-item-selected", gw = "univer-menu-submenu-selected", yw = "univer-menu-submenu", bw = "univer-menu-horizontal", Cw = "univer-menu-sub", Sw = "univer-menu-vertical-left", ww = "univer-menu-vertical-right", xw = "univer-menu-item", Ew = "univer-menu-item-disabled", Rw = "univer-menu-submenu-disabled", Pw = "univer-menu-submenu-popup", Mw = "univer-submenu-title-wrapper", kw = "univer-menu-submenu-title", Dw = "univer-menu-submenu-title-more-icon", Nw = "univer-menu-item-more-icon", Iw = "univer-menu-inline", Ow = "univer-menu-submenu-arrow", _w = "univer-menu-open-slide-up-enter", Lw = "univer-menu-open-slide-up-appear", Tw = "univer-menu-open-slide-up-leave", $w = "univer-menu-open-slide-up-enter-active", Aw = "univer-menu-open-slide-up-appear-active", jw = "univer-menu-open-slide-up-in", Fw = "univer-menu-open-slide-up-leave-active", zw = "univer-menu-open-slide-up-out", Hw = "univer-menu-open-zoom-enter", Vw = "univer-menu-open-zoom-appear", Ww = "univer-menu-open-zoom-leave", Bw = "univer-menu-open-zoom-enter-active", Uw = "univer-menu-open-zoom-appear-active", qw = "univer-menu-open-zoom-in", Kw = "univer-menu-open-zoom-leave-active", Yw = "univer-menu-open-zoom-out", Gw = {
  14347. menu: uw,
  14348. menuVertical: lw,
  14349. menuHidden: sw,
  14350. menuSubmenuHidden: cw,
  14351. menuItemGroup: dw,
  14352. menuItemGroupList: fw,
  14353. menuItemGroupTitle: vw,
  14354. menuItemActive: mw,
  14355. menuSubmenuActive: pw,
  14356. menuItemSelected: hw,
  14357. menuSubmenuSelected: gw,
  14358. menuSubmenu: yw,
  14359. menuHorizontal: bw,
  14360. menuSub: Cw,
  14361. menuVerticalLeft: Sw,
  14362. menuVerticalRight: ww,
  14363. menuItem: xw,
  14364. menuItemDisabled: Ew,
  14365. menuSubmenuDisabled: Rw,
  14366. menuSubmenuPopup: Pw,
  14367. submenuTitleWrapper: Mw,
  14368. menuSubmenuTitle: kw,
  14369. menuSubmenuTitleMoreIcon: Dw,
  14370. menuItemMoreIcon: Nw,
  14371. menuInline: Iw,
  14372. menuSubmenuArrow: Ow,
  14373. menuOpenSlideUpEnter: _w,
  14374. menuOpenSlideUpAppear: Lw,
  14375. menuOpenSlideUpLeave: Tw,
  14376. menuOpenSlideUpEnterActive: $w,
  14377. menuOpenSlideUpAppearActive: Aw,
  14378. menuOpenSlideUpIn: jw,
  14379. menuOpenSlideUpLeaveActive: Fw,
  14380. menuOpenSlideUpOut: zw,
  14381. menuOpenZoomEnter: Hw,
  14382. menuOpenZoomAppear: Vw,
  14383. menuOpenZoomLeave: Ww,
  14384. menuOpenZoomEnterActive: Bw,
  14385. menuOpenZoomAppearActive: Uw,
  14386. menuOpenZoomIn: qw,
  14387. menuOpenZoomLeaveActive: Kw,
  14388. menuOpenZoomOut: Yw
  14389. }, UO = me.forwardRef((e, t) => {
  14390. const { mountContainer: n } = Sn(In);
  14391. return n && me.cloneElement(/* @__PURE__ */ q.jsx(Ha, { ref: t, prefixCls: Gw.menu, getPopupContainer: () => n }), {
  14392. ...e
  14393. });
  14394. });
  14395. function qO(e) {
  14396. return me.cloneElement(/* @__PURE__ */ q.jsx(Qo, {}), { ...e });
  14397. }
  14398. function KO(e) {
  14399. return me.cloneElement(/* @__PURE__ */ q.jsx(Jo, {}), { ...e });
  14400. }
  14401. function YO(e) {
  14402. return me.cloneElement(/* @__PURE__ */ q.jsx(Yu, {}), { ...e });
  14403. }
  14404. var Xw = /* @__PURE__ */ ((e) => (e.Success = "success", e.Info = "info", e.Warning = "warning", e.Error = "error", e.Loading = "loading", e))(Xw || {});
  14405. const Zw = {
  14406. success: /* @__PURE__ */ q.jsx(Lc, { className: "univer-text-green-500" }),
  14407. info: /* @__PURE__ */ q.jsx(Mc, { className: "univer-text-indigo-600 dark:univer-text-primary-500" }),
  14408. warning: /* @__PURE__ */ q.jsx(Tc, { className: "univer-text-yellow-400" }),
  14409. error: /* @__PURE__ */ q.jsx(Rc, { className: "univer-text-red-500" }),
  14410. loading: /* @__PURE__ */ q.jsx(kc, { className: "univer-text-yellow-400 univer-animate-spin" })
  14411. }, Qw = ({
  14412. content: e,
  14413. type: t = "info"
  14414. /* Info */
  14415. }) => {
  14416. const n = Ht(() => Zw[t], [t]);
  14417. return /* @__PURE__ */ q.jsx(
  14418. "div",
  14419. {
  14420. className: Na(
  14421. `
  14422. univer-font-sans univer-rounded-xl univer-p-4 univer-min-w-[320px] univer-transition-all
  14423. univer-bg-white univer-duration-300 univer-animate-in univer-fade-in univer-slide-in-from-top-4
  14424. univer-shadow-md univer-max-w-[480px] univer-border univer-border-gray-200 univer-border-solid
  14425. dark:univer-border-gray-700 dark:univer-bg-gray-700
  14426. `
  14427. ),
  14428. children: /* @__PURE__ */ q.jsxs("div", { className: "univer-flex univer-gap-2 univer-items-start", children: [
  14429. /* @__PURE__ */ q.jsx("span", { className: "[&>svg]:univer-relative [&>svg]:univer-top-0.5 [&>svg]:univer-block", children: n }),
  14430. /* @__PURE__ */ q.jsx(
  14431. "p",
  14432. {
  14433. className: `
  14434. univer-text-sm univer-opacity-90 univer-m-0 univer-text-gray-500
  14435. dark:univer-text-gray-400
  14436. `,
  14437. children: e
  14438. }
  14439. )
  14440. ] })
  14441. }
  14442. );
  14443. };
  14444. let Jw = 0;
  14445. const ex = /* @__PURE__ */ (() => {
  14446. let e = () => {
  14447. }, t = () => {
  14448. };
  14449. return {
  14450. Messager: () => {
  14451. if (!Kr())
  14452. return null;
  14453. const [r, a] = rt({ messages: [] });
  14454. return t = (o) => {
  14455. o || a({
  14456. messages: []
  14457. }), a((i) => ({
  14458. messages: i.messages.filter((u) => u.id !== o)
  14459. }));
  14460. }, lt(() => {
  14461. e = (o) => {
  14462. const i = String(Jw++);
  14463. a((u) => ({
  14464. messages: [...u.messages, { ...o, id: i }]
  14465. })), o.duration !== 1 / 0 && setTimeout(() => {
  14466. a((u) => ({
  14467. messages: u.messages.filter((l) => l.id !== i)
  14468. }));
  14469. }, o.duration || 3e3);
  14470. };
  14471. }, []), $a(
  14472. /* @__PURE__ */ q.jsx(
  14473. "div",
  14474. {
  14475. className: `
  14476. univer-fixed univer-left-1/2 univer-top-4 univer-z-50 univer-flex univer-flex-col univer-items-center
  14477. univer-gap-1 -univer-translate-x-1/2
  14478. `,
  14479. children: r.messages.map((o, i) => /* @__PURE__ */ q.jsx(
  14480. "div",
  14481. {
  14482. style: {
  14483. position: "relative",
  14484. top: `${i * 4}px`,
  14485. zIndex: 50 - i
  14486. },
  14487. children: /* @__PURE__ */ q.jsx(Qw, { ...o, onClose: () => t(o.id) })
  14488. },
  14489. o.id
  14490. ))
  14491. }
  14492. ),
  14493. document.body
  14494. );
  14495. },
  14496. message: (r) => e(r),
  14497. removeMessage: t
  14498. };
  14499. })(), { Messager: GO, message: XO, removeMessage: ZO } = ex, tx = "univer-pager", nx = "univer-pager-left-arrow", rx = "univer-pager-right-arrow", ax = "univer-pager-number", ma = {
  14500. pager: tx,
  14501. pagerLeftArrow: nx,
  14502. pagerRightArrow: rx,
  14503. pagerNumber: ax
  14504. };
  14505. function QO(e) {
  14506. const { value: t = 0, total: n = 0, loop: r, text: a } = e, o = Ht(() => a != null ? a : `${t}/${n}`, [t, n, a]), i = n > 0, u = () => {
  14507. var c, s;
  14508. t === 1 ? r && ((c = e.onChange) == null || c.call(e, n)) : (s = e.onChange) == null || s.call(e, t - 1);
  14509. }, l = () => {
  14510. var c, s;
  14511. t === n ? r && ((c = e.onChange) == null || c.call(e, 1)) : (s = e.onChange) == null || s.call(e, t + 1);
  14512. };
  14513. return /* @__PURE__ */ q.jsx("div", { className: ma.pager, children: i ? /* @__PURE__ */ q.jsxs(uv, { children: [
  14514. /* @__PURE__ */ q.jsx("div", { role: "button", className: ma.pagerLeftArrow, onClick: u, children: /* @__PURE__ */ q.jsx(Nc, {}) }),
  14515. /* @__PURE__ */ q.jsx("div", { className: ma.pagerNumber, children: o }),
  14516. /* @__PURE__ */ q.jsx("div", { role: "button", className: ma.pagerRightArrow, onClick: l, children: /* @__PURE__ */ q.jsx(Ic, {}) })
  14517. ] }) : /* @__PURE__ */ q.jsx("div", { className: ma.pagerNumber, children: o }) });
  14518. }
  14519. function Tf(e, t) {
  14520. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Oo(e, t);
  14521. }
  14522. function ox(e, t) {
  14523. return e.classList ? !!t && e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
  14524. }
  14525. function ix(e, t) {
  14526. e.classList ? e.classList.add(t) : ox(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
  14527. }
  14528. function $s(e, t) {
  14529. return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
  14530. }
  14531. function ux(e, t) {
  14532. e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = $s(e.className, t) : e.setAttribute("class", $s(e.className && e.className.baseVal || "", t));
  14533. }
  14534. const As = {
  14535. disabled: !1
  14536. }, $f = me.createContext(null);
  14537. var Af = function(t) {
  14538. return t.scrollTop;
  14539. }, Ra = "unmounted", mr = "exited", pr = "entering", Ar = "entered", cu = "exiting", Vn = /* @__PURE__ */ function(e) {
  14540. Tf(t, e);
  14541. function t(r, a) {
  14542. var o;
  14543. o = e.call(this, r, a) || this;
  14544. var i = a, u = i && !i.isMounting ? r.enter : r.appear, l;
  14545. return o.appearStatus = null, r.in ? u ? (l = mr, o.appearStatus = pr) : l = Ar : r.unmountOnExit || r.mountOnEnter ? l = Ra : l = mr, o.state = {
  14546. status: l
  14547. }, o.nextCallback = null, o;
  14548. }
  14549. t.getDerivedStateFromProps = function(a, o) {
  14550. var i = a.in;
  14551. return i && o.status === Ra ? {
  14552. status: mr
  14553. } : null;
  14554. };
  14555. var n = t.prototype;
  14556. return n.componentDidMount = function() {
  14557. this.updateStatus(!0, this.appearStatus);
  14558. }, n.componentDidUpdate = function(a) {
  14559. var o = null;
  14560. if (a !== this.props) {
  14561. var i = this.state.status;
  14562. this.props.in ? i !== pr && i !== Ar && (o = pr) : (i === pr || i === Ar) && (o = cu);
  14563. }
  14564. this.updateStatus(!1, o);
  14565. }, n.componentWillUnmount = function() {
  14566. this.cancelNextCallback();
  14567. }, n.getTimeouts = function() {
  14568. var a = this.props.timeout, o, i, u;
  14569. return o = i = u = a, a != null && typeof a != "number" && (o = a.exit, i = a.enter, u = a.appear !== void 0 ? a.appear : i), {
  14570. exit: o,
  14571. enter: i,
  14572. appear: u
  14573. };
  14574. }, n.updateStatus = function(a, o) {
  14575. if (a === void 0 && (a = !1), o !== null)
  14576. if (this.cancelNextCallback(), o === pr) {
  14577. if (this.props.unmountOnExit || this.props.mountOnEnter) {
  14578. var i = this.props.nodeRef ? this.props.nodeRef.current : nr.findDOMNode(this);
  14579. i && Af(i);
  14580. }
  14581. this.performEnter(a);
  14582. } else
  14583. this.performExit();
  14584. else this.props.unmountOnExit && this.state.status === mr && this.setState({
  14585. status: Ra
  14586. });
  14587. }, n.performEnter = function(a) {
  14588. var o = this, i = this.props.enter, u = this.context ? this.context.isMounting : a, l = this.props.nodeRef ? [u] : [nr.findDOMNode(this), u], c = l[0], s = l[1], v = this.getTimeouts(), C = u ? v.appear : v.enter;
  14589. if (!a && !i || As.disabled) {
  14590. this.safeSetState({
  14591. status: Ar
  14592. }, function() {
  14593. o.props.onEntered(c);
  14594. });
  14595. return;
  14596. }
  14597. this.props.onEnter(c, s), this.safeSetState({
  14598. status: pr
  14599. }, function() {
  14600. o.props.onEntering(c, s), o.onTransitionEnd(C, function() {
  14601. o.safeSetState({
  14602. status: Ar
  14603. }, function() {
  14604. o.props.onEntered(c, s);
  14605. });
  14606. });
  14607. });
  14608. }, n.performExit = function() {
  14609. var a = this, o = this.props.exit, i = this.getTimeouts(), u = this.props.nodeRef ? void 0 : nr.findDOMNode(this);
  14610. if (!o || As.disabled) {
  14611. this.safeSetState({
  14612. status: mr
  14613. }, function() {
  14614. a.props.onExited(u);
  14615. });
  14616. return;
  14617. }
  14618. this.props.onExit(u), this.safeSetState({
  14619. status: cu
  14620. }, function() {
  14621. a.props.onExiting(u), a.onTransitionEnd(i.exit, function() {
  14622. a.safeSetState({
  14623. status: mr
  14624. }, function() {
  14625. a.props.onExited(u);
  14626. });
  14627. });
  14628. });
  14629. }, n.cancelNextCallback = function() {
  14630. this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
  14631. }, n.safeSetState = function(a, o) {
  14632. o = this.setNextCallback(o), this.setState(a, o);
  14633. }, n.setNextCallback = function(a) {
  14634. var o = this, i = !0;
  14635. return this.nextCallback = function(u) {
  14636. i && (i = !1, o.nextCallback = null, a(u));
  14637. }, this.nextCallback.cancel = function() {
  14638. i = !1;
  14639. }, this.nextCallback;
  14640. }, n.onTransitionEnd = function(a, o) {
  14641. this.setNextCallback(o);
  14642. var i = this.props.nodeRef ? this.props.nodeRef.current : nr.findDOMNode(this), u = a == null && !this.props.addEndListener;
  14643. if (!i || u) {
  14644. setTimeout(this.nextCallback, 0);
  14645. return;
  14646. }
  14647. if (this.props.addEndListener) {
  14648. var l = this.props.nodeRef ? [this.nextCallback] : [i, this.nextCallback], c = l[0], s = l[1];
  14649. this.props.addEndListener(c, s);
  14650. }
  14651. a != null && setTimeout(this.nextCallback, a);
  14652. }, n.render = function() {
  14653. var a = this.state.status;
  14654. if (a === Ra)
  14655. return null;
  14656. var o = this.props, i = o.children;
  14657. o.in, o.mountOnEnter, o.unmountOnExit, o.appear, o.enter, o.exit, o.timeout, o.addEndListener, o.onEnter, o.onEntering, o.onEntered, o.onExit, o.onExiting, o.onExited, o.nodeRef;
  14658. var u = ku(o, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
  14659. return (
  14660. // allows for nested Transitions
  14661. /* @__PURE__ */ me.createElement($f.Provider, {
  14662. value: null
  14663. }, typeof i == "function" ? i(a, u) : me.cloneElement(me.Children.only(i), u))
  14664. );
  14665. }, t;
  14666. }(me.Component);
  14667. Vn.contextType = $f;
  14668. Vn.propTypes = {};
  14669. function Tr() {
  14670. }
  14671. Vn.defaultProps = {
  14672. in: !1,
  14673. mountOnEnter: !1,
  14674. unmountOnExit: !1,
  14675. appear: !1,
  14676. enter: !0,
  14677. exit: !0,
  14678. onEnter: Tr,
  14679. onEntering: Tr,
  14680. onEntered: Tr,
  14681. onExit: Tr,
  14682. onExiting: Tr,
  14683. onExited: Tr
  14684. };
  14685. Vn.UNMOUNTED = Ra;
  14686. Vn.EXITED = mr;
  14687. Vn.ENTERING = pr;
  14688. Vn.ENTERED = Ar;
  14689. Vn.EXITING = cu;
  14690. var lx = function(t, n) {
  14691. return t && n && n.split(" ").forEach(function(r) {
  14692. return ix(t, r);
  14693. });
  14694. }, wi = function(t, n) {
  14695. return t && n && n.split(" ").forEach(function(r) {
  14696. return ux(t, r);
  14697. });
  14698. }, Gu = /* @__PURE__ */ function(e) {
  14699. Tf(t, e);
  14700. function t() {
  14701. for (var r, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
  14702. o[i] = arguments[i];
  14703. return r = e.call.apply(e, [this].concat(o)) || this, r.appliedClasses = {
  14704. appear: {},
  14705. enter: {},
  14706. exit: {}
  14707. }, r.onEnter = function(u, l) {
  14708. var c = r.resolveArguments(u, l), s = c[0], v = c[1];
  14709. r.removeClasses(s, "exit"), r.addClass(s, v ? "appear" : "enter", "base"), r.props.onEnter && r.props.onEnter(u, l);
  14710. }, r.onEntering = function(u, l) {
  14711. var c = r.resolveArguments(u, l), s = c[0], v = c[1], C = v ? "appear" : "enter";
  14712. r.addClass(s, C, "active"), r.props.onEntering && r.props.onEntering(u, l);
  14713. }, r.onEntered = function(u, l) {
  14714. var c = r.resolveArguments(u, l), s = c[0], v = c[1], C = v ? "appear" : "enter";
  14715. r.removeClasses(s, C), r.addClass(s, C, "done"), r.props.onEntered && r.props.onEntered(u, l);
  14716. }, r.onExit = function(u) {
  14717. var l = r.resolveArguments(u), c = l[0];
  14718. r.removeClasses(c, "appear"), r.removeClasses(c, "enter"), r.addClass(c, "exit", "base"), r.props.onExit && r.props.onExit(u);
  14719. }, r.onExiting = function(u) {
  14720. var l = r.resolveArguments(u), c = l[0];
  14721. r.addClass(c, "exit", "active"), r.props.onExiting && r.props.onExiting(u);
  14722. }, r.onExited = function(u) {
  14723. var l = r.resolveArguments(u), c = l[0];
  14724. r.removeClasses(c, "exit"), r.addClass(c, "exit", "done"), r.props.onExited && r.props.onExited(u);
  14725. }, r.resolveArguments = function(u, l) {
  14726. return r.props.nodeRef ? [r.props.nodeRef.current, u] : [u, l];
  14727. }, r.getClassNames = function(u) {
  14728. var l = r.props.classNames, c = typeof l == "string", s = c && l ? l + "-" : "", v = c ? "" + s + u : l[u], C = c ? v + "-active" : l[u + "Active"], p = c ? v + "-done" : l[u + "Done"];
  14729. return {
  14730. baseClassName: v,
  14731. activeClassName: C,
  14732. doneClassName: p
  14733. };
  14734. }, r;
  14735. }
  14736. var n = t.prototype;
  14737. return n.addClass = function(a, o, i) {
  14738. var u = this.getClassNames(o)[i + "ClassName"], l = this.getClassNames("enter"), c = l.doneClassName;
  14739. o === "appear" && i === "done" && c && (u += " " + c), i === "active" && a && Af(a), u && (this.appliedClasses[o][i] = u, lx(a, u));
  14740. }, n.removeClasses = function(a, o) {
  14741. var i = this.appliedClasses[o], u = i.base, l = i.active, c = i.done;
  14742. this.appliedClasses[o] = {}, u && wi(a, u), l && wi(a, l), c && wi(a, c);
  14743. }, n.render = function() {
  14744. var a = this.props;
  14745. a.classNames;
  14746. var o = ku(a, ["classNames"]);
  14747. return /* @__PURE__ */ me.createElement(Vn, _e({}, o, {
  14748. onEnter: this.onEnter,
  14749. onEntered: this.onEntered,
  14750. onEntering: this.onEntering,
  14751. onExit: this.onExit,
  14752. onExiting: this.onExiting,
  14753. onExited: this.onExited
  14754. }));
  14755. }, t;
  14756. }(me.Component);
  14757. Gu.defaultProps = {
  14758. classNames: ""
  14759. };
  14760. Gu.propTypes = {};
  14761. const sx = "univer-popup", cx = "univer-popup-enter", dx = "univer-popup-enter-active", fx = "univer-popup-slide-up-in", vx = "univer-popup-exit", mx = "univer-popup-slide-up-out", px = "univer-popup-exit-active", hx = "univer-popup-mask", $r = {
  14762. popup: sx,
  14763. popupEnter: cx,
  14764. popupEnterActive: dx,
  14765. popupSlideUpIn: fx,
  14766. popupExit: vx,
  14767. popupSlideUpOut: mx,
  14768. popupExitActive: px,
  14769. popupMask: hx
  14770. };
  14771. function JO(e) {
  14772. const { children: t, visible: n = !1, offset: r = [0, 0] } = e, a = Ce(null), [o, i] = rt(r), { mountContainer: u } = Sn(In);
  14773. lt(() => {
  14774. if (!n) {
  14775. i([-9999, -9999]);
  14776. return;
  14777. }
  14778. const [c, s] = r, { clientWidth: v, clientHeight: C } = a.current, { innerWidth: p, innerHeight: m } = window, b = c + v > p ? p - v : c, f = s + C > m ? m - C : s;
  14779. i([b, f]);
  14780. }, [r, n]);
  14781. function l(c) {
  14782. c.preventDefault();
  14783. }
  14784. return $a(
  14785. /* @__PURE__ */ q.jsx(
  14786. Gu,
  14787. {
  14788. in: n,
  14789. nodeRef: a,
  14790. timeout: 500,
  14791. classNames: {
  14792. enter: $r.popupEnter,
  14793. enterActive: $r.popupEnterActive,
  14794. enterDone: $r.popupEnterDone,
  14795. exitActive: $r.popupExit,
  14796. exitDone: $r.popupExitActive
  14797. },
  14798. children: /* @__PURE__ */ q.jsx(
  14799. "section",
  14800. {
  14801. ref: a,
  14802. className: $r.popup,
  14803. style: {
  14804. // Fix #1089. If the popup does not have this 2px offset, the pointerup event's target would
  14805. // become the popup itself not the canvas element, hence the selection gesture is not terminated.
  14806. // It should be considered as debt of the rendering engine.
  14807. left: o[0] + 2,
  14808. top: o[1] + 2
  14809. },
  14810. onContextMenu: l,
  14811. children: t
  14812. }
  14813. )
  14814. }
  14815. ),
  14816. u
  14817. );
  14818. }
  14819. const gx = "univer-radio", yx = "univer-radio-target-input", bx = "univer-radio-target-inner", Cx = "univer-radio-disabled", Sx = "univer-radio-target", pa = {
  14820. radio: gx,
  14821. radioTargetInput: yx,
  14822. radioTargetInner: bx,
  14823. radioDisabled: Cx,
  14824. radioTarget: Sx
  14825. };
  14826. function e_(e) {
  14827. const { children: t, checked: n, value: r, disabled: a = !1, onChange: o } = e, i = Ce(null);
  14828. function u(c) {
  14829. var s;
  14830. if (c.stopPropagation(), !(!o || a))
  14831. if (typeof r < "u")
  14832. o && o(r);
  14833. else {
  14834. const v = (s = i == null ? void 0 : i.current) == null ? void 0 : s.checked;
  14835. o && o(v);
  14836. }
  14837. }
  14838. const l = jt(pa.radio, {
  14839. [pa.radioDisabled]: a
  14840. });
  14841. return /* @__PURE__ */ q.jsxs("label", { className: l, children: [
  14842. /* @__PURE__ */ q.jsxs("span", { className: pa.radioTarget, children: [
  14843. /* @__PURE__ */ q.jsx(
  14844. "input",
  14845. {
  14846. ref: i,
  14847. className: pa.radioTargetInput,
  14848. type: "radio",
  14849. checked: n,
  14850. disabled: a,
  14851. onChange: u
  14852. }
  14853. ),
  14854. /* @__PURE__ */ q.jsx("span", { className: pa.radioTargetInner })
  14855. ] }),
  14856. /* @__PURE__ */ q.jsx("span", { children: t })
  14857. ] });
  14858. }
  14859. const wx = "univer-radio-group", xx = "univer-radio-group-direction-vertical", xi = {
  14860. radioGroup: wx,
  14861. radioGroupDirectionVertical: xx
  14862. };
  14863. function t_(e) {
  14864. const { children: t, className: n, style: r, value: a, disabled: o = !1, direction: i = "horizontal", onChange: u } = e, l = (s) => {
  14865. u(s);
  14866. }, c = jt(n, xi.radioGroup, {
  14867. [xi.radioGroupDirectionVertical]: i === "vertical"
  14868. });
  14869. return /* @__PURE__ */ q.jsx("div", { className: jt(xi.radioGroup, c), style: r, children: me.Children.map(t, (s, v) => me.isValidElement(s) ? me.cloneElement(s, {
  14870. key: v,
  14871. children: s.props.children,
  14872. value: s.props.value,
  14873. checked: a === s.props.value,
  14874. disabled: o != null ? o : s.props.disabled,
  14875. onChange: l
  14876. }) : s) });
  14877. }
  14878. const Ex = "univer-scrollbar-container", Rx = "univer-scrollbar-bar", Px = "univer-scrollbar-bar-thumb", Mx = "univer-scrollbar-content", lo = {
  14879. scrollbarContainer: Ex,
  14880. scrollbarBar: Rx,
  14881. scrollbarBarThumb: Px,
  14882. scrollbarContent: Mx
  14883. };
  14884. function n_(e) {
  14885. const { children: t } = e, [n, r] = rt(!1), [a, o] = rt(0), [i, u] = rt(0), l = Ot((g) => {
  14886. g.preventDefault(), g.stopPropagation(), r(!0), u(g.clientY), o(C.current.scrollTop);
  14887. }, []), c = Ot(
  14888. (g) => {
  14889. g.preventDefault(), g.stopPropagation(), n && r(!1);
  14890. },
  14891. [n]
  14892. ), s = Ot(
  14893. (g) => {
  14894. if (g.preventDefault(), g.stopPropagation(), n) {
  14895. const { scrollHeight: y, offsetHeight: w } = C.current, E = w * (w / y), S = (g.clientY - i) * (w / E), x = Math.min(a + S, y - w);
  14896. C.current.scrollTop = x;
  14897. }
  14898. },
  14899. [n]
  14900. );
  14901. lt(() => (document.addEventListener("mousemove", s), document.addEventListener("mouseup", c), document.addEventListener("mouseleave", c), () => {
  14902. document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c), document.removeEventListener("mouseleave", c);
  14903. }), [s, c]);
  14904. const v = Ce(null), C = Ce(null), [p, m] = rt(0), [b, f] = rt(0);
  14905. lt(() => {
  14906. function g() {
  14907. if (!v.current)
  14908. return;
  14909. const { height: E } = v.current.parentElement.getBoundingClientRect(), { scrollHeight: S } = C.current;
  14910. m(E / S * 100), v.current.style.height = `${Math.floor(E)}px`;
  14911. }
  14912. function y(E) {
  14913. const { scrollTop: S, scrollHeight: x } = E.target, R = S / x * 100;
  14914. f(R);
  14915. }
  14916. g();
  14917. const w = new ResizeObserver(g);
  14918. return w.observe(v.current.parentElement), C.current.addEventListener("scroll", y), () => {
  14919. var E;
  14920. (E = C.current) == null || E.removeEventListener("scroll", y), w.disconnect();
  14921. };
  14922. }, []);
  14923. function h(g) {
  14924. const { scrollHeight: y, offsetHeight: w } = C.current, E = w * (w / y), S = (g.clientY - i) * (w / E), x = Math.min(a + S, y - w);
  14925. C.current.scrollTo({
  14926. top: x,
  14927. behavior: "smooth"
  14928. });
  14929. }
  14930. return /* @__PURE__ */ q.jsxs("div", { ref: v, className: lo.scrollbarContainer, children: [
  14931. /* @__PURE__ */ q.jsx("div", { className: lo.scrollbarContent, ref: C, ...e, children: t }),
  14932. p < 100 && p > 0 && /* @__PURE__ */ q.jsx("div", { className: lo.scrollbarBar, role: "scrollbar", onClick: h, children: /* @__PURE__ */ q.jsx(
  14933. "div",
  14934. {
  14935. className: lo.scrollbarBarThumb,
  14936. style: {
  14937. height: `${p}%`,
  14938. top: `${b}%`
  14939. },
  14940. onMouseDown: l
  14941. }
  14942. ) })
  14943. ] });
  14944. }
  14945. var ei = function(t) {
  14946. var n = t.className, r = t.customizeIcon, a = t.customizeIconProps, o = t.children, i = t.onMouseDown, u = t.onClick, l = typeof r == "function" ? r(a) : r;
  14947. return /* @__PURE__ */ d.createElement("span", {
  14948. className: n,
  14949. onMouseDown: function(s) {
  14950. s.preventDefault(), i == null || i(s);
  14951. },
  14952. style: {
  14953. userSelect: "none",
  14954. WebkitUserSelect: "none"
  14955. },
  14956. unselectable: "on",
  14957. onClick: u,
  14958. "aria-hidden": !0
  14959. }, l !== void 0 ? l : /* @__PURE__ */ d.createElement("span", {
  14960. className: xe(n.split(/\s+/).map(function(c) {
  14961. return "".concat(c, "-icon");
  14962. }))
  14963. }, o));
  14964. }, kx = function(t, n, r, a, o) {
  14965. var i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, u = arguments.length > 6 ? arguments[6] : void 0, l = arguments.length > 7 ? arguments[7] : void 0, c = me.useMemo(function() {
  14966. if (_t(a) === "object")
  14967. return a.clearIcon;
  14968. if (o)
  14969. return o;
  14970. }, [a, o]), s = me.useMemo(function() {
  14971. return !!(!i && a && (r.length || u) && !(l === "combobox" && u === ""));
  14972. }, [a, i, r.length, u, l]);
  14973. return {
  14974. allowClear: s,
  14975. clearIcon: /* @__PURE__ */ me.createElement(ei, {
  14976. className: "".concat(t, "-clear"),
  14977. onMouseDown: n,
  14978. customizeIcon: c
  14979. }, "×")
  14980. };
  14981. }, jf = /* @__PURE__ */ d.createContext(null);
  14982. function Dx() {
  14983. return d.useContext(jf);
  14984. }
  14985. function Nx() {
  14986. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, t = d.useState(!1), n = Z(t, 2), r = n[0], a = n[1], o = d.useRef(null), i = function() {
  14987. window.clearTimeout(o.current);
  14988. };
  14989. d.useEffect(function() {
  14990. return i;
  14991. }, []);
  14992. var u = function(c, s) {
  14993. i(), o.current = window.setTimeout(function() {
  14994. a(c), s && s();
  14995. }, e);
  14996. };
  14997. return [r, u, i];
  14998. }
  14999. function Ff() {
  15000. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = d.useRef(null), n = d.useRef(null);
  15001. d.useEffect(function() {
  15002. return function() {
  15003. window.clearTimeout(n.current);
  15004. };
  15005. }, []);
  15006. function r(a) {
  15007. (a || t.current === null) && (t.current = a), window.clearTimeout(n.current), n.current = window.setTimeout(function() {
  15008. t.current = null;
  15009. }, e);
  15010. }
  15011. return [function() {
  15012. return t.current;
  15013. }, r];
  15014. }
  15015. function Ix(e, t, n, r) {
  15016. var a = d.useRef(null);
  15017. a.current = {
  15018. open: t,
  15019. triggerOpen: n,
  15020. customizedTrigger: r
  15021. }, d.useEffect(function() {
  15022. function o(i) {
  15023. var u;
  15024. if (!((u = a.current) !== null && u !== void 0 && u.customizedTrigger)) {
  15025. var l = i.target;
  15026. l.shadowRoot && i.composed && (l = i.composedPath()[0] || l), a.current.open && e().filter(function(c) {
  15027. return c;
  15028. }).every(function(c) {
  15029. return !c.contains(l) && c !== l;
  15030. }) && a.current.triggerOpen(!1);
  15031. }
  15032. }
  15033. return window.addEventListener("mousedown", o), function() {
  15034. return window.removeEventListener("mousedown", o);
  15035. };
  15036. }, []);
  15037. }
  15038. function Ox(e) {
  15039. return ![
  15040. // System function button
  15041. fe.ESC,
  15042. fe.SHIFT,
  15043. fe.BACKSPACE,
  15044. fe.TAB,
  15045. fe.WIN_KEY,
  15046. fe.ALT,
  15047. fe.META,
  15048. fe.WIN_KEY_RIGHT,
  15049. fe.CTRL,
  15050. fe.SEMICOLON,
  15051. fe.EQUALS,
  15052. fe.CAPS_LOCK,
  15053. fe.CONTEXT_MENU,
  15054. // F1-F12
  15055. fe.F1,
  15056. fe.F2,
  15057. fe.F3,
  15058. fe.F4,
  15059. fe.F5,
  15060. fe.F6,
  15061. fe.F7,
  15062. fe.F8,
  15063. fe.F9,
  15064. fe.F10,
  15065. fe.F11,
  15066. fe.F12
  15067. ].includes(e);
  15068. }
  15069. var _x = function(t, n) {
  15070. var r, a = t.prefixCls, o = t.id, i = t.inputElement, u = t.disabled, l = t.tabIndex, c = t.autoFocus, s = t.autoComplete, v = t.editable, C = t.activeDescendantId, p = t.value, m = t.maxLength, b = t.onKeyDown, f = t.onMouseDown, h = t.onChange, g = t.onPaste, y = t.onCompositionStart, w = t.onCompositionEnd, E = t.open, S = t.attrs, x = i || /* @__PURE__ */ d.createElement("input", null), R = x, k = R.ref, L = R.props, O = L.onKeyDown, N = L.onChange, F = L.onMouseDown, I = L.onCompositionStart, T = L.onCompositionEnd, P = L.style;
  15071. return "maxLength" in x.props, x = /* @__PURE__ */ d.cloneElement(x, re(re(re({
  15072. type: "search"
  15073. }, L), {}, {
  15074. // Override over origin props
  15075. id: o,
  15076. ref: lr(n, k),
  15077. disabled: u,
  15078. tabIndex: l,
  15079. autoComplete: s || "off",
  15080. autoFocus: c,
  15081. className: xe("".concat(a, "-selection-search-input"), (r = x) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
  15082. role: "combobox",
  15083. "aria-expanded": E || !1,
  15084. "aria-haspopup": "listbox",
  15085. "aria-owns": "".concat(o, "_list"),
  15086. "aria-autocomplete": "list",
  15087. "aria-controls": "".concat(o, "_list"),
  15088. "aria-activedescendant": E ? C : void 0
  15089. }, S), {}, {
  15090. value: v ? p : "",
  15091. maxLength: m,
  15092. readOnly: !v,
  15093. unselectable: v ? null : "on",
  15094. style: re(re({}, P), {}, {
  15095. opacity: v ? null : 0
  15096. }),
  15097. onKeyDown: function(_) {
  15098. b(_), O && O(_);
  15099. },
  15100. onMouseDown: function(_) {
  15101. f(_), F && F(_);
  15102. },
  15103. onChange: function(_) {
  15104. h(_), N && N(_);
  15105. },
  15106. onCompositionStart: function(_) {
  15107. y(_), I && I(_);
  15108. },
  15109. onCompositionEnd: function(_) {
  15110. w(_), T && T(_);
  15111. },
  15112. onPaste: g
  15113. })), x;
  15114. }, zf = /* @__PURE__ */ d.forwardRef(_x);
  15115. function Hf(e) {
  15116. return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
  15117. }
  15118. var Lx = typeof window < "u" && window.document && window.document.documentElement, Tx = Lx;
  15119. function $x(e) {
  15120. return e != null;
  15121. }
  15122. function Ax(e) {
  15123. return !e && e !== 0;
  15124. }
  15125. function js(e) {
  15126. return ["string", "number"].includes(_t(e));
  15127. }
  15128. function Vf(e) {
  15129. var t = void 0;
  15130. return e && (js(e.title) ? t = e.title.toString() : js(e.label) && (t = e.label.toString())), t;
  15131. }
  15132. function jx(e, t) {
  15133. Tx ? d.useLayoutEffect(e, t) : d.useEffect(e, t);
  15134. }
  15135. function Fx(e) {
  15136. var t;
  15137. return (t = e.key) !== null && t !== void 0 ? t : e.value;
  15138. }
  15139. var Fs = function(t) {
  15140. t.preventDefault(), t.stopPropagation();
  15141. }, zx = function(t) {
  15142. var n = t.id, r = t.prefixCls, a = t.values, o = t.open, i = t.searchValue, u = t.autoClearSearchValue, l = t.inputRef, c = t.placeholder, s = t.disabled, v = t.mode, C = t.showSearch, p = t.autoFocus, m = t.autoComplete, b = t.activeDescendantId, f = t.tabIndex, h = t.removeIcon, g = t.maxTagCount, y = t.maxTagTextLength, w = t.maxTagPlaceholder, E = w === void 0 ? function(j) {
  15143. return "+ ".concat(j.length, " ...");
  15144. } : w, S = t.tagRender, x = t.onToggleOpen, R = t.onRemove, k = t.onInputChange, L = t.onInputPaste, O = t.onInputKeyDown, N = t.onInputMouseDown, F = t.onInputCompositionStart, I = t.onInputCompositionEnd, T = d.useRef(null), P = rt(0), z = Z(P, 2), _ = z[0], A = z[1], H = rt(!1), $ = Z(H, 2), U = $[0], G = $[1], B = "".concat(r, "-selection"), ne = o || v === "multiple" && u === !1 || v === "tags" ? i : "", le = v === "tags" || v === "multiple" && u === !1 || C && (o || U);
  15145. jx(function() {
  15146. A(T.current.scrollWidth);
  15147. }, [ne]);
  15148. var ee = function(W, K, Y, te, Q) {
  15149. return /* @__PURE__ */ d.createElement("span", {
  15150. title: Vf(W),
  15151. className: xe("".concat(B, "-item"), ie({}, "".concat(B, "-item-disabled"), Y))
  15152. }, /* @__PURE__ */ d.createElement("span", {
  15153. className: "".concat(B, "-item-content")
  15154. }, K), te && /* @__PURE__ */ d.createElement(ei, {
  15155. className: "".concat(B, "-item-remove"),
  15156. onMouseDown: Fs,
  15157. onClick: Q,
  15158. customizeIcon: h
  15159. }, "×"));
  15160. }, V = function(W, K, Y, te, Q, ae) {
  15161. var ue = function(pe) {
  15162. Fs(pe), x(!o);
  15163. };
  15164. return /* @__PURE__ */ d.createElement("span", {
  15165. onMouseDown: ue
  15166. }, S({
  15167. label: K,
  15168. value: W,
  15169. disabled: Y,
  15170. closable: te,
  15171. onClose: Q,
  15172. isMaxTag: !!ae
  15173. }));
  15174. }, X = function(W) {
  15175. var K = W.disabled, Y = W.label, te = W.value, Q = !s && !K, ae = Y;
  15176. if (typeof y == "number" && (typeof Y == "string" || typeof Y == "number")) {
  15177. var ue = String(ae);
  15178. ue.length > y && (ae = "".concat(ue.slice(0, y), "..."));
  15179. }
  15180. var se = function(oe) {
  15181. oe && oe.stopPropagation(), R(W);
  15182. };
  15183. return typeof S == "function" ? V(te, ae, K, Q, se) : ee(W, ae, K, Q, se);
  15184. }, J = function(W) {
  15185. var K = typeof E == "function" ? E(W) : E;
  15186. return typeof S == "function" ? V(void 0, K, !1, !1, void 0, !0) : ee({
  15187. title: K
  15188. }, K, !1);
  15189. }, M = /* @__PURE__ */ d.createElement("div", {
  15190. className: "".concat(B, "-search"),
  15191. style: {
  15192. width: _
  15193. },
  15194. onFocus: function() {
  15195. G(!0);
  15196. },
  15197. onBlur: function() {
  15198. G(!1);
  15199. }
  15200. }, /* @__PURE__ */ d.createElement(zf, {
  15201. ref: l,
  15202. open: o,
  15203. prefixCls: r,
  15204. id: n,
  15205. inputElement: null,
  15206. disabled: s,
  15207. autoFocus: p,
  15208. autoComplete: m,
  15209. editable: le,
  15210. activeDescendantId: b,
  15211. value: ne,
  15212. onKeyDown: O,
  15213. onMouseDown: N,
  15214. onChange: k,
  15215. onPaste: L,
  15216. onCompositionStart: F,
  15217. onCompositionEnd: I,
  15218. tabIndex: f,
  15219. attrs: or(t, !0)
  15220. }), /* @__PURE__ */ d.createElement("span", {
  15221. ref: T,
  15222. className: "".concat(B, "-search-mirror"),
  15223. "aria-hidden": !0
  15224. }, ne, " ")), D = /* @__PURE__ */ d.createElement(kn, {
  15225. prefixCls: "".concat(B, "-overflow"),
  15226. data: a,
  15227. renderItem: X,
  15228. renderRest: J,
  15229. suffix: M,
  15230. itemKey: Fx,
  15231. maxCount: g
  15232. });
  15233. return /* @__PURE__ */ d.createElement("span", {
  15234. className: "".concat(B, "-wrap")
  15235. }, D, !a.length && !ne && /* @__PURE__ */ d.createElement("span", {
  15236. className: "".concat(B, "-placeholder")
  15237. }, c));
  15238. }, Hx = function(t) {
  15239. var n = t.inputElement, r = t.prefixCls, a = t.id, o = t.inputRef, i = t.disabled, u = t.autoFocus, l = t.autoComplete, c = t.activeDescendantId, s = t.mode, v = t.open, C = t.values, p = t.placeholder, m = t.tabIndex, b = t.showSearch, f = t.searchValue, h = t.activeValue, g = t.maxLength, y = t.onInputKeyDown, w = t.onInputMouseDown, E = t.onInputChange, S = t.onInputPaste, x = t.onInputCompositionStart, R = t.onInputCompositionEnd, k = t.title, L = d.useState(!1), O = Z(L, 2), N = O[0], F = O[1], I = s === "combobox", T = I || b, P = C[0], z = f || "";
  15240. I && h && !N && (z = h), d.useEffect(function() {
  15241. I && F(!1);
  15242. }, [I, h]);
  15243. var _ = s !== "combobox" && !v && !b ? !1 : !!z, A = k === void 0 ? Vf(P) : k, H = d.useMemo(function() {
  15244. return P ? null : /* @__PURE__ */ d.createElement("span", {
  15245. className: "".concat(r, "-selection-placeholder"),
  15246. style: _ ? {
  15247. visibility: "hidden"
  15248. } : void 0
  15249. }, p);
  15250. }, [P, _, p, r]);
  15251. return /* @__PURE__ */ d.createElement("span", {
  15252. className: "".concat(r, "-selection-wrap")
  15253. }, /* @__PURE__ */ d.createElement("span", {
  15254. className: "".concat(r, "-selection-search")
  15255. }, /* @__PURE__ */ d.createElement(zf, {
  15256. ref: o,
  15257. prefixCls: r,
  15258. id: a,
  15259. open: v,
  15260. inputElement: n,
  15261. disabled: i,
  15262. autoFocus: u,
  15263. autoComplete: l,
  15264. editable: T,
  15265. activeDescendantId: c,
  15266. value: z,
  15267. onKeyDown: y,
  15268. onMouseDown: w,
  15269. onChange: function(U) {
  15270. F(!0), E(U);
  15271. },
  15272. onPaste: S,
  15273. onCompositionStart: x,
  15274. onCompositionEnd: R,
  15275. tabIndex: m,
  15276. attrs: or(t, !0),
  15277. maxLength: I ? g : void 0
  15278. })), !I && P ? /* @__PURE__ */ d.createElement("span", {
  15279. className: "".concat(r, "-selection-item"),
  15280. title: A,
  15281. style: _ ? {
  15282. visibility: "hidden"
  15283. } : void 0
  15284. }, P.label) : null, H);
  15285. }, Vx = function(t, n) {
  15286. var r = Ce(null), a = Ce(!1), o = t.prefixCls, i = t.open, u = t.mode, l = t.showSearch, c = t.tokenWithEnter, s = t.disabled, v = t.prefix, C = t.autoClearSearchValue, p = t.onSearch, m = t.onSearchSubmit, b = t.onToggleOpen, f = t.onInputKeyDown, h = t.domRef;
  15287. d.useImperativeHandle(n, function() {
  15288. return {
  15289. focus: function(A) {
  15290. r.current.focus(A);
  15291. },
  15292. blur: function() {
  15293. r.current.blur();
  15294. }
  15295. };
  15296. });
  15297. var g = Ff(0), y = Z(g, 2), w = y[0], E = y[1], S = function(A) {
  15298. var H = A.which, $ = r.current instanceof HTMLTextAreaElement;
  15299. !$ && i && (H === fe.UP || H === fe.DOWN) && A.preventDefault(), f && f(A), H === fe.ENTER && u === "tags" && !a.current && !i && (m == null || m(A.target.value)), !($ && !i && ~[fe.UP, fe.DOWN, fe.LEFT, fe.RIGHT].indexOf(H)) && Ox(H) && b(!0);
  15300. }, x = function() {
  15301. E(!0);
  15302. }, R = Ce(null), k = function(A) {
  15303. p(A, !0, a.current) !== !1 && b(!0);
  15304. }, L = function() {
  15305. a.current = !0;
  15306. }, O = function(A) {
  15307. a.current = !1, u !== "combobox" && k(A.target.value);
  15308. }, N = function(A) {
  15309. var H = A.target.value;
  15310. if (c && R.current && /[\r\n]/.test(R.current)) {
  15311. var $ = R.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
  15312. H = H.replace($, R.current);
  15313. }
  15314. R.current = null, k(H);
  15315. }, F = function(A) {
  15316. var H = A.clipboardData, $ = H == null ? void 0 : H.getData("text");
  15317. R.current = $ || "";
  15318. }, I = function(A) {
  15319. var H = A.target;
  15320. if (H !== r.current) {
  15321. var $ = document.body.style.msTouchAction !== void 0;
  15322. $ ? setTimeout(function() {
  15323. r.current.focus();
  15324. }) : r.current.focus();
  15325. }
  15326. }, T = function(A) {
  15327. var H = w();
  15328. A.target !== r.current && !H && !(u === "combobox" && s) && A.preventDefault(), (u !== "combobox" && (!l || !H) || !i) && (i && C !== !1 && p("", !0, !1), b());
  15329. }, P = {
  15330. inputRef: r,
  15331. onInputKeyDown: S,
  15332. onInputMouseDown: x,
  15333. onInputChange: N,
  15334. onInputPaste: F,
  15335. onInputCompositionStart: L,
  15336. onInputCompositionEnd: O
  15337. }, z = u === "multiple" || u === "tags" ? /* @__PURE__ */ d.createElement(zx, _e({}, t, P)) : /* @__PURE__ */ d.createElement(Hx, _e({}, t, P));
  15338. return /* @__PURE__ */ d.createElement("div", {
  15339. ref: h,
  15340. className: "".concat(o, "-selector"),
  15341. onClick: I,
  15342. onMouseDown: T
  15343. }, v && /* @__PURE__ */ d.createElement("div", {
  15344. className: "".concat(o, "-prefix")
  15345. }, v), z);
  15346. }, Wx = /* @__PURE__ */ d.forwardRef(Vx), Bx = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], Ux = function(t) {
  15347. var n = t === !0 ? 0 : 1;
  15348. return {
  15349. bottomLeft: {
  15350. points: ["tl", "bl"],
  15351. offset: [0, 4],
  15352. overflow: {
  15353. adjustX: n,
  15354. adjustY: 1
  15355. },
  15356. htmlRegion: "scroll"
  15357. },
  15358. bottomRight: {
  15359. points: ["tr", "br"],
  15360. offset: [0, 4],
  15361. overflow: {
  15362. adjustX: n,
  15363. adjustY: 1
  15364. },
  15365. htmlRegion: "scroll"
  15366. },
  15367. topLeft: {
  15368. points: ["bl", "tl"],
  15369. offset: [0, -4],
  15370. overflow: {
  15371. adjustX: n,
  15372. adjustY: 1
  15373. },
  15374. htmlRegion: "scroll"
  15375. },
  15376. topRight: {
  15377. points: ["br", "tr"],
  15378. offset: [0, -4],
  15379. overflow: {
  15380. adjustX: n,
  15381. adjustY: 1
  15382. },
  15383. htmlRegion: "scroll"
  15384. }
  15385. };
  15386. }, qx = function(t, n) {
  15387. var r = t.prefixCls;
  15388. t.disabled;
  15389. var a = t.visible, o = t.children, i = t.popupElement, u = t.animation, l = t.transitionName, c = t.dropdownStyle, s = t.dropdownClassName, v = t.direction, C = v === void 0 ? "ltr" : v, p = t.placement, m = t.builtinPlacements, b = t.dropdownMatchSelectWidth, f = t.dropdownRender, h = t.dropdownAlign, g = t.getPopupContainer, y = t.empty, w = t.getTriggerDOMNode, E = t.onPopupVisibleChange, S = t.onPopupMouseEnter, x = mt(t, Bx), R = "".concat(r, "-dropdown"), k = i;
  15390. f && (k = f(i));
  15391. var L = d.useMemo(function() {
  15392. return m || Ux(b);
  15393. }, [m, b]), O = u ? "".concat(R, "-").concat(u) : l, N = typeof b == "number", F = d.useMemo(function() {
  15394. return N ? null : b === !1 ? "minWidth" : "width";
  15395. }, [b, N]), I = c;
  15396. N && (I = re(re({}, I), {}, {
  15397. width: b
  15398. }));
  15399. var T = d.useRef(null);
  15400. return d.useImperativeHandle(n, function() {
  15401. return {
  15402. getPopupElement: function() {
  15403. var z;
  15404. return (z = T.current) === null || z === void 0 ? void 0 : z.popupElement;
  15405. }
  15406. };
  15407. }), /* @__PURE__ */ d.createElement(Uo, _e({}, x, {
  15408. showAction: E ? ["click"] : [],
  15409. hideAction: E ? ["click"] : [],
  15410. popupPlacement: p || (C === "rtl" ? "bottomRight" : "bottomLeft"),
  15411. builtinPlacements: L,
  15412. prefixCls: R,
  15413. popupTransitionName: O,
  15414. popup: /* @__PURE__ */ d.createElement("div", {
  15415. onMouseEnter: S
  15416. }, k),
  15417. ref: T,
  15418. stretch: F,
  15419. popupAlign: h,
  15420. popupVisible: a,
  15421. getPopupContainer: g,
  15422. popupClassName: xe(s, ie({}, "".concat(R, "-empty"), y)),
  15423. popupStyle: I,
  15424. getTriggerDOMNode: w,
  15425. onPopupVisibleChange: E
  15426. }), o);
  15427. }, Kx = /* @__PURE__ */ d.forwardRef(qx);
  15428. function Yx(e) {
  15429. return Dd(e) || Md(e) || Mu(e) || Nd();
  15430. }
  15431. function zs(e, t) {
  15432. var n = e.key, r;
  15433. return "value" in e && (r = e.value), n != null ? n : r !== void 0 ? r : "rc-index-key-".concat(t);
  15434. }
  15435. function du(e) {
  15436. return typeof e < "u" && !Number.isNaN(e);
  15437. }
  15438. function Wf(e, t) {
  15439. var n = e || {}, r = n.label, a = n.value, o = n.options, i = n.groupLabel, u = r || (t ? "children" : "label");
  15440. return {
  15441. label: u,
  15442. value: a || "value",
  15443. options: o || "options",
  15444. groupLabel: i || u
  15445. };
  15446. }
  15447. function Gx(e) {
  15448. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.fieldNames, r = t.childrenAsData, a = [], o = Wf(n, !1), i = o.label, u = o.value, l = o.options, c = o.groupLabel;
  15449. function s(v, C) {
  15450. Array.isArray(v) && v.forEach(function(p) {
  15451. if (C || !(l in p)) {
  15452. var m = p[u];
  15453. a.push({
  15454. key: zs(p, a.length),
  15455. groupOption: C,
  15456. data: p,
  15457. label: p[i],
  15458. value: m
  15459. });
  15460. } else {
  15461. var b = p[c];
  15462. b === void 0 && r && (b = p.label), a.push({
  15463. key: zs(p, a.length),
  15464. group: !0,
  15465. data: p,
  15466. label: b
  15467. }), s(p[l], !0);
  15468. }
  15469. });
  15470. }
  15471. return s(e, !1), a;
  15472. }
  15473. function fu(e) {
  15474. var t = re({}, e);
  15475. return "props" in t || Object.defineProperty(t, "props", {
  15476. get: function() {
  15477. return ur(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
  15478. }
  15479. }), t;
  15480. }
  15481. var Xx = function(t, n, r) {
  15482. if (!n || !n.length)
  15483. return null;
  15484. var a = !1, o = function u(l, c) {
  15485. var s = Yx(c), v = s[0], C = s.slice(1);
  15486. if (!v)
  15487. return [l];
  15488. var p = l.split(v);
  15489. return a = a || p.length > 1, p.reduce(function(m, b) {
  15490. return [].concat(ft(m), ft(u(b, C)));
  15491. }, []).filter(Boolean);
  15492. }, i = o(t, n);
  15493. return a ? typeof r < "u" ? i.slice(0, r) : i : null;
  15494. }, Xu = /* @__PURE__ */ d.createContext(null);
  15495. function Zx(e) {
  15496. var t = e.visible, n = e.values;
  15497. if (!t)
  15498. return null;
  15499. var r = 50;
  15500. return /* @__PURE__ */ d.createElement("span", {
  15501. "aria-live": "polite",
  15502. style: {
  15503. width: 0,
  15504. height: 0,
  15505. position: "absolute",
  15506. overflow: "hidden",
  15507. opacity: 0
  15508. }
  15509. }, "".concat(n.slice(0, r).map(function(a) {
  15510. var o = a.label, i = a.value;
  15511. return ["number", "string"].includes(_t(o)) ? o : i;
  15512. }).join(", ")), n.length > r ? ", ..." : null);
  15513. }
  15514. var Qx = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], Jx = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], vu = function(t) {
  15515. return t === "tags" || t === "multiple";
  15516. }, eE = /* @__PURE__ */ d.forwardRef(function(e, t) {
  15517. var n, r = e.id, a = e.prefixCls, o = e.className, i = e.showSearch, u = e.tagRender, l = e.direction, c = e.omitDomProps, s = e.displayValues, v = e.onDisplayValuesChange, C = e.emptyOptions, p = e.notFoundContent, m = p === void 0 ? "Not Found" : p, b = e.onClear, f = e.mode, h = e.disabled, g = e.loading, y = e.getInputElement, w = e.getRawInputElement, E = e.open, S = e.defaultOpen, x = e.onDropdownVisibleChange, R = e.activeValue, k = e.onActiveValueChange, L = e.activeDescendantId, O = e.searchValue, N = e.autoClearSearchValue, F = e.onSearch, I = e.onSearchSplit, T = e.tokenSeparators, P = e.allowClear, z = e.prefix, _ = e.suffixIcon, A = e.clearIcon, H = e.OptionList, $ = e.animation, U = e.transitionName, G = e.dropdownStyle, B = e.dropdownClassName, ne = e.dropdownMatchSelectWidth, le = e.dropdownRender, ee = e.dropdownAlign, V = e.placement, X = e.builtinPlacements, J = e.getPopupContainer, M = e.showAction, D = M === void 0 ? [] : M, j = e.onFocus, W = e.onBlur, K = e.onKeyUp, Y = e.onKeyDown, te = e.onMouseDown, Q = mt(e, Qx), ae = vu(f), ue = (i !== void 0 ? i : ae) || f === "combobox", se = re({}, Q);
  15518. Jx.forEach(function(Fe) {
  15519. delete se[Fe];
  15520. }), c == null || c.forEach(function(Fe) {
  15521. delete se[Fe];
  15522. });
  15523. var pe = d.useState(!1), oe = Z(pe, 2), ve = oe[0], ze = oe[1];
  15524. d.useEffect(function() {
  15525. ze(Du());
  15526. }, []);
  15527. var Re = d.useRef(null), Be = d.useRef(null), je = d.useRef(null), He = d.useRef(null), Ye = d.useRef(null), nt = d.useRef(!1), Ge = Nx(), Ne = Z(Ge, 3), ce = Ne[0], he = Ne[1], Ve = Ne[2];
  15528. d.useImperativeHandle(t, function() {
  15529. var Fe, Ee;
  15530. return {
  15531. focus: (Fe = He.current) === null || Fe === void 0 ? void 0 : Fe.focus,
  15532. blur: (Ee = He.current) === null || Ee === void 0 ? void 0 : Ee.blur,
  15533. scrollTo: function(ct) {
  15534. var Se;
  15535. return (Se = Ye.current) === null || Se === void 0 ? void 0 : Se.scrollTo(ct);
  15536. },
  15537. nativeElement: Re.current || Be.current
  15538. };
  15539. });
  15540. var de = d.useMemo(function() {
  15541. var Fe;
  15542. if (f !== "combobox")
  15543. return O;
  15544. var Ee = (Fe = s[0]) === null || Fe === void 0 ? void 0 : Fe.value;
  15545. return typeof Ee == "string" || typeof Ee == "number" ? String(Ee) : "";
  15546. }, [O, f, s]), be = f === "combobox" && typeof y == "function" && y() || null, Xe = typeof w == "function" && w(), it = Gr(Be, Xe == null || (n = Xe.props) === null || n === void 0 ? void 0 : n.ref), tt = d.useState(!1), $e = Z(tt, 2), ge = $e[0], ke = $e[1];
  15547. St(function() {
  15548. ke(!0);
  15549. }, []);
  15550. var Te = Gt(!1, {
  15551. defaultValue: S,
  15552. value: E
  15553. }), Ke = Z(Te, 2), De = Ke[0], we = Ke[1], ye = ge ? De : !1, ut = !m && C;
  15554. (h || ut && ye && f === "combobox") && (ye = !1);
  15555. var yt = ut ? !1 : ye, Ie = d.useCallback(function(Fe) {
  15556. var Ee = Fe !== void 0 ? Fe : !ye;
  15557. h || (we(Ee), ye !== Ee && (x == null || x(Ee)));
  15558. }, [h, ye, we, x]), Oe = d.useMemo(function() {
  15559. return (T || []).some(function(Fe) {
  15560. return [`
  15561. `, `\r
  15562. `].includes(Fe);
  15563. });
  15564. }, [T]), We = d.useContext(Xu) || {}, Ue = We.maxCount, Ze = We.rawValues, at = function(Ee, Je, ct) {
  15565. if (!(ae && du(Ue) && (Ze == null ? void 0 : Ze.size) >= Ue)) {
  15566. var Se = !0, Me = Ee;
  15567. k == null || k(null);
  15568. var gt = Xx(Ee, T, du(Ue) ? Ue - Ze.size : void 0), Rt = ct ? null : gt;
  15569. return f !== "combobox" && Rt && (Me = "", I == null || I(Rt), Ie(!1), Se = !1), F && de !== Me && F(Me, {
  15570. source: Je ? "typing" : "effect"
  15571. }), Se;
  15572. }
  15573. }, Lt = function(Ee) {
  15574. !Ee || !Ee.trim() || F(Ee, {
  15575. source: "submit"
  15576. });
  15577. };
  15578. d.useEffect(function() {
  15579. !ye && !ae && f !== "combobox" && at("", !1, !1);
  15580. }, [ye]), d.useEffect(function() {
  15581. De && h && we(!1), h && !nt.current && he(!1);
  15582. }, [h]);
  15583. var Et = Ff(), wt = Z(Et, 2), pt = wt[0], xt = wt[1], Ft = d.useRef(!1), Mt = function(Ee) {
  15584. var Je = pt(), ct = Ee.key, Se = ct === "Enter";
  15585. if (Se && (f !== "combobox" && Ee.preventDefault(), ye || Ie(!0)), xt(!!de), ct === "Backspace" && !Je && ae && !de && s.length) {
  15586. for (var Me = ft(s), gt = null, Rt = Me.length - 1; Rt >= 0; Rt -= 1) {
  15587. var Kt = Me[Rt];
  15588. if (!Kt.disabled) {
  15589. Me.splice(Rt, 1), gt = Kt;
  15590. break;
  15591. }
  15592. }
  15593. gt && v(Me, {
  15594. type: "remove",
  15595. values: [gt]
  15596. });
  15597. }
  15598. for (var rn = arguments.length, Yt = new Array(rn > 1 ? rn - 1 : 0), gn = 1; gn < rn; gn++)
  15599. Yt[gn - 1] = arguments[gn];
  15600. if (ye && (!Se || !Ft.current)) {
  15601. var yn;
  15602. (yn = Ye.current) === null || yn === void 0 || yn.onKeyDown.apply(yn, [Ee].concat(Yt));
  15603. }
  15604. Se && (Ft.current = !0), Y == null || Y.apply(void 0, [Ee].concat(Yt));
  15605. }, Qt = function(Ee) {
  15606. for (var Je = arguments.length, ct = new Array(Je > 1 ? Je - 1 : 0), Se = 1; Se < Je; Se++)
  15607. ct[Se - 1] = arguments[Se];
  15608. if (ye) {
  15609. var Me;
  15610. (Me = Ye.current) === null || Me === void 0 || Me.onKeyUp.apply(Me, [Ee].concat(ct));
  15611. }
  15612. Ee.key === "Enter" && (Ft.current = !1), K == null || K.apply(void 0, [Ee].concat(ct));
  15613. }, Le = function(Ee) {
  15614. var Je = s.filter(function(ct) {
  15615. return ct !== Ee;
  15616. });
  15617. v(Je, {
  15618. type: "remove",
  15619. values: [Ee]
  15620. });
  15621. }, Pe = d.useRef(!1), qe = function() {
  15622. he(!0), h || (j && !Pe.current && j.apply(void 0, arguments), D.includes("focus") && Ie(!0)), Pe.current = !0;
  15623. }, vt = function() {
  15624. nt.current = !0, he(!1, function() {
  15625. Pe.current = !1, nt.current = !1, Ie(!1);
  15626. }), !h && (de && (f === "tags" ? F(de, {
  15627. source: "submit"
  15628. }) : f === "multiple" && F("", {
  15629. source: "blur"
  15630. })), W && W.apply(void 0, arguments));
  15631. }, ht = [];
  15632. d.useEffect(function() {
  15633. return function() {
  15634. ht.forEach(function(Fe) {
  15635. return clearTimeout(Fe);
  15636. }), ht.splice(0, ht.length);
  15637. };
  15638. }, []);
  15639. var Dt = function(Ee) {
  15640. var Je, ct = Ee.target, Se = (Je = je.current) === null || Je === void 0 ? void 0 : Je.getPopupElement();
  15641. if (Se && Se.contains(ct)) {
  15642. var Me = setTimeout(function() {
  15643. var rn = ht.indexOf(Me);
  15644. if (rn !== -1 && ht.splice(rn, 1), Ve(), !ve && !Se.contains(document.activeElement)) {
  15645. var Yt;
  15646. (Yt = He.current) === null || Yt === void 0 || Yt.focus();
  15647. }
  15648. });
  15649. ht.push(Me);
  15650. }
  15651. for (var gt = arguments.length, Rt = new Array(gt > 1 ? gt - 1 : 0), Kt = 1; Kt < gt; Kt++)
  15652. Rt[Kt - 1] = arguments[Kt];
  15653. te == null || te.apply(void 0, [Ee].concat(Rt));
  15654. }, Nt = d.useState({}), an = Z(Nt, 2), vn = an[1];
  15655. function on() {
  15656. vn({});
  15657. }
  15658. var Wt;
  15659. Xe && (Wt = function(Ee) {
  15660. Ie(Ee);
  15661. }), Ix(function() {
  15662. var Fe;
  15663. return [Re.current, (Fe = je.current) === null || Fe === void 0 ? void 0 : Fe.getPopupElement()];
  15664. }, yt, Ie, !!Xe);
  15665. var mn = d.useMemo(function() {
  15666. return re(re({}, e), {}, {
  15667. notFoundContent: m,
  15668. open: ye,
  15669. triggerOpen: yt,
  15670. id: r,
  15671. showSearch: ue,
  15672. multiple: ae,
  15673. toggleOpen: Ie
  15674. });
  15675. }, [e, m, yt, ye, r, ue, ae, Ie]), Jt = !!_ || g, en;
  15676. Jt && (en = /* @__PURE__ */ d.createElement(ei, {
  15677. className: xe("".concat(a, "-arrow"), ie({}, "".concat(a, "-arrow-loading"), g)),
  15678. customizeIcon: _,
  15679. customizeIconProps: {
  15680. loading: g,
  15681. searchValue: de,
  15682. open: ye,
  15683. focused: ce,
  15684. showSearch: ue
  15685. }
  15686. }));
  15687. var On = function() {
  15688. var Ee;
  15689. b == null || b(), (Ee = He.current) === null || Ee === void 0 || Ee.focus(), v([], {
  15690. type: "clear",
  15691. values: s
  15692. }), at("", !1, !1);
  15693. }, wn = kx(a, On, s, P, A, h, de, f), Bt = wn.allowClear, Ut = wn.clearIcon, pn = /* @__PURE__ */ d.createElement(H, {
  15694. ref: Ye
  15695. }), hn = xe(a, o, ie(ie(ie(ie(ie(ie(ie(ie(ie(ie({}, "".concat(a, "-focused"), ce), "".concat(a, "-multiple"), ae), "".concat(a, "-single"), !ae), "".concat(a, "-allow-clear"), P), "".concat(a, "-show-arrow"), Jt), "".concat(a, "-disabled"), h), "".concat(a, "-loading"), g), "".concat(a, "-open"), ye), "".concat(a, "-customize-input"), be), "".concat(a, "-show-search"), ue)), qt = /* @__PURE__ */ d.createElement(Kx, {
  15696. ref: je,
  15697. disabled: h,
  15698. prefixCls: a,
  15699. visible: yt,
  15700. popupElement: pn,
  15701. animation: $,
  15702. transitionName: U,
  15703. dropdownStyle: G,
  15704. dropdownClassName: B,
  15705. direction: l,
  15706. dropdownMatchSelectWidth: ne,
  15707. dropdownRender: le,
  15708. dropdownAlign: ee,
  15709. placement: V,
  15710. builtinPlacements: X,
  15711. getPopupContainer: J,
  15712. empty: C,
  15713. getTriggerDOMNode: function(Ee) {
  15714. return (
  15715. // TODO: This is workaround and should be removed in `rc-select`
  15716. // And use new standard `nativeElement` for ref.
  15717. // But we should update `rc-resize-observer` first.
  15718. Be.current || Ee
  15719. );
  15720. },
  15721. onPopupVisibleChange: Wt,
  15722. onPopupMouseEnter: on
  15723. }, Xe ? /* @__PURE__ */ d.cloneElement(Xe, {
  15724. ref: it
  15725. }) : /* @__PURE__ */ d.createElement(Wx, _e({}, e, {
  15726. domRef: Be,
  15727. prefixCls: a,
  15728. inputElement: be,
  15729. ref: He,
  15730. id: r,
  15731. prefix: z,
  15732. showSearch: ue,
  15733. autoClearSearchValue: N,
  15734. mode: f,
  15735. activeDescendantId: L,
  15736. tagRender: u,
  15737. values: s,
  15738. open: ye,
  15739. onToggleOpen: Ie,
  15740. activeValue: R,
  15741. searchValue: de,
  15742. onSearch: at,
  15743. onSearchSubmit: Lt,
  15744. onRemove: Le,
  15745. tokenWithEnter: Oe
  15746. }))), xn;
  15747. return Xe ? xn = qt : xn = /* @__PURE__ */ d.createElement("div", _e({
  15748. className: hn
  15749. }, se, {
  15750. ref: Re,
  15751. onMouseDown: Dt,
  15752. onKeyDown: Mt,
  15753. onKeyUp: Qt,
  15754. onFocus: qe,
  15755. onBlur: vt
  15756. }), /* @__PURE__ */ d.createElement(Zx, {
  15757. visible: ce && !ye,
  15758. values: s
  15759. }), qt, en, Bt && Ut), /* @__PURE__ */ d.createElement(jf.Provider, {
  15760. value: mn
  15761. }, xn);
  15762. }), Bf = function() {
  15763. return null;
  15764. };
  15765. Bf.isSelectOptGroup = !0;
  15766. var Uf = function() {
  15767. return null;
  15768. };
  15769. Uf.isSelectOption = !0;
  15770. var qf = /* @__PURE__ */ d.forwardRef(function(e, t) {
  15771. var n = e.height, r = e.offsetY, a = e.offsetX, o = e.children, i = e.prefixCls, u = e.onInnerResize, l = e.innerProps, c = e.rtl, s = e.extra, v = {}, C = {
  15772. display: "flex",
  15773. flexDirection: "column"
  15774. };
  15775. return r !== void 0 && (v = {
  15776. height: n,
  15777. position: "relative",
  15778. overflow: "hidden"
  15779. }, C = re(re({}, C), {}, ie(ie(ie(ie(ie({
  15780. transform: "translateY(".concat(r, "px)")
  15781. }, c ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ d.createElement("div", {
  15782. style: v
  15783. }, /* @__PURE__ */ d.createElement(cr, {
  15784. onResize: function(m) {
  15785. var b = m.offsetHeight;
  15786. b && u && u();
  15787. }
  15788. }, /* @__PURE__ */ d.createElement("div", _e({
  15789. style: C,
  15790. className: xe(ie({}, "".concat(i, "-holder-inner"), i)),
  15791. ref: t
  15792. }, l), o, s)));
  15793. });
  15794. qf.displayName = "Filler";
  15795. function tE(e) {
  15796. var t = e.children, n = e.setRef, r = d.useCallback(function(a) {
  15797. n(a);
  15798. }, []);
  15799. return /* @__PURE__ */ d.cloneElement(t, {
  15800. ref: r
  15801. });
  15802. }
  15803. function nE(e, t, n, r, a, o, i, u) {
  15804. var l = u.getKey;
  15805. return e.slice(t, n + 1).map(function(c, s) {
  15806. var v = t + s, C = i(c, v, {
  15807. style: {
  15808. width: r
  15809. },
  15810. offsetX: a
  15811. }), p = l(c);
  15812. return /* @__PURE__ */ d.createElement(tE, {
  15813. key: p,
  15814. setRef: function(b) {
  15815. return o(c, b);
  15816. }
  15817. }, C);
  15818. });
  15819. }
  15820. function rE(e, t, n) {
  15821. var r = e.length, a = t.length, o, i;
  15822. if (r === 0 && a === 0)
  15823. return null;
  15824. r < a ? (o = e, i = t) : (o = t, i = e);
  15825. var u = {
  15826. __EMPTY_ITEM__: !0
  15827. };
  15828. function l(m) {
  15829. return m !== void 0 ? n(m) : u;
  15830. }
  15831. for (var c = null, s = Math.abs(r - a) !== 1, v = 0; v < i.length; v += 1) {
  15832. var C = l(o[v]), p = l(i[v]);
  15833. if (C !== p) {
  15834. c = v, s = s || C !== l(i[v + 1]);
  15835. break;
  15836. }
  15837. }
  15838. return c === null ? null : {
  15839. index: c,
  15840. multiple: s
  15841. };
  15842. }
  15843. function aE(e, t, n) {
  15844. var r = d.useState(e), a = Z(r, 2), o = a[0], i = a[1], u = d.useState(null), l = Z(u, 2), c = l[0], s = l[1];
  15845. return d.useEffect(function() {
  15846. var v = rE(o || [], e, t);
  15847. (v == null ? void 0 : v.index) !== void 0 && s(e[v.index]), i(e);
  15848. }, [e]), [c];
  15849. }
  15850. var Hs = (typeof navigator > "u" ? "undefined" : _t(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
  15851. const Kf = function(e, t, n, r) {
  15852. var a = Ce(!1), o = Ce(null);
  15853. function i() {
  15854. clearTimeout(o.current), a.current = !0, o.current = setTimeout(function() {
  15855. a.current = !1;
  15856. }, 50);
  15857. }
  15858. var u = Ce({
  15859. top: e,
  15860. bottom: t,
  15861. left: n,
  15862. right: r
  15863. });
  15864. return u.current.top = e, u.current.bottom = t, u.current.left = n, u.current.right = r, function(l, c) {
  15865. var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, v = l ? (
  15866. // Pass origin wheel when on the left
  15867. c < 0 && u.current.left || // Pass origin wheel when on the right
  15868. c > 0 && u.current.right
  15869. ) : c < 0 && u.current.top || // Pass origin wheel when on the bottom
  15870. c > 0 && u.current.bottom;
  15871. return s && v ? (clearTimeout(o.current), a.current = !1) : (!v || a.current) && i(), !a.current && v;
  15872. };
  15873. };
  15874. function oE(e, t, n, r, a, o, i) {
  15875. var u = Ce(0), l = Ce(null), c = Ce(null), s = Ce(!1), v = Kf(t, n, r, a);
  15876. function C(g, y) {
  15877. if (st.cancel(l.current), !v(!1, y)) {
  15878. var w = g;
  15879. if (!w._virtualHandled)
  15880. w._virtualHandled = !0;
  15881. else
  15882. return;
  15883. u.current += y, c.current = y, Hs || w.preventDefault(), l.current = st(function() {
  15884. var E = s.current ? 10 : 1;
  15885. i(u.current * E, !1), u.current = 0;
  15886. });
  15887. }
  15888. }
  15889. function p(g, y) {
  15890. i(y, !0), Hs || g.preventDefault();
  15891. }
  15892. var m = Ce(null), b = Ce(null);
  15893. function f(g) {
  15894. if (e) {
  15895. st.cancel(b.current), b.current = st(function() {
  15896. m.current = null;
  15897. }, 2);
  15898. var y = g.deltaX, w = g.deltaY, E = g.shiftKey, S = y, x = w;
  15899. (m.current === "sx" || !m.current && E && w && !y) && (S = w, x = 0, m.current = "sx");
  15900. var R = Math.abs(S), k = Math.abs(x);
  15901. m.current === null && (m.current = o && R > k ? "x" : "y"), m.current === "y" ? C(g, x) : p(g, S);
  15902. }
  15903. }
  15904. function h(g) {
  15905. e && (s.current = g.detail === c.current);
  15906. }
  15907. return [f, h];
  15908. }
  15909. function iE(e, t, n, r) {
  15910. var a = d.useMemo(function() {
  15911. return [/* @__PURE__ */ new Map(), []];
  15912. }, [e, n.id, r]), o = Z(a, 2), i = o[0], u = o[1], l = function(s) {
  15913. var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : s, C = i.get(s), p = i.get(v);
  15914. if (C === void 0 || p === void 0)
  15915. for (var m = e.length, b = u.length; b < m; b += 1) {
  15916. var f, h = e[b], g = t(h);
  15917. i.set(g, b);
  15918. var y = (f = n.get(g)) !== null && f !== void 0 ? f : r;
  15919. if (u[b] = (u[b - 1] || 0) + y, g === s && (C = b), g === v && (p = b), C !== void 0 && p !== void 0)
  15920. break;
  15921. }
  15922. return {
  15923. top: u[C - 1] || 0,
  15924. bottom: u[p]
  15925. };
  15926. };
  15927. return l;
  15928. }
  15929. var uE = /* @__PURE__ */ function() {
  15930. function e() {
  15931. Rr(this, e), ie(this, "maps", void 0), ie(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
  15932. }
  15933. return Pr(e, [{
  15934. key: "set",
  15935. value: function(n, r) {
  15936. this.maps[n] = r, this.id += 1;
  15937. }
  15938. }, {
  15939. key: "get",
  15940. value: function(n) {
  15941. return this.maps[n];
  15942. }
  15943. }]), e;
  15944. }();
  15945. function Vs(e) {
  15946. var t = parseFloat(e);
  15947. return isNaN(t) ? 0 : t;
  15948. }
  15949. function lE(e, t, n) {
  15950. var r = d.useState(0), a = Z(r, 2), o = a[0], i = a[1], u = Ce(/* @__PURE__ */ new Map()), l = Ce(new uE()), c = Ce();
  15951. function s() {
  15952. st.cancel(c.current);
  15953. }
  15954. function v() {
  15955. var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
  15956. s();
  15957. var m = function() {
  15958. u.current.forEach(function(f, h) {
  15959. if (f && f.offsetParent) {
  15960. var g = Br(f), y = g.offsetHeight, w = getComputedStyle(g), E = w.marginTop, S = w.marginBottom, x = Vs(E), R = Vs(S), k = y + x + R;
  15961. l.current.get(h) !== k && l.current.set(h, k);
  15962. }
  15963. }), i(function(f) {
  15964. return f + 1;
  15965. });
  15966. };
  15967. p ? m() : c.current = st(m);
  15968. }
  15969. function C(p, m) {
  15970. var b = e(p);
  15971. u.current.get(b), m ? (u.current.set(b, m), v()) : u.current.delete(b);
  15972. }
  15973. return lt(function() {
  15974. return s;
  15975. }, []), [C, v, l.current, o];
  15976. }
  15977. var Ws = 14 / 15;
  15978. function sE(e, t, n) {
  15979. var r = Ce(!1), a = Ce(0), o = Ce(0), i = Ce(null), u = Ce(null), l, c = function(p) {
  15980. if (r.current) {
  15981. var m = Math.ceil(p.touches[0].pageX), b = Math.ceil(p.touches[0].pageY), f = a.current - m, h = o.current - b, g = Math.abs(f) > Math.abs(h);
  15982. g ? a.current = m : o.current = b;
  15983. var y = n(g, g ? f : h, !1, p);
  15984. y && p.preventDefault(), clearInterval(u.current), y && (u.current = setInterval(function() {
  15985. g ? f *= Ws : h *= Ws;
  15986. var w = Math.floor(g ? f : h);
  15987. (!n(g, w, !0) || Math.abs(w) <= 0.1) && clearInterval(u.current);
  15988. }, 16));
  15989. }
  15990. }, s = function() {
  15991. r.current = !1, l();
  15992. }, v = function(p) {
  15993. l(), p.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(p.touches[0].pageX), o.current = Math.ceil(p.touches[0].pageY), i.current = p.target, i.current.addEventListener("touchmove", c, {
  15994. passive: !1
  15995. }), i.current.addEventListener("touchend", s, {
  15996. passive: !0
  15997. }));
  15998. };
  15999. l = function() {
  16000. i.current && (i.current.removeEventListener("touchmove", c), i.current.removeEventListener("touchend", s));
  16001. }, St(function() {
  16002. return e && t.current.addEventListener("touchstart", v, {
  16003. passive: !0
  16004. }), function() {
  16005. var C;
  16006. (C = t.current) === null || C === void 0 || C.removeEventListener("touchstart", v), l(), clearInterval(u.current);
  16007. };
  16008. }, [e]);
  16009. }
  16010. var cE = 10;
  16011. function dE(e, t, n, r, a, o, i, u) {
  16012. var l = d.useRef(), c = d.useState(null), s = Z(c, 2), v = s[0], C = s[1];
  16013. return St(function() {
  16014. if (v && v.times < cE) {
  16015. if (!e.current) {
  16016. C(function(A) {
  16017. return re({}, A);
  16018. });
  16019. return;
  16020. }
  16021. o();
  16022. var p = v.targetAlign, m = v.originAlign, b = v.index, f = v.offset, h = e.current.clientHeight, g = !1, y = p, w = null;
  16023. if (h) {
  16024. for (var E = p || m, S = 0, x = 0, R = 0, k = Math.min(t.length - 1, b), L = 0; L <= k; L += 1) {
  16025. var O = a(t[L]);
  16026. x = S;
  16027. var N = n.get(O);
  16028. R = x + (N === void 0 ? r : N), S = R;
  16029. }
  16030. for (var F = E === "top" ? f : h - f, I = k; I >= 0; I -= 1) {
  16031. var T = a(t[I]), P = n.get(T);
  16032. if (P === void 0) {
  16033. g = !0;
  16034. break;
  16035. }
  16036. if (F -= P, F <= 0)
  16037. break;
  16038. }
  16039. switch (E) {
  16040. case "top":
  16041. w = x - f;
  16042. break;
  16043. case "bottom":
  16044. w = R - h + f;
  16045. break;
  16046. default: {
  16047. var z = e.current.scrollTop, _ = z + h;
  16048. x < z ? y = "top" : R > _ && (y = "bottom");
  16049. }
  16050. }
  16051. w !== null && i(w), w !== v.lastTop && (g = !0);
  16052. }
  16053. g && C(re(re({}, v), {}, {
  16054. times: v.times + 1,
  16055. targetAlign: y,
  16056. lastTop: w
  16057. }));
  16058. }
  16059. }, [v, e.current]), function(p) {
  16060. if (p == null) {
  16061. u();
  16062. return;
  16063. }
  16064. if (st.cancel(l.current), typeof p == "number")
  16065. i(p);
  16066. else if (p && _t(p) === "object") {
  16067. var m, b = p.align;
  16068. "index" in p ? m = p.index : m = t.findIndex(function(g) {
  16069. return a(g) === p.key;
  16070. });
  16071. var f = p.offset, h = f === void 0 ? 0 : f;
  16072. C({
  16073. times: 0,
  16074. index: m,
  16075. offset: h,
  16076. originAlign: b
  16077. });
  16078. }
  16079. };
  16080. }
  16081. function Bs(e, t) {
  16082. var n = "touches" in e ? e.touches[0] : e;
  16083. return n[t ? "pageX" : "pageY"];
  16084. }
  16085. var Us = /* @__PURE__ */ d.forwardRef(function(e, t) {
  16086. var n = e.prefixCls, r = e.rtl, a = e.scrollOffset, o = e.scrollRange, i = e.onStartMove, u = e.onStopMove, l = e.onScroll, c = e.horizontal, s = e.spinSize, v = e.containerSize, C = e.style, p = e.thumbStyle, m = d.useState(!1), b = Z(m, 2), f = b[0], h = b[1], g = d.useState(null), y = Z(g, 2), w = y[0], E = y[1], S = d.useState(null), x = Z(S, 2), R = x[0], k = x[1], L = !r, O = d.useRef(), N = d.useRef(), F = d.useState(!1), I = Z(F, 2), T = I[0], P = I[1], z = d.useRef(), _ = function() {
  16087. clearTimeout(z.current), P(!0), z.current = setTimeout(function() {
  16088. P(!1);
  16089. }, 3e3);
  16090. }, A = o - v || 0, H = v - s || 0, $ = d.useMemo(function() {
  16091. if (a === 0 || A === 0)
  16092. return 0;
  16093. var J = a / A;
  16094. return J * H;
  16095. }, [a, A, H]), U = function(M) {
  16096. M.stopPropagation(), M.preventDefault();
  16097. }, G = d.useRef({
  16098. top: $,
  16099. dragging: f,
  16100. pageY: w,
  16101. startTop: R
  16102. });
  16103. G.current = {
  16104. top: $,
  16105. dragging: f,
  16106. pageY: w,
  16107. startTop: R
  16108. };
  16109. var B = function(M) {
  16110. h(!0), E(Bs(M, c)), k(G.current.top), i(), M.stopPropagation(), M.preventDefault();
  16111. };
  16112. d.useEffect(function() {
  16113. var J = function(W) {
  16114. W.preventDefault();
  16115. }, M = O.current, D = N.current;
  16116. return M.addEventListener("touchstart", J, {
  16117. passive: !1
  16118. }), D.addEventListener("touchstart", B, {
  16119. passive: !1
  16120. }), function() {
  16121. M.removeEventListener("touchstart", J), D.removeEventListener("touchstart", B);
  16122. };
  16123. }, []);
  16124. var ne = d.useRef();
  16125. ne.current = A;
  16126. var le = d.useRef();
  16127. le.current = H, d.useEffect(function() {
  16128. if (f) {
  16129. var J, M = function(W) {
  16130. var K = G.current, Y = K.dragging, te = K.pageY, Q = K.startTop;
  16131. st.cancel(J);
  16132. var ae = O.current.getBoundingClientRect(), ue = v / (c ? ae.width : ae.height);
  16133. if (Y) {
  16134. var se = (Bs(W, c) - te) * ue, pe = Q;
  16135. !L && c ? pe -= se : pe += se;
  16136. var oe = ne.current, ve = le.current, ze = ve ? pe / ve : 0, Re = Math.ceil(ze * oe);
  16137. Re = Math.max(Re, 0), Re = Math.min(Re, oe), J = st(function() {
  16138. l(Re, c);
  16139. });
  16140. }
  16141. }, D = function() {
  16142. h(!1), u();
  16143. };
  16144. return window.addEventListener("mousemove", M, {
  16145. passive: !0
  16146. }), window.addEventListener("touchmove", M, {
  16147. passive: !0
  16148. }), window.addEventListener("mouseup", D, {
  16149. passive: !0
  16150. }), window.addEventListener("touchend", D, {
  16151. passive: !0
  16152. }), function() {
  16153. window.removeEventListener("mousemove", M), window.removeEventListener("touchmove", M), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), st.cancel(J);
  16154. };
  16155. }
  16156. }, [f]), d.useEffect(function() {
  16157. return _(), function() {
  16158. clearTimeout(z.current);
  16159. };
  16160. }, [a]), d.useImperativeHandle(t, function() {
  16161. return {
  16162. delayHidden: _
  16163. };
  16164. });
  16165. var ee = "".concat(n, "-scrollbar"), V = {
  16166. position: "absolute",
  16167. visibility: T ? null : "hidden"
  16168. }, X = {
  16169. position: "absolute",
  16170. background: "rgba(0, 0, 0, 0.5)",
  16171. borderRadius: 99,
  16172. cursor: "pointer",
  16173. userSelect: "none"
  16174. };
  16175. return c ? (V.height = 8, V.left = 0, V.right = 0, V.bottom = 0, X.height = "100%", X.width = s, L ? X.left = $ : X.right = $) : (V.width = 8, V.top = 0, V.bottom = 0, L ? V.right = 0 : V.left = 0, X.width = "100%", X.height = s, X.top = $), /* @__PURE__ */ d.createElement("div", {
  16176. ref: O,
  16177. className: xe(ee, ie(ie(ie({}, "".concat(ee, "-horizontal"), c), "".concat(ee, "-vertical"), !c), "".concat(ee, "-visible"), T)),
  16178. style: re(re({}, V), C),
  16179. onMouseDown: U,
  16180. onMouseMove: _
  16181. }, /* @__PURE__ */ d.createElement("div", {
  16182. ref: N,
  16183. className: xe("".concat(ee, "-thumb"), ie({}, "".concat(ee, "-thumb-moving"), f)),
  16184. style: re(re({}, X), p),
  16185. onMouseDown: B
  16186. }));
  16187. }), fE = 20;
  16188. function qs() {
  16189. var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = e / t * e;
  16190. return isNaN(n) && (n = 0), n = Math.max(n, fE), Math.floor(n);
  16191. }
  16192. var vE = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"], mE = [], pE = {
  16193. overflowY: "auto",
  16194. overflowAnchor: "none"
  16195. };
  16196. function hE(e, t) {
  16197. var n = e.prefixCls, r = n === void 0 ? "rc-virtual-list" : n, a = e.className, o = e.height, i = e.itemHeight, u = e.fullHeight, l = u === void 0 ? !0 : u, c = e.style, s = e.data, v = e.children, C = e.itemKey, p = e.virtual, m = e.direction, b = e.scrollWidth, f = e.component, h = f === void 0 ? "div" : f, g = e.onScroll, y = e.onVirtualScroll, w = e.onVisibleChange, E = e.innerProps, S = e.extraRender, x = e.styles, R = mt(e, vE), k = d.useCallback(function(Le) {
  16198. return typeof C == "function" ? C(Le) : Le == null ? void 0 : Le[C];
  16199. }, [C]), L = lE(k), O = Z(L, 4), N = O[0], F = O[1], I = O[2], T = O[3], P = !!(p !== !1 && o && i), z = d.useMemo(function() {
  16200. return Object.values(I.maps).reduce(function(Le, Pe) {
  16201. return Le + Pe;
  16202. }, 0);
  16203. }, [I.id, I.maps]), _ = P && s && (Math.max(i * s.length, z) > o || !!b), A = m === "rtl", H = xe(r, ie({}, "".concat(r, "-rtl"), A), a), $ = s || mE, U = Ce(), G = Ce(), B = Ce(), ne = rt(0), le = Z(ne, 2), ee = le[0], V = le[1], X = rt(0), J = Z(X, 2), M = J[0], D = J[1], j = rt(!1), W = Z(j, 2), K = W[0], Y = W[1], te = function() {
  16204. Y(!0);
  16205. }, Q = function() {
  16206. Y(!1);
  16207. }, ae = {
  16208. getKey: k
  16209. };
  16210. function ue(Le) {
  16211. V(function(Pe) {
  16212. var qe;
  16213. typeof Le == "function" ? qe = Le(Pe) : qe = Le;
  16214. var vt = $e(qe);
  16215. return U.current.scrollTop = vt, vt;
  16216. });
  16217. }
  16218. var se = Ce({
  16219. start: 0,
  16220. end: $.length
  16221. }), pe = Ce(), oe = aE($, k), ve = Z(oe, 1), ze = ve[0];
  16222. pe.current = ze;
  16223. var Re = d.useMemo(function() {
  16224. if (!P)
  16225. return {
  16226. scrollHeight: void 0,
  16227. start: 0,
  16228. end: $.length - 1,
  16229. offset: void 0
  16230. };
  16231. if (!_) {
  16232. var Le;
  16233. return {
  16234. scrollHeight: ((Le = G.current) === null || Le === void 0 ? void 0 : Le.offsetHeight) || 0,
  16235. start: 0,
  16236. end: $.length - 1,
  16237. offset: void 0
  16238. };
  16239. }
  16240. for (var Pe = 0, qe, vt, ht, Dt = $.length, Nt = 0; Nt < Dt; Nt += 1) {
  16241. var an = $[Nt], vn = k(an), on = I.get(vn), Wt = Pe + (on === void 0 ? i : on);
  16242. Wt >= ee && qe === void 0 && (qe = Nt, vt = Pe), Wt > ee + o && ht === void 0 && (ht = Nt), Pe = Wt;
  16243. }
  16244. return qe === void 0 && (qe = 0, vt = 0, ht = Math.ceil(o / i)), ht === void 0 && (ht = $.length - 1), ht = Math.min(ht + 1, $.length - 1), {
  16245. scrollHeight: Pe,
  16246. start: qe,
  16247. end: ht,
  16248. offset: vt
  16249. };
  16250. }, [_, P, ee, $, T, o]), Be = Re.scrollHeight, je = Re.start, He = Re.end, Ye = Re.offset;
  16251. se.current.start = je, se.current.end = He;
  16252. var nt = d.useState({
  16253. width: 0,
  16254. height: o
  16255. }), Ge = Z(nt, 2), Ne = Ge[0], ce = Ge[1], he = function(Pe) {
  16256. ce({
  16257. width: Pe.offsetWidth,
  16258. height: Pe.offsetHeight
  16259. });
  16260. }, Ve = Ce(), de = Ce(), be = d.useMemo(function() {
  16261. return qs(Ne.width, b);
  16262. }, [Ne.width, b]), Xe = d.useMemo(function() {
  16263. return qs(Ne.height, Be);
  16264. }, [Ne.height, Be]), it = Be - o, tt = Ce(it);
  16265. tt.current = it;
  16266. function $e(Le) {
  16267. var Pe = Le;
  16268. return Number.isNaN(tt.current) || (Pe = Math.min(Pe, tt.current)), Pe = Math.max(Pe, 0), Pe;
  16269. }
  16270. var ge = ee <= 0, ke = ee >= it, Te = M <= 0, Ke = M >= b, De = Kf(ge, ke, Te, Ke), we = function() {
  16271. return {
  16272. x: A ? -M : M,
  16273. y: ee
  16274. };
  16275. }, ye = Ce(we()), ut = Ct(function(Le) {
  16276. if (y) {
  16277. var Pe = re(re({}, we()), Le);
  16278. (ye.current.x !== Pe.x || ye.current.y !== Pe.y) && (y(Pe), ye.current = Pe);
  16279. }
  16280. });
  16281. function yt(Le, Pe) {
  16282. var qe = Le;
  16283. Pe ? (Di(function() {
  16284. D(qe);
  16285. }), ut()) : ue(qe);
  16286. }
  16287. function Ie(Le) {
  16288. var Pe = Le.currentTarget.scrollTop;
  16289. Pe !== ee && ue(Pe), g == null || g(Le), ut();
  16290. }
  16291. var Oe = function(Pe) {
  16292. var qe = Pe, vt = b ? b - Ne.width : 0;
  16293. return qe = Math.max(qe, 0), qe = Math.min(qe, vt), qe;
  16294. }, We = Ct(function(Le, Pe) {
  16295. Pe ? (Di(function() {
  16296. D(function(qe) {
  16297. var vt = qe + (A ? -Le : Le);
  16298. return Oe(vt);
  16299. });
  16300. }), ut()) : ue(function(qe) {
  16301. var vt = qe + Le;
  16302. return vt;
  16303. });
  16304. }), Ue = oE(P, ge, ke, Te, Ke, !!b, We), Ze = Z(Ue, 2), at = Ze[0], Lt = Ze[1];
  16305. sE(P, U, function(Le, Pe, qe, vt) {
  16306. var ht = vt;
  16307. return De(Le, Pe, qe) ? !1 : !ht || !ht._virtualHandled ? (ht && (ht._virtualHandled = !0), at({
  16308. preventDefault: function() {
  16309. },
  16310. deltaX: Le ? Pe : 0,
  16311. deltaY: Le ? 0 : Pe
  16312. }), !0) : !1;
  16313. }), St(function() {
  16314. function Le(qe) {
  16315. var vt = ge && qe.detail < 0, ht = ke && qe.detail > 0;
  16316. P && !vt && !ht && qe.preventDefault();
  16317. }
  16318. var Pe = U.current;
  16319. return Pe.addEventListener("wheel", at, {
  16320. passive: !1
  16321. }), Pe.addEventListener("DOMMouseScroll", Lt, {
  16322. passive: !0
  16323. }), Pe.addEventListener("MozMousePixelScroll", Le, {
  16324. passive: !1
  16325. }), function() {
  16326. Pe.removeEventListener("wheel", at), Pe.removeEventListener("DOMMouseScroll", Lt), Pe.removeEventListener("MozMousePixelScroll", Le);
  16327. };
  16328. }, [P, ge, ke]), St(function() {
  16329. if (b) {
  16330. var Le = Oe(M);
  16331. D(Le), ut({
  16332. x: Le
  16333. });
  16334. }
  16335. }, [Ne.width, b]);
  16336. var Et = function() {
  16337. var Pe, qe;
  16338. (Pe = Ve.current) === null || Pe === void 0 || Pe.delayHidden(), (qe = de.current) === null || qe === void 0 || qe.delayHidden();
  16339. }, wt = dE(U, $, I, i, k, function() {
  16340. return F(!0);
  16341. }, ue, Et);
  16342. d.useImperativeHandle(t, function() {
  16343. return {
  16344. nativeElement: B.current,
  16345. getScrollInfo: we,
  16346. scrollTo: function(Pe) {
  16347. function qe(vt) {
  16348. return vt && _t(vt) === "object" && ("left" in vt || "top" in vt);
  16349. }
  16350. qe(Pe) ? (Pe.left !== void 0 && D(Oe(Pe.left)), wt(Pe.top)) : wt(Pe);
  16351. }
  16352. };
  16353. }), St(function() {
  16354. if (w) {
  16355. var Le = $.slice(je, He + 1);
  16356. w(Le, $);
  16357. }
  16358. }, [je, He, $]);
  16359. var pt = iE($, k, I, i), xt = S == null ? void 0 : S({
  16360. start: je,
  16361. end: He,
  16362. virtual: _,
  16363. offsetX: M,
  16364. offsetY: Ye,
  16365. rtl: A,
  16366. getSize: pt
  16367. }), Ft = nE($, je, He, b, M, N, v, ae), Mt = null;
  16368. o && (Mt = re(ie({}, l ? "height" : "maxHeight", o), pE), P && (Mt.overflowY = "hidden", b && (Mt.overflowX = "hidden"), K && (Mt.pointerEvents = "none")));
  16369. var Qt = {};
  16370. return A && (Qt.dir = "rtl"), /* @__PURE__ */ d.createElement("div", _e({
  16371. ref: B,
  16372. style: re(re({}, c), {}, {
  16373. position: "relative"
  16374. }),
  16375. className: H
  16376. }, Qt, R), /* @__PURE__ */ d.createElement(cr, {
  16377. onResize: he
  16378. }, /* @__PURE__ */ d.createElement(h, {
  16379. className: "".concat(r, "-holder"),
  16380. style: Mt,
  16381. ref: U,
  16382. onScroll: Ie,
  16383. onMouseEnter: Et
  16384. }, /* @__PURE__ */ d.createElement(qf, {
  16385. prefixCls: r,
  16386. height: Be,
  16387. offsetX: M,
  16388. offsetY: Ye,
  16389. scrollWidth: b,
  16390. onInnerResize: F,
  16391. ref: G,
  16392. innerProps: E,
  16393. rtl: A,
  16394. extra: xt
  16395. }, Ft))), _ && Be > o && /* @__PURE__ */ d.createElement(Us, {
  16396. ref: Ve,
  16397. prefixCls: r,
  16398. scrollOffset: ee,
  16399. scrollRange: Be,
  16400. rtl: A,
  16401. onScroll: yt,
  16402. onStartMove: te,
  16403. onStopMove: Q,
  16404. spinSize: Xe,
  16405. containerSize: Ne.height,
  16406. style: x == null ? void 0 : x.verticalScrollBar,
  16407. thumbStyle: x == null ? void 0 : x.verticalScrollBarThumb
  16408. }), _ && b > Ne.width && /* @__PURE__ */ d.createElement(Us, {
  16409. ref: de,
  16410. prefixCls: r,
  16411. scrollOffset: M,
  16412. scrollRange: b,
  16413. rtl: A,
  16414. onScroll: yt,
  16415. onStartMove: te,
  16416. onStopMove: Q,
  16417. spinSize: be,
  16418. containerSize: Ne.width,
  16419. horizontal: !0,
  16420. style: x == null ? void 0 : x.horizontalScrollBar,
  16421. thumbStyle: x == null ? void 0 : x.horizontalScrollBarThumb
  16422. }));
  16423. }
  16424. var Zu = /* @__PURE__ */ d.forwardRef(hE);
  16425. Zu.displayName = "List";
  16426. function gE() {
  16427. return /(mac\sos|macintosh)/i.test(navigator.appVersion);
  16428. }
  16429. var yE = ["disabled", "title", "children", "style", "className"];
  16430. function Ks(e) {
  16431. return typeof e == "string" || typeof e == "number";
  16432. }
  16433. var bE = function(t, n) {
  16434. var r = Dx(), a = r.prefixCls, o = r.id, i = r.open, u = r.multiple, l = r.mode, c = r.searchValue, s = r.toggleOpen, v = r.notFoundContent, C = r.onPopupScroll, p = d.useContext(Xu), m = p.maxCount, b = p.flattenOptions, f = p.onActiveValue, h = p.defaultActiveFirstOption, g = p.onSelect, y = p.menuItemSelectedIcon, w = p.rawValues, E = p.fieldNames, S = p.virtual, x = p.direction, R = p.listHeight, k = p.listItemHeight, L = p.optionRender, O = "".concat(a, "-item"), N = Su(function() {
  16435. return b;
  16436. }, [i, b], function(M, D) {
  16437. return D[0] && M[1] !== D[1];
  16438. }), F = d.useRef(null), I = d.useMemo(function() {
  16439. return u && du(m) && (w == null ? void 0 : w.size) >= m;
  16440. }, [u, m, w == null ? void 0 : w.size]), T = function(D) {
  16441. D.preventDefault();
  16442. }, P = function(D) {
  16443. var j;
  16444. (j = F.current) === null || j === void 0 || j.scrollTo(typeof D == "number" ? {
  16445. index: D
  16446. } : D);
  16447. }, z = function(D) {
  16448. for (var j = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, W = N.length, K = 0; K < W; K += 1) {
  16449. var Y = (D + K * j + W) % W, te = N[Y] || {}, Q = te.group, ae = te.data;
  16450. if (!Q && !(ae != null && ae.disabled) && !I)
  16451. return Y;
  16452. }
  16453. return -1;
  16454. }, _ = d.useState(function() {
  16455. return z(0);
  16456. }), A = Z(_, 2), H = A[0], $ = A[1], U = function(D) {
  16457. var j = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  16458. $(D);
  16459. var W = {
  16460. source: j ? "keyboard" : "mouse"
  16461. }, K = N[D];
  16462. if (!K) {
  16463. f(null, -1, W);
  16464. return;
  16465. }
  16466. f(K.value, D, W);
  16467. };
  16468. lt(function() {
  16469. U(h !== !1 ? z(0) : -1);
  16470. }, [N.length, c]);
  16471. var G = d.useCallback(function(M) {
  16472. return l === "combobox" ? !1 : w.has(M);
  16473. }, [l, ft(w).toString(), w.size]), B = d.useCallback(function(M) {
  16474. return l === "combobox" ? String(M).toLowerCase() === c.toLowerCase() : w.has(M);
  16475. }, [l, c, ft(w).toString(), w.size]);
  16476. lt(function() {
  16477. var M = setTimeout(function() {
  16478. if (!u && i && w.size === 1) {
  16479. var j = Array.from(w)[0], W = N.findIndex(function(K) {
  16480. var Y = K.data;
  16481. return Y.value === j;
  16482. });
  16483. W !== -1 && (U(W), P(W));
  16484. }
  16485. });
  16486. if (i) {
  16487. var D;
  16488. (D = F.current) === null || D === void 0 || D.scrollTo(void 0);
  16489. }
  16490. return function() {
  16491. return clearTimeout(M);
  16492. };
  16493. }, [i, c]);
  16494. var ne = function(D) {
  16495. D !== void 0 && g(D, {
  16496. selected: !w.has(D)
  16497. }), u || s(!1);
  16498. };
  16499. if (d.useImperativeHandle(n, function() {
  16500. return {
  16501. onKeyDown: function(D) {
  16502. var j = D.which, W = D.ctrlKey;
  16503. switch (j) {
  16504. // >>> Arrow keys & ctrl + n/p on Mac
  16505. case fe.N:
  16506. case fe.P:
  16507. case fe.UP:
  16508. case fe.DOWN: {
  16509. var K = 0;
  16510. if (j === fe.UP ? K = -1 : j === fe.DOWN ? K = 1 : gE() && W && (j === fe.N ? K = 1 : j === fe.P && (K = -1)), K !== 0) {
  16511. var Y = z(H + K, K);
  16512. P(Y), U(Y, !0);
  16513. }
  16514. break;
  16515. }
  16516. // >>> Select (Tab / Enter)
  16517. case fe.TAB:
  16518. case fe.ENTER: {
  16519. var te, Q = N[H];
  16520. Q && !(Q != null && (te = Q.data) !== null && te !== void 0 && te.disabled) && !I ? ne(Q.value) : ne(void 0), i && D.preventDefault();
  16521. break;
  16522. }
  16523. // >>> Close
  16524. case fe.ESC:
  16525. s(!1), i && D.stopPropagation();
  16526. }
  16527. },
  16528. onKeyUp: function() {
  16529. },
  16530. scrollTo: function(D) {
  16531. P(D);
  16532. }
  16533. };
  16534. }), N.length === 0)
  16535. return /* @__PURE__ */ d.createElement("div", {
  16536. role: "listbox",
  16537. id: "".concat(o, "_list"),
  16538. className: "".concat(O, "-empty"),
  16539. onMouseDown: T
  16540. }, v);
  16541. var le = Object.keys(E).map(function(M) {
  16542. return E[M];
  16543. }), ee = function(D) {
  16544. return D.label;
  16545. };
  16546. function V(M, D) {
  16547. var j = M.group;
  16548. return {
  16549. role: j ? "presentation" : "option",
  16550. id: "".concat(o, "_list_").concat(D)
  16551. };
  16552. }
  16553. var X = function(D) {
  16554. var j = N[D];
  16555. if (!j)
  16556. return null;
  16557. var W = j.data || {}, K = W.value, Y = j.group, te = or(W, !0), Q = ee(j);
  16558. return j ? /* @__PURE__ */ d.createElement("div", _e({
  16559. "aria-label": typeof Q == "string" && !Y ? Q : null
  16560. }, te, {
  16561. key: D
  16562. }, V(j, D), {
  16563. "aria-selected": B(K)
  16564. }), K) : null;
  16565. }, J = {
  16566. role: "listbox",
  16567. id: "".concat(o, "_list")
  16568. };
  16569. return /* @__PURE__ */ d.createElement(d.Fragment, null, S && /* @__PURE__ */ d.createElement("div", _e({}, J, {
  16570. style: {
  16571. height: 0,
  16572. width: 0,
  16573. overflow: "hidden"
  16574. }
  16575. }), X(H - 1), X(H), X(H + 1)), /* @__PURE__ */ d.createElement(Zu, {
  16576. itemKey: "key",
  16577. ref: F,
  16578. data: N,
  16579. height: R,
  16580. itemHeight: k,
  16581. fullHeight: !1,
  16582. onMouseDown: T,
  16583. onScroll: C,
  16584. virtual: S,
  16585. direction: x,
  16586. innerProps: S ? null : J
  16587. }, function(M, D) {
  16588. var j = M.group, W = M.groupOption, K = M.data, Y = M.label, te = M.value, Q = K.key;
  16589. if (j) {
  16590. var ae, ue = (ae = K.title) !== null && ae !== void 0 ? ae : Ks(Y) ? Y.toString() : void 0;
  16591. return /* @__PURE__ */ d.createElement("div", {
  16592. className: xe(O, "".concat(O, "-group"), K.className),
  16593. title: ue
  16594. }, Y !== void 0 ? Y : Q);
  16595. }
  16596. var se = K.disabled, pe = K.title;
  16597. K.children;
  16598. var oe = K.style, ve = K.className, ze = mt(K, yE), Re = Er(ze, le), Be = G(te), je = se || !Be && I, He = "".concat(O, "-option"), Ye = xe(O, He, ve, ie(ie(ie(ie({}, "".concat(He, "-grouped"), W), "".concat(He, "-active"), H === D && !je), "".concat(He, "-disabled"), je), "".concat(He, "-selected"), Be)), nt = ee(M), Ge = !y || typeof y == "function" || Be, Ne = typeof nt == "number" ? nt : nt || te, ce = Ks(Ne) ? Ne.toString() : void 0;
  16599. return pe !== void 0 && (ce = pe), /* @__PURE__ */ d.createElement("div", _e({}, or(Re), S ? {} : V(M, D), {
  16600. "aria-selected": B(te),
  16601. className: Ye,
  16602. title: ce,
  16603. onMouseMove: function() {
  16604. H === D || je || U(D);
  16605. },
  16606. onClick: function() {
  16607. je || ne(te);
  16608. },
  16609. style: oe
  16610. }), /* @__PURE__ */ d.createElement("div", {
  16611. className: "".concat(He, "-content")
  16612. }, typeof L == "function" ? L(M, {
  16613. index: D
  16614. }) : Ne), /* @__PURE__ */ d.isValidElement(y) || Be, Ge && /* @__PURE__ */ d.createElement(ei, {
  16615. className: "".concat(O, "-option-state"),
  16616. customizeIcon: y,
  16617. customizeIconProps: {
  16618. value: te,
  16619. disabled: je,
  16620. isSelected: Be
  16621. }
  16622. }, Be ? "✓" : null));
  16623. }));
  16624. }, CE = /* @__PURE__ */ d.forwardRef(bE);
  16625. const SE = function(e, t) {
  16626. var n = d.useRef({
  16627. values: /* @__PURE__ */ new Map(),
  16628. options: /* @__PURE__ */ new Map()
  16629. }), r = d.useMemo(function() {
  16630. var o = n.current, i = o.values, u = o.options, l = e.map(function(v) {
  16631. if (v.label === void 0) {
  16632. var C;
  16633. return re(re({}, v), {}, {
  16634. label: (C = i.get(v.value)) === null || C === void 0 ? void 0 : C.label
  16635. });
  16636. }
  16637. return v;
  16638. }), c = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
  16639. return l.forEach(function(v) {
  16640. c.set(v.value, v), s.set(v.value, t.get(v.value) || u.get(v.value));
  16641. }), n.current.values = c, n.current.options = s, l;
  16642. }, [e, t]), a = d.useCallback(function(o) {
  16643. return t.get(o) || n.current.options.get(o);
  16644. }, [t]);
  16645. return [r, a];
  16646. };
  16647. function Ei(e, t) {
  16648. return Hf(e).join("").toUpperCase().includes(t);
  16649. }
  16650. const wE = function(e, t, n, r, a) {
  16651. return d.useMemo(function() {
  16652. if (!n || r === !1)
  16653. return e;
  16654. var o = t.options, i = t.label, u = t.value, l = [], c = typeof r == "function", s = n.toUpperCase(), v = c ? r : function(p, m) {
  16655. return a ? Ei(m[a], s) : m[o] ? Ei(m[i !== "children" ? i : "label"], s) : Ei(m[u], s);
  16656. }, C = c ? function(p) {
  16657. return fu(p);
  16658. } : function(p) {
  16659. return p;
  16660. };
  16661. return e.forEach(function(p) {
  16662. if (p[o]) {
  16663. var m = v(n, C(p));
  16664. if (m)
  16665. l.push(p);
  16666. else {
  16667. var b = p[o].filter(function(f) {
  16668. return v(n, C(f));
  16669. });
  16670. b.length && l.push(re(re({}, p), {}, ie({}, o, b)));
  16671. }
  16672. return;
  16673. }
  16674. v(n, C(p)) && l.push(p);
  16675. }), l;
  16676. }, [e, r, a, n, t]);
  16677. };
  16678. var Ys = 0, xE = dn();
  16679. function EE() {
  16680. var e;
  16681. return xE ? (e = Ys, Ys += 1) : e = "TEST_OR_SSR", e;
  16682. }
  16683. function RE(e) {
  16684. var t = d.useState(), n = Z(t, 2), r = n[0], a = n[1];
  16685. return d.useEffect(function() {
  16686. a("rc_select_".concat(EE()));
  16687. }, []), e || r;
  16688. }
  16689. var PE = ["children", "value"], ME = ["children"];
  16690. function kE(e) {
  16691. var t = e, n = t.key, r = t.props, a = r.children, o = r.value, i = mt(r, PE);
  16692. return re({
  16693. key: n,
  16694. value: o !== void 0 ? o : n,
  16695. children: a
  16696. }, i);
  16697. }
  16698. function Yf(e) {
  16699. var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  16700. return Oa(e).map(function(n, r) {
  16701. if (!/* @__PURE__ */ d.isValidElement(n) || !n.type)
  16702. return null;
  16703. var a = n, o = a.type.isSelectOptGroup, i = a.key, u = a.props, l = u.children, c = mt(u, ME);
  16704. return t || !o ? kE(n) : re(re({
  16705. key: "__RC_SELECT_GRP__".concat(i === null ? r : i, "__"),
  16706. label: i
  16707. }, c), {}, {
  16708. options: Yf(l)
  16709. });
  16710. }).filter(function(n) {
  16711. return n;
  16712. });
  16713. }
  16714. var DE = function(t, n, r, a, o) {
  16715. return d.useMemo(function() {
  16716. var i = t, u = !t;
  16717. u && (i = Yf(n));
  16718. var l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), s = function(p, m, b) {
  16719. b && typeof b == "string" && p.set(m[b], m);
  16720. }, v = function C(p) {
  16721. for (var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, b = 0; b < p.length; b += 1) {
  16722. var f = p[b];
  16723. !f[r.options] || m ? (l.set(f[r.value], f), s(c, f, r.label), s(c, f, a), s(c, f, o)) : C(f[r.options], !0);
  16724. }
  16725. };
  16726. return v(i), {
  16727. options: i,
  16728. valueOptions: l,
  16729. labelOptions: c
  16730. };
  16731. }, [t, n, r, a, o]);
  16732. };
  16733. function Gs(e) {
  16734. var t = d.useRef();
  16735. t.current = e;
  16736. var n = d.useCallback(function() {
  16737. return t.current.apply(t, arguments);
  16738. }, []);
  16739. return n;
  16740. }
  16741. var NE = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], IE = ["inputValue"];
  16742. function OE(e) {
  16743. return !e || _t(e) !== "object";
  16744. }
  16745. var _E = /* @__PURE__ */ d.forwardRef(function(e, t) {
  16746. var n = e.id, r = e.mode, a = e.prefixCls, o = a === void 0 ? "rc-select" : a, i = e.backfill, u = e.fieldNames, l = e.inputValue, c = e.searchValue, s = e.onSearch, v = e.autoClearSearchValue, C = v === void 0 ? !0 : v, p = e.onSelect, m = e.onDeselect, b = e.dropdownMatchSelectWidth, f = b === void 0 ? !0 : b, h = e.filterOption, g = e.filterSort, y = e.optionFilterProp, w = e.optionLabelProp, E = e.options, S = e.optionRender, x = e.children, R = e.defaultActiveFirstOption, k = e.menuItemSelectedIcon, L = e.virtual, O = e.direction, N = e.listHeight, F = N === void 0 ? 200 : N, I = e.listItemHeight, T = I === void 0 ? 20 : I, P = e.labelRender, z = e.value, _ = e.defaultValue, A = e.labelInValue, H = e.onChange, $ = e.maxCount, U = mt(e, NE), G = RE(n), B = vu(r), ne = !!(!E && x), le = d.useMemo(function() {
  16747. return h === void 0 && r === "combobox" ? !1 : h;
  16748. }, [h, r]), ee = d.useMemo(
  16749. function() {
  16750. return Wf(u, ne);
  16751. },
  16752. /* eslint-disable react-hooks/exhaustive-deps */
  16753. [
  16754. // We stringify fieldNames to avoid unnecessary re-renders.
  16755. JSON.stringify(u),
  16756. ne
  16757. ]
  16758. /* eslint-enable react-hooks/exhaustive-deps */
  16759. ), V = Gt("", {
  16760. value: c !== void 0 ? c : l,
  16761. postState: function(Oe) {
  16762. return Oe || "";
  16763. }
  16764. }), X = Z(V, 2), J = X[0], M = X[1], D = DE(E, x, ee, y, w), j = D.valueOptions, W = D.labelOptions, K = D.options, Y = d.useCallback(function(Ie) {
  16765. var Oe = Hf(Ie);
  16766. return Oe.map(function(We) {
  16767. var Ue, Ze, at, Lt, Et;
  16768. if (OE(We))
  16769. Ue = We;
  16770. else {
  16771. var wt;
  16772. at = We.key, Ze = We.label, Ue = (wt = We.value) !== null && wt !== void 0 ? wt : at;
  16773. }
  16774. var pt = j.get(Ue);
  16775. if (pt) {
  16776. var xt;
  16777. Ze === void 0 && (Ze = pt == null ? void 0 : pt[w || ee.label]), at === void 0 && (at = (xt = pt == null ? void 0 : pt.key) !== null && xt !== void 0 ? xt : Ue), Lt = pt == null ? void 0 : pt.disabled, Et = pt == null ? void 0 : pt.title;
  16778. }
  16779. return {
  16780. label: Ze,
  16781. value: Ue,
  16782. key: at,
  16783. disabled: Lt,
  16784. title: Et
  16785. };
  16786. });
  16787. }, [ee, w, j]), te = Gt(_, {
  16788. value: z
  16789. }), Q = Z(te, 2), ae = Q[0], ue = Q[1], se = d.useMemo(function() {
  16790. var Ie, Oe = B && ae === null ? [] : ae, We = Y(Oe);
  16791. return r === "combobox" && Ax((Ie = We[0]) === null || Ie === void 0 ? void 0 : Ie.value) ? [] : We;
  16792. }, [ae, Y, r, B]), pe = SE(se, j), oe = Z(pe, 2), ve = oe[0], ze = oe[1], Re = d.useMemo(function() {
  16793. if (!r && ve.length === 1) {
  16794. var Ie = ve[0];
  16795. if (Ie.value === null && (Ie.label === null || Ie.label === void 0))
  16796. return [];
  16797. }
  16798. return ve.map(function(Oe) {
  16799. var We;
  16800. return re(re({}, Oe), {}, {
  16801. label: (We = typeof P == "function" ? P(Oe) : Oe.label) !== null && We !== void 0 ? We : Oe.value
  16802. });
  16803. });
  16804. }, [r, ve, P]), Be = d.useMemo(function() {
  16805. return new Set(ve.map(function(Ie) {
  16806. return Ie.value;
  16807. }));
  16808. }, [ve]);
  16809. d.useEffect(function() {
  16810. if (r === "combobox") {
  16811. var Ie, Oe = (Ie = ve[0]) === null || Ie === void 0 ? void 0 : Ie.value;
  16812. M($x(Oe) ? String(Oe) : "");
  16813. }
  16814. }, [ve]);
  16815. var je = Gs(function(Ie, Oe) {
  16816. var We = Oe != null ? Oe : Ie;
  16817. return ie(ie({}, ee.value, Ie), ee.label, We);
  16818. }), He = d.useMemo(function() {
  16819. if (r !== "tags")
  16820. return K;
  16821. var Ie = ft(K), Oe = function(Ue) {
  16822. return j.has(Ue);
  16823. };
  16824. return ft(ve).sort(function(We, Ue) {
  16825. return We.value < Ue.value ? -1 : 1;
  16826. }).forEach(function(We) {
  16827. var Ue = We.value;
  16828. Oe(Ue) || Ie.push(je(Ue, We.label));
  16829. }), Ie;
  16830. }, [je, K, j, ve, r]), Ye = wE(He, ee, J, le, y), nt = d.useMemo(function() {
  16831. return r !== "tags" || !J || Ye.some(function(Ie) {
  16832. return Ie[y || "value"] === J;
  16833. }) || Ye.some(function(Ie) {
  16834. return Ie[ee.value] === J;
  16835. }) ? Ye : [je(J)].concat(ft(Ye));
  16836. }, [je, y, r, Ye, J, ee]), Ge = function Ie(Oe) {
  16837. var We = ft(Oe).sort(function(Ue, Ze) {
  16838. return g(Ue, Ze, {
  16839. searchValue: J
  16840. });
  16841. });
  16842. return We.map(function(Ue) {
  16843. return Array.isArray(Ue.options) ? re(re({}, Ue), {}, {
  16844. options: Ue.options.length > 0 ? Ie(Ue.options) : Ue.options
  16845. }) : Ue;
  16846. });
  16847. }, Ne = d.useMemo(function() {
  16848. return g ? Ge(nt) : nt;
  16849. }, [nt, g, J]), ce = d.useMemo(function() {
  16850. return Gx(Ne, {
  16851. fieldNames: ee,
  16852. childrenAsData: ne
  16853. });
  16854. }, [Ne, ee, ne]), he = function(Oe) {
  16855. var We = Y(Oe);
  16856. if (ue(We), H && // Trigger event only when value changed
  16857. (We.length !== ve.length || We.some(function(at, Lt) {
  16858. var Et;
  16859. return ((Et = ve[Lt]) === null || Et === void 0 ? void 0 : Et.value) !== (at == null ? void 0 : at.value);
  16860. }))) {
  16861. var Ue = A ? We : We.map(function(at) {
  16862. return at.value;
  16863. }), Ze = We.map(function(at) {
  16864. return fu(ze(at.value));
  16865. });
  16866. H(
  16867. // Value
  16868. B ? Ue : Ue[0],
  16869. // Option
  16870. B ? Ze : Ze[0]
  16871. );
  16872. }
  16873. }, Ve = d.useState(null), de = Z(Ve, 2), be = de[0], Xe = de[1], it = d.useState(0), tt = Z(it, 2), $e = tt[0], ge = tt[1], ke = R !== void 0 ? R : r !== "combobox", Te = d.useCallback(function(Ie, Oe) {
  16874. var We = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, Ue = We.source, Ze = Ue === void 0 ? "keyboard" : Ue;
  16875. ge(Oe), i && r === "combobox" && Ie !== null && Ze === "keyboard" && Xe(String(Ie));
  16876. }, [i, r]), Ke = function(Oe, We, Ue) {
  16877. var Ze = function() {
  16878. var Le, Pe = ze(Oe);
  16879. return [A ? {
  16880. label: Pe == null ? void 0 : Pe[ee.label],
  16881. value: Oe,
  16882. key: (Le = Pe == null ? void 0 : Pe.key) !== null && Le !== void 0 ? Le : Oe
  16883. } : Oe, fu(Pe)];
  16884. };
  16885. if (We && p) {
  16886. var at = Ze(), Lt = Z(at, 2), Et = Lt[0], wt = Lt[1];
  16887. p(Et, wt);
  16888. } else if (!We && m && Ue !== "clear") {
  16889. var pt = Ze(), xt = Z(pt, 2), Ft = xt[0], Mt = xt[1];
  16890. m(Ft, Mt);
  16891. }
  16892. }, De = Gs(function(Ie, Oe) {
  16893. var We, Ue = B ? Oe.selected : !0;
  16894. Ue ? We = B ? [].concat(ft(ve), [Ie]) : [Ie] : We = ve.filter(function(Ze) {
  16895. return Ze.value !== Ie;
  16896. }), he(We), Ke(Ie, Ue), r === "combobox" ? Xe("") : (!vu || C) && (M(""), Xe(""));
  16897. }), we = function(Oe, We) {
  16898. he(Oe);
  16899. var Ue = We.type, Ze = We.values;
  16900. (Ue === "remove" || Ue === "clear") && Ze.forEach(function(at) {
  16901. Ke(at.value, !1, Ue);
  16902. });
  16903. }, ye = function(Oe, We) {
  16904. if (M(Oe), Xe(null), We.source === "submit") {
  16905. var Ue = (Oe || "").trim();
  16906. if (Ue) {
  16907. var Ze = Array.from(new Set([].concat(ft(Be), [Ue])));
  16908. he(Ze), Ke(Ue, !0), M("");
  16909. }
  16910. return;
  16911. }
  16912. We.source !== "blur" && (r === "combobox" && he(Oe), s == null || s(Oe));
  16913. }, ut = function(Oe) {
  16914. var We = Oe;
  16915. r !== "tags" && (We = Oe.map(function(Ze) {
  16916. var at = W.get(Ze);
  16917. return at == null ? void 0 : at.value;
  16918. }).filter(function(Ze) {
  16919. return Ze !== void 0;
  16920. }));
  16921. var Ue = Array.from(new Set([].concat(ft(Be), ft(We))));
  16922. he(Ue), Ue.forEach(function(Ze) {
  16923. Ke(Ze, !0);
  16924. });
  16925. }, yt = d.useMemo(function() {
  16926. var Ie = L !== !1 && f !== !1;
  16927. return re(re({}, D), {}, {
  16928. flattenOptions: ce,
  16929. onActiveValue: Te,
  16930. defaultActiveFirstOption: ke,
  16931. onSelect: De,
  16932. menuItemSelectedIcon: k,
  16933. rawValues: Be,
  16934. fieldNames: ee,
  16935. virtual: Ie,
  16936. direction: O,
  16937. listHeight: F,
  16938. listItemHeight: T,
  16939. childrenAsData: ne,
  16940. maxCount: $,
  16941. optionRender: S
  16942. });
  16943. }, [$, D, ce, Te, ke, De, k, Be, ee, L, f, O, F, T, ne, S]);
  16944. return /* @__PURE__ */ d.createElement(Xu.Provider, {
  16945. value: yt
  16946. }, /* @__PURE__ */ d.createElement(eE, _e({}, U, {
  16947. // >>> MISC
  16948. id: G,
  16949. prefixCls: o,
  16950. ref: t,
  16951. omitDomProps: IE,
  16952. mode: r,
  16953. displayValues: Re,
  16954. onDisplayValuesChange: we,
  16955. direction: O,
  16956. searchValue: J,
  16957. onSearch: ye,
  16958. autoClearSearchValue: C,
  16959. onSearchSplit: ut,
  16960. dropdownMatchSelectWidth: f,
  16961. OptionList: CE,
  16962. emptyOptions: !ce.length,
  16963. activeValue: be,
  16964. activeDescendantId: "".concat(G, "_list_").concat($e)
  16965. })));
  16966. }), Qu = _E;
  16967. Qu.Option = Uf;
  16968. Qu.OptGroup = Bf;
  16969. const LE = "univer-select", TE = "univer-select-disabled", $E = "univer-select-selector", AE = "univer-select-show-arrow", jE = "univer-select-loading", FE = "univer-select-arrow-icon", zE = "univer-select-loading-icon", HE = "univer-select-selection-placeholder", VE = "univer-select-selection-search-input", WE = "univer-select-single", BE = "univer-select-selection-search", UE = "univer-select-selection-item", qE = "univer-select-customize-input", KE = "univer-select-multiple", YE = "univer-select-selection-item-disabled", GE = "univer-select-selection-overflow", XE = "univer-select-selection-overflow-item", ZE = "univer-select-selection-search-mirror", QE = "univer-select-borderless", JE = "univer-select-focused", eR = "univer-select-allow-clear", tR = "univer-select-clear", nR = "univer-select-arrow", rR = "univer-select-dropdown", aR = "univer-select-dropdown-hidden", oR = "univer-select-item", iR = "univer-select-item-group", uR = "univer-select-item-option", lR = "univer-select-item-option-state", sR = "univer-select-item-option-active", cR = "univer-select-item-option-disabled", dR = "univer-select-item-empty", fR = "univer-select-selection__choice-zoom", vR = "univer-select-selection__choice-zoom-appear", mR = "univer-select-selection__choice-zoom-appear-active", pR = "univer-select-selection__choice-zoom-leave", hR = "univer-select-selection__choice-zoom-leave-active", gR = "univer-select-dropdown-slide-up-enter", yR = "univer-select-dropdown-slide-up-appear", bR = "univer-select-dropdown-slide-up-leave", CR = "univer-select-dropdown-slide-up-enter-active", SR = "univer-select-dropdown-placement-bottomLeft", wR = "univer-select-dropdown-slide-up-appear-active", xR = "univer-select-dropdown-placement-bottomRight", ER = "univer-select-dropdown-slide-up-in", RR = "univer-select-dropdown-slide-up-leave-active", PR = "univer-select-dropdown-slide-up-out", MR = "univer-select-dropdown-placement-topLeft", kR = "univer-select-dropdown-placement-topRight", DR = "univer-select-dropdown-slide-down-in", NR = "univer-select-dropdown-slide-down-out", Xs = {
  16970. select: LE,
  16971. selectDisabled: TE,
  16972. selectSelector: $E,
  16973. selectShowArrow: AE,
  16974. selectLoading: jE,
  16975. selectArrowIcon: FE,
  16976. selectLoadingIcon: zE,
  16977. selectSelectionPlaceholder: HE,
  16978. selectSelectionSearchInput: VE,
  16979. selectSingle: WE,
  16980. selectSelectionSearch: BE,
  16981. selectSelectionItem: UE,
  16982. selectCustomizeInput: qE,
  16983. selectMultiple: KE,
  16984. selectSelectionItemDisabled: YE,
  16985. selectSelectionOverflow: GE,
  16986. selectSelectionOverflowItem: XE,
  16987. selectSelectionSearchMirror: ZE,
  16988. selectBorderless: QE,
  16989. selectFocused: JE,
  16990. selectAllowClear: eR,
  16991. selectClear: tR,
  16992. selectArrow: nR,
  16993. selectDropdown: rR,
  16994. selectDropdownHidden: aR,
  16995. selectItem: oR,
  16996. selectItemGroup: iR,
  16997. selectItemOption: uR,
  16998. selectItemOptionState: lR,
  16999. selectItemOptionActive: sR,
  17000. selectItemOptionDisabled: cR,
  17001. selectItemEmpty: dR,
  17002. selectSelectionChoiceZoom: fR,
  17003. selectSelectionChoiceZoomAppear: vR,
  17004. selectSelectionChoiceZoomAppearActive: mR,
  17005. selectSelectionChoiceZoomLeave: pR,
  17006. selectSelectionChoiceZoomLeaveActive: hR,
  17007. selectDropdownSlideUpEnter: gR,
  17008. selectDropdownSlideUpAppear: yR,
  17009. selectDropdownSlideUpLeave: bR,
  17010. selectDropdownSlideUpEnterActive: CR,
  17011. selectDropdownPlacementBottomLeft: SR,
  17012. selectDropdownSlideUpAppearActive: wR,
  17013. selectDropdownPlacementBottomRight: xR,
  17014. selectDropdownSlideUpIn: ER,
  17015. selectDropdownSlideUpLeaveActive: RR,
  17016. selectDropdownSlideUpOut: PR,
  17017. selectDropdownPlacementTopLeft: MR,
  17018. selectDropdownPlacementTopRight: kR,
  17019. selectDropdownSlideDownIn: DR,
  17020. selectDropdownSlideDownOut: NR
  17021. };
  17022. function r_(e) {
  17023. const {
  17024. value: t,
  17025. options: n = [],
  17026. onChange: r,
  17027. style: a,
  17028. className: o,
  17029. mode: i,
  17030. borderless: u = !1,
  17031. dropdownRender: l,
  17032. labelRender: c,
  17033. open: s,
  17034. dropdownStyle: v,
  17035. onDropdownVisibleChange: C,
  17036. disabled: p
  17037. } = e, { mountContainer: m, locale: b } = Sn(In), f = jt(o, {
  17038. [Xs.selectBorderless]: u
  17039. });
  17040. return m && /* @__PURE__ */ q.jsx(
  17041. Qu,
  17042. {
  17043. mode: i,
  17044. prefixCls: Xs.select,
  17045. getPopupContainer: () => m,
  17046. options: n,
  17047. value: t,
  17048. menuItemSelectedIcon: null,
  17049. suffixIcon: /* @__PURE__ */ q.jsx(Dc, {}),
  17050. onChange: r,
  17051. style: a,
  17052. className: f,
  17053. dropdownRender: l,
  17054. labelRender: c,
  17055. open: s,
  17056. dropdownStyle: v,
  17057. onDropdownVisibleChange: C,
  17058. notFoundContent: b == null ? void 0 : b.Select.empty,
  17059. disabled: p
  17060. }
  17061. );
  17062. }
  17063. const IR = "univer-select-list", OR = "univer-select-list-item", _R = "univer-select-list-item-icon", LR = "univer-select-list-item-select", so = {
  17064. selectList: IR,
  17065. selectListItem: OR,
  17066. selectListItemIcon: _R,
  17067. selectListItemSelect: LR
  17068. };
  17069. function a_(e) {
  17070. const { value: t, options: n = [], hideCheckMark: r = !1, onChange: a, multiple: o, className: i, optionClassName: u } = e, l = Array.isArray(t) ? t : [t];
  17071. function c(s) {
  17072. const v = l.indexOf(s);
  17073. o ? v > -1 ? a(l.filter((C) => C === s)) : a([...l, s]) : v > -1 ? a(void 0) : a(s);
  17074. }
  17075. return /* @__PURE__ */ q.jsx("ul", { className: jt(so.selectList, i), children: n.map((s, v) => {
  17076. const C = l.indexOf(s.value) > -1;
  17077. return /* @__PURE__ */ q.jsx(
  17078. "li",
  17079. {
  17080. className: jt(so.selectListItem, u, { [so.selectListItemSelect]: C }),
  17081. children: /* @__PURE__ */ q.jsxs("a", { onClick: () => c(s.value), children: [
  17082. !r && /* @__PURE__ */ q.jsx("span", { className: so.selectListItemIcon, children: C && /* @__PURE__ */ q.jsx(Ao, {}) }),
  17083. /* @__PURE__ */ q.jsx("span", { style: { color: s.color }, children: s.label })
  17084. ] })
  17085. },
  17086. v
  17087. );
  17088. }) });
  17089. }
  17090. var Zs = function(t, n) {
  17091. if (!t) return null;
  17092. var r = {
  17093. left: t.offsetLeft,
  17094. right: t.parentElement.clientWidth - t.clientWidth - t.offsetLeft,
  17095. width: t.clientWidth,
  17096. top: t.offsetTop,
  17097. bottom: t.parentElement.clientHeight - t.clientHeight - t.offsetTop,
  17098. height: t.clientHeight
  17099. };
  17100. return n ? {
  17101. left: 0,
  17102. right: 0,
  17103. width: 0,
  17104. top: r.top,
  17105. bottom: r.bottom,
  17106. height: r.height
  17107. } : {
  17108. left: r.left,
  17109. right: r.right,
  17110. width: r.width,
  17111. top: 0,
  17112. bottom: 0,
  17113. height: 0
  17114. };
  17115. }, Tn = function(t) {
  17116. return t !== void 0 ? "".concat(t, "px") : void 0;
  17117. };
  17118. function TR(e) {
  17119. var t = e.prefixCls, n = e.containerRef, r = e.value, a = e.getValueIndex, o = e.motionName, i = e.onMotionStart, u = e.onMotionEnd, l = e.direction, c = e.vertical, s = c === void 0 ? !1 : c, v = d.useRef(null), C = d.useState(r), p = nn(C, 2), m = p[0], b = p[1], f = function(T) {
  17120. var P, z = a(T), _ = (P = n.current) === null || P === void 0 ? void 0 : P.querySelectorAll(".".concat(t, "-item"))[z];
  17121. return (_ == null ? void 0 : _.offsetParent) && _;
  17122. }, h = d.useState(null), g = nn(h, 2), y = g[0], w = g[1], E = d.useState(null), S = nn(E, 2), x = S[0], R = S[1];
  17123. St(function() {
  17124. if (m !== r) {
  17125. var I = f(m), T = f(r), P = Zs(I, s), z = Zs(T, s);
  17126. b(r), w(P), R(z), I && T ? i() : u();
  17127. }
  17128. }, [r]);
  17129. var k = d.useMemo(function() {
  17130. if (s) {
  17131. var I;
  17132. return Tn((I = y == null ? void 0 : y.top) !== null && I !== void 0 ? I : 0);
  17133. }
  17134. return Tn(l === "rtl" ? -(y == null ? void 0 : y.right) : y == null ? void 0 : y.left);
  17135. }, [s, l, y]), L = d.useMemo(function() {
  17136. if (s) {
  17137. var I;
  17138. return Tn((I = x == null ? void 0 : x.top) !== null && I !== void 0 ? I : 0);
  17139. }
  17140. return Tn(l === "rtl" ? -(x == null ? void 0 : x.right) : x == null ? void 0 : x.left);
  17141. }, [s, l, x]), O = function() {
  17142. return s ? {
  17143. transform: "translateY(var(--thumb-start-top))",
  17144. height: "var(--thumb-start-height)"
  17145. } : {
  17146. transform: "translateX(var(--thumb-start-left))",
  17147. width: "var(--thumb-start-width)"
  17148. };
  17149. }, N = function() {
  17150. return s ? {
  17151. transform: "translateY(var(--thumb-active-top))",
  17152. height: "var(--thumb-active-height)"
  17153. } : {
  17154. transform: "translateX(var(--thumb-active-left))",
  17155. width: "var(--thumb-active-width)"
  17156. };
  17157. }, F = function() {
  17158. w(null), R(null), u();
  17159. };
  17160. return !y || !x ? null : /* @__PURE__ */ d.createElement(zo, {
  17161. visible: !0,
  17162. motionName: o,
  17163. motionAppear: !0,
  17164. onAppearStart: O,
  17165. onAppearActive: N,
  17166. onVisibleChanged: F
  17167. }, function(I, T) {
  17168. var P = I.className, z = I.style, _ = et(et({}, z), {}, {
  17169. "--thumb-start-left": k,
  17170. "--thumb-start-width": Tn(y == null ? void 0 : y.width),
  17171. "--thumb-active-left": L,
  17172. "--thumb-active-width": Tn(x == null ? void 0 : x.width),
  17173. "--thumb-start-top": k,
  17174. "--thumb-start-height": Tn(y == null ? void 0 : y.height),
  17175. "--thumb-active-top": L,
  17176. "--thumb-active-height": Tn(x == null ? void 0 : x.height)
  17177. }), A = {
  17178. ref: lr(v, T),
  17179. style: _,
  17180. className: xe("".concat(t, "-thumb"), P)
  17181. };
  17182. return /* @__PURE__ */ d.createElement("div", A);
  17183. });
  17184. }
  17185. var $R = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "onChange", "className", "motionName"];
  17186. function AR(e) {
  17187. if (typeof e.title < "u")
  17188. return e.title;
  17189. if (fn(e.label) !== "object") {
  17190. var t;
  17191. return (t = e.label) === null || t === void 0 ? void 0 : t.toString();
  17192. }
  17193. }
  17194. function jR(e) {
  17195. return e.map(function(t) {
  17196. if (fn(t) === "object" && t !== null) {
  17197. var n = AR(t);
  17198. return et(et({}, t), {}, {
  17199. title: n
  17200. });
  17201. }
  17202. return {
  17203. label: t == null ? void 0 : t.toString(),
  17204. title: t == null ? void 0 : t.toString(),
  17205. value: t
  17206. };
  17207. });
  17208. }
  17209. var FR = function(t) {
  17210. var n = t.prefixCls, r = t.className, a = t.disabled, o = t.checked, i = t.label, u = t.title, l = t.value, c = t.onChange, s = function(C) {
  17211. a || c(C, l);
  17212. };
  17213. return /* @__PURE__ */ d.createElement("label", {
  17214. className: xe(r, At({}, "".concat(n, "-item-disabled"), a))
  17215. }, /* @__PURE__ */ d.createElement("input", {
  17216. className: "".concat(n, "-item-input"),
  17217. type: "radio",
  17218. disabled: a,
  17219. checked: o,
  17220. onChange: s
  17221. }), /* @__PURE__ */ d.createElement("div", {
  17222. className: "".concat(n, "-item-label"),
  17223. title: u,
  17224. role: "option",
  17225. "aria-selected": o
  17226. }, i));
  17227. }, zR = /* @__PURE__ */ d.forwardRef(function(e, t) {
  17228. var n, r, a = e.prefixCls, o = a === void 0 ? "rc-segmented" : a, i = e.direction, u = e.vertical, l = e.options, c = l === void 0 ? [] : l, s = e.disabled, v = e.defaultValue, C = e.value, p = e.onChange, m = e.className, b = m === void 0 ? "" : m, f = e.motionName, h = f === void 0 ? "thumb-motion" : f, g = $i(e, $R), y = d.useRef(null), w = d.useMemo(function() {
  17229. return lr(y, t);
  17230. }, [y, t]), E = d.useMemo(function() {
  17231. return jR(c);
  17232. }, [c]), S = Gt((n = E[0]) === null || n === void 0 ? void 0 : n.value, {
  17233. value: C,
  17234. defaultValue: v
  17235. }), x = nn(S, 2), R = x[0], k = x[1], L = d.useState(!1), O = nn(L, 2), N = O[0], F = O[1], I = function(z, _) {
  17236. s || (k(_), p == null || p(_));
  17237. }, T = Er(g, ["children"]);
  17238. return /* @__PURE__ */ d.createElement("div", sn({
  17239. role: "listbox",
  17240. "aria-label": "segmented control"
  17241. }, T, {
  17242. className: xe(o, (r = {}, At(r, "".concat(o, "-rtl"), i === "rtl"), At(r, "".concat(o, "-disabled"), s), At(r, "".concat(o, "-vertical"), u), r), b),
  17243. ref: w
  17244. }), /* @__PURE__ */ d.createElement("div", {
  17245. className: "".concat(o, "-group")
  17246. }, /* @__PURE__ */ d.createElement(TR, {
  17247. vertical: u,
  17248. prefixCls: o,
  17249. value: R,
  17250. containerRef: y,
  17251. motionName: "".concat(o, "-").concat(h),
  17252. direction: i,
  17253. getValueIndex: function(z) {
  17254. return E.findIndex(function(_) {
  17255. return _.value === z;
  17256. });
  17257. },
  17258. onMotionStart: function() {
  17259. F(!0);
  17260. },
  17261. onMotionEnd: function() {
  17262. F(!1);
  17263. }
  17264. }), E.map(function(P) {
  17265. return /* @__PURE__ */ d.createElement(FR, sn({}, P, {
  17266. key: P.value,
  17267. prefixCls: o,
  17268. className: xe(P.className, "".concat(o, "-item"), At({}, "".concat(o, "-item-selected"), P.value === R && !N)),
  17269. checked: P.value === R,
  17270. onChange: I,
  17271. disabled: !!s || !!P.disabled
  17272. }));
  17273. })));
  17274. }), HR = zR;
  17275. const VR = "univer-segmented", WR = "univer-segmented-group", BR = "univer-segmented-item", UR = "univer-segmented-item-selected", qR = "univer-segmented-item-disabled", KR = "univer-segmented-item-label", YR = "univer-segmented-item-input", GR = "univer-segmented-disabled", XR = "univer-segmented-thumb", ZR = "univer-segmented-thumb-motion-appear-active", QR = "univer-segmented-thumb-motion-enter-active", JR = "univer-segmented-rtl", eP = {
  17276. segmented: VR,
  17277. segmentedGroup: WR,
  17278. segmentedItem: BR,
  17279. segmentedItemSelected: UR,
  17280. segmentedItemDisabled: qR,
  17281. segmentedItemLabel: KR,
  17282. segmentedItemInput: YR,
  17283. segmentedDisabled: GR,
  17284. segmentedThumb: XR,
  17285. segmentedThumbMotionAppearActive: ZR,
  17286. segmentedThumbMotionEnterActive: QR,
  17287. segmentedRtl: JR
  17288. }, o_ = $t(function(t, n) {
  17289. return /* @__PURE__ */ q.jsx(HR, { prefixCls: eP.segmented, ...t, ref: n });
  17290. });
  17291. function Gf({ visible: e, asChild: t = !1, title: n, children: r, placement: a = "bottom", showIfEllipsis: o = !1, onVisibleChange: i }) {
  17292. if (!Kr || n === void 0)
  17293. return null;
  17294. const [u, l] = rt(!1), [c, s] = rt({ x: 0, y: 0 }), [v, C] = rt(a), p = Ce(null), m = Ce(null), [b, f] = rt(0), [h, g] = rt(!1), y = e !== void 0, w = y ? e : h, E = (R) => {
  17295. y || g(R), i == null || i(R);
  17296. }, S = () => {
  17297. if (!p.current || !m.current) return;
  17298. const R = p.current.getBoundingClientRect(), k = m.current.getBoundingClientRect(), L = window.scrollX, O = window.scrollY, N = 8, F = 12;
  17299. let I = a, T = 0;
  17300. const P = () => {
  17301. switch (I) {
  17302. case "top":
  17303. return {
  17304. x: R.left + (R.width - k.width) / 2,
  17305. y: R.top - k.height - N
  17306. };
  17307. case "bottom":
  17308. return {
  17309. x: R.left + (R.width - k.width) / 2,
  17310. y: R.bottom + N
  17311. };
  17312. case "left":
  17313. return {
  17314. x: R.left - k.width - N,
  17315. y: R.top + (R.height - k.height) / 2
  17316. };
  17317. case "right":
  17318. return {
  17319. x: R.right + N,
  17320. y: R.top + (R.height - k.height) / 2
  17321. };
  17322. }
  17323. }, z = (H) => {
  17324. switch (I) {
  17325. case "top":
  17326. return H.y < N;
  17327. case "bottom":
  17328. return H.y + k.height > window.innerHeight - N;
  17329. case "left":
  17330. return H.x < N;
  17331. case "right":
  17332. return H.x + k.width > window.innerWidth - N;
  17333. }
  17334. }, _ = () => ({
  17335. top: "bottom",
  17336. bottom: "top",
  17337. left: "right",
  17338. right: "left"
  17339. })[I];
  17340. let A = P();
  17341. if (z(A))
  17342. I = _(), A = P();
  17343. else if (["top", "bottom"].includes(I)) {
  17344. const H = N, $ = window.innerWidth - k.width - N;
  17345. A.x < H ? (T = A.x - H, A.x = H) : A.x > $ && (T = A.x - $, A.x = $);
  17346. const U = k.width / 2 - F;
  17347. T = Math.max(Math.min(T, U), -U);
  17348. } else {
  17349. const H = N, $ = window.innerHeight - k.height - N;
  17350. A.y < H ? (T = A.y - H, A.y = H) : A.y > $ && (T = A.y - $, A.y = $);
  17351. const U = k.height / 2 - F;
  17352. T = Math.max(Math.min(T, U), -U);
  17353. }
  17354. A.x += L, A.y += O, s(A), C(I), f(T), l(!0);
  17355. };
  17356. lt(() => {
  17357. if (w) {
  17358. l(!1), requestAnimationFrame(() => {
  17359. S();
  17360. });
  17361. const R = () => {
  17362. l(!1), requestAnimationFrame(S);
  17363. };
  17364. return window.addEventListener("scroll", R), window.addEventListener("resize", R), () => {
  17365. window.removeEventListener("scroll", R), window.removeEventListener("resize", R);
  17366. };
  17367. }
  17368. }, [w]), lt(() => {
  17369. const R = p.current;
  17370. if (!R)
  17371. return;
  17372. const k = t ? R : R.firstElementChild;
  17373. function L(F) {
  17374. return Math.abs(F.scrollWidth - F.clientWidth) > 1;
  17375. }
  17376. function O() {
  17377. o && k && !L(k) || E(!0);
  17378. }
  17379. function N() {
  17380. E(!1), l(!1);
  17381. }
  17382. if (!(y && !i))
  17383. return R.addEventListener("mouseenter", O), R.addEventListener("mouseleave", N), () => {
  17384. R.removeEventListener("mouseenter", O), R.removeEventListener("mouseleave", N);
  17385. };
  17386. }, [t, o, y, i]), lt(() => {
  17387. y && (e ? (l(!1), requestAnimationFrame(() => {
  17388. S();
  17389. })) : l(!1));
  17390. }, [e, y]);
  17391. const x = me.cloneElement(
  17392. // eslint-disable-next-line react/no-children-only
  17393. me.Children.only(r),
  17394. {
  17395. ref: p
  17396. }
  17397. );
  17398. return /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
  17399. t ? x : /* @__PURE__ */ q.jsx("div", { ref: p, className: "univer-inline-block", children: r }),
  17400. w && $a(
  17401. /* @__PURE__ */ q.jsx(
  17402. "div",
  17403. {
  17404. ref: m,
  17405. className: Na(`
  17406. univer-pointer-events-none univer-fixed univer-z-[1100] univer-font-sans univer-opacity-0
  17407. univer-duration-200 univer-animate-in univer-fade-in-0 univer-zoom-in-95
  17408. `, {
  17409. "univer-opacity-100": u,
  17410. "univer-slide-in-from-bottom-2": v === "top" && u,
  17411. "univer-slide-in-from-top-2": v === "bottom" && u,
  17412. "univer-slide-in-from-right-2": v === "left" && u,
  17413. "univer-slide-in-from-left-2": v === "right" && u
  17414. }),
  17415. "data-state": w ? "open" : "closed",
  17416. style: {
  17417. left: c.x,
  17418. top: c.y,
  17419. transition: "opacity 150ms ease-out"
  17420. },
  17421. children: /* @__PURE__ */ q.jsxs("div", { className: "univer-relative", children: [
  17422. /* @__PURE__ */ q.jsx(
  17423. "div",
  17424. {
  17425. className: `
  17426. univer-w-fit univer-max-w-[192px] univer-break-words univer-rounded-lg univer-bg-gray-700
  17427. univer-px-3 univer-py-2.5 univer-text-xs univer-font-medium univer-text-white
  17428. `,
  17429. children: n
  17430. }
  17431. ),
  17432. /* @__PURE__ */ q.jsx(
  17433. "div",
  17434. {
  17435. className: Na("univer-absolute univer-h-2 univer-w-2 univer-rotate-45 univer-bg-gray-700", {
  17436. "-univer-bottom-1 univer-left-1/2 -univer-translate-x-1/2": v === "top",
  17437. "-univer-top-1 univer-left-1/2 -univer-translate-x-1/2": v === "bottom",
  17438. "-univer-right-1 univer-top-1/2 -univer-translate-y-1/2": v === "left",
  17439. "-univer-left-1 univer-top-1/2 -univer-translate-y-1/2": v === "right"
  17440. }),
  17441. style: {
  17442. ...v === "top" && {
  17443. "--tw-translate-x": `calc(-50% + ${b}px)`
  17444. },
  17445. ...v === "bottom" && {
  17446. "--tw-translate-x": `calc(-50% + ${b}px)`
  17447. },
  17448. ...v === "left" && {
  17449. "--tw-translate-y": `calc(-50% + ${b}px)`
  17450. },
  17451. ...v === "right" && {
  17452. "--tw-translate-y": `calc(-50% + ${b}px)`
  17453. }
  17454. }
  17455. }
  17456. )
  17457. ] })
  17458. }
  17459. ),
  17460. document.body
  17461. )
  17462. ] });
  17463. }
  17464. const tP = "116", nP = "12", rP = "univer-slider", aP = "univer-slider-disabled", oP = "univer-slider-rail", iP = "univer-slider-handle", uP = "univer-slider-reset-point", lP = "univer-slider-value", sP = "univer-slider-inner-rail", cP = "univer-dropdown-open", dP = "univer-slider-shortcuts", fP = "univer-slider-shortcut", vP = "univer-slider-shortcut-icon", mP = "univer-slider-shortcut-active", $n = {
  17465. sliderWidth: tP,
  17466. sliderHandleSize: nP,
  17467. slider: rP,
  17468. sliderDisabled: aP,
  17469. sliderRail: oP,
  17470. sliderHandle: iP,
  17471. sliderResetPoint: uP,
  17472. sliderValue: lP,
  17473. sliderInnerRail: sP,
  17474. dropdownOpen: cP,
  17475. sliderShortcuts: dP,
  17476. sliderShortcut: fP,
  17477. sliderShortcutIcon: vP,
  17478. sliderShortcutActive: mP
  17479. };
  17480. function i_(e) {
  17481. const { value: t, min: n = 0, max: r = 400, disabled: a = !1, resetPoint: o = 100, shortcuts: i, onChange: u } = e, l = Ce(null), { locale: c } = Sn(In);
  17482. function s() {
  17483. a || u && u(o);
  17484. }
  17485. function v(m) {
  17486. if (a) return;
  17487. let b = t + m;
  17488. t + m <= n ? b = n : t + m >= r && (b = r), u && u(b);
  17489. }
  17490. const C = Ht(() => {
  17491. if (t <= o) {
  17492. const m = 50 / (o - n);
  17493. return (t - n) * m;
  17494. }
  17495. if (t <= r)
  17496. return o * 0.5 + (t - o) / (r - o) * 50;
  17497. }, [n, r, o, t]);
  17498. function p(m) {
  17499. if (a) return;
  17500. m.preventDefault();
  17501. const b = l.current;
  17502. let f = !0;
  17503. function h(w) {
  17504. if (f) {
  17505. let S = w.clientX - b.getBoundingClientRect().x;
  17506. S <= 0 ? S = 0 : S >= 116 && (S = 116);
  17507. const x = S / 116;
  17508. let R = 0;
  17509. x <= 0.5 ? R = n + x * (o - n) * 2 : R = o + (x - 0.5) * (r - o) * 2, u && u(Math.ceil(R));
  17510. }
  17511. }
  17512. function g() {
  17513. f = !1, document.removeEventListener("pointermove", h), window.removeEventListener("pointerup", g);
  17514. }
  17515. function y(w) {
  17516. w.relatedTarget === null && g();
  17517. }
  17518. window.addEventListener("pointermove", h), window.addEventListener("pointerup", g), window.addEventListener("pointerout", y);
  17519. }
  17520. return /* @__PURE__ */ q.jsxs(
  17521. "div",
  17522. {
  17523. className: jt($n.slider, {
  17524. [$n.sliderDisabled]: a
  17525. }),
  17526. children: [
  17527. /* @__PURE__ */ q.jsx(Po, { type: "text", size: "small", disabled: t <= n || a, onClick: () => v(-10), children: /* @__PURE__ */ q.jsx(_c, {}) }),
  17528. /* @__PURE__ */ q.jsx("div", { className: $n.sliderRail, children: /* @__PURE__ */ q.jsxs("div", { ref: l, role: "track", className: $n.sliderInnerRail, children: [
  17529. /* @__PURE__ */ q.jsx(Gf, { title: `${c == null ? void 0 : c.Slider.resetTo} ${o}%`, placement: "top", asChild: !0, children: /* @__PURE__ */ q.jsx(
  17530. "a",
  17531. {
  17532. className: `
  17533. univer-cursor-pointer univer-absolute univer-left-1/2 univer-top-1/2
  17534. -univer-translate-x-1/2 -univer-translate-y-1/2 univer-box-border univer-w-0.5
  17535. univer-h-0.5 univer-bg-white univer-rounded-full univer-block
  17536. `,
  17537. role: "button",
  17538. onClick: s
  17539. },
  17540. "reset-button"
  17541. ) }),
  17542. /* @__PURE__ */ q.jsx(
  17543. "div",
  17544. {
  17545. className: $n.sliderHandle,
  17546. role: "handle",
  17547. style: {
  17548. left: `${C}%`
  17549. },
  17550. onPointerDown: p
  17551. }
  17552. )
  17553. ] }) }),
  17554. /* @__PURE__ */ q.jsx(Po, { type: "text", size: "small", disabled: t >= r || a, onClick: () => v(10), children: /* @__PURE__ */ q.jsx(Pc, {}) }),
  17555. /* @__PURE__ */ q.jsx(
  17556. sC,
  17557. {
  17558. placement: "topLeft",
  17559. overlay: /* @__PURE__ */ q.jsx("div", { className: $n.sliderShortcuts, children: i == null ? void 0 : i.map((m) => /* @__PURE__ */ q.jsxs(
  17560. "a",
  17561. {
  17562. className: jt(
  17563. $n.sliderShortcut,
  17564. m === t ? $n.sliderShortcutActive : ""
  17565. ),
  17566. onClick: () => u && u(m),
  17567. children: [
  17568. m === t && /* @__PURE__ */ q.jsx("span", { className: $n.sliderShortcutIcon, children: /* @__PURE__ */ q.jsx(Ao, {}) }),
  17569. /* @__PURE__ */ q.jsxs("span", { children: [
  17570. m,
  17571. "%"
  17572. ] })
  17573. ]
  17574. },
  17575. m
  17576. )) }),
  17577. children: /* @__PURE__ */ q.jsxs("a", { className: $n.sliderValue, children: [
  17578. t,
  17579. "%"
  17580. ] })
  17581. }
  17582. )
  17583. ]
  17584. }
  17585. );
  17586. }
  17587. const pP = "univer-tree", hP = "univer-tree-icon", gP = "univer-tree-icon-expand", yP = "univer-tree-list", bP = "univer-tree-list-expand", CP = "univer-tree-list-item", SP = "univer-tree-list-item-title", wP = "univer-tree-list-item-content", xP = "univer-tree-list-item-content-selected-icon", Qn = {
  17588. tree: pP,
  17589. treeIcon: hP,
  17590. treeIconExpand: gP,
  17591. treeList: yP,
  17592. treeListExpand: bP,
  17593. treeListItem: CP,
  17594. treeListItemTitle: SP,
  17595. treeListItemContent: wP,
  17596. treeListItemContentSelectedIcon: xP
  17597. }, EP = (e, t) => {
  17598. const n = [], r = (a) => {
  17599. var o;
  17600. if (n.push(a.key), t === a.key || (o = a.children) != null && o.length && a.children.some(r))
  17601. return !0;
  17602. n.pop();
  17603. };
  17604. return e.some(r), n;
  17605. }, Xf = (e, t) => {
  17606. const n = t != null ? t : /* @__PURE__ */ new Map();
  17607. let r = e;
  17608. return {
  17609. findNodePathFromTreeWithCache: (a) => {
  17610. const o = n.get(a);
  17611. if (o)
  17612. return o;
  17613. const i = EP(r, a);
  17614. return i.map((l, c, s) => {
  17615. const v = [];
  17616. for (let C = 0; C <= c; C++)
  17617. v.push(s[C]);
  17618. return v;
  17619. }).reverse().forEach((l) => {
  17620. const c = l[l.length - 1];
  17621. n.set(c, l);
  17622. }), i;
  17623. },
  17624. reset: (a) => {
  17625. n.clear(), a && (r = a);
  17626. }
  17627. };
  17628. }, mu = (e, t) => t.length ? t.reduce((n, r) => {
  17629. const a = n.find((o) => o.key === r);
  17630. return (a == null ? void 0 : a.children) || [];
  17631. }, e) : e, RP = (e, t) => {
  17632. const n = t.slice(0), r = n.pop();
  17633. return mu(e, n).find((o) => o.key === r);
  17634. }, u_ = (e, t, n) => {
  17635. const r = new Set(t), a = n[n.length - 1], o = mu(e, n);
  17636. if (r.has(a)) {
  17637. if (o.length) {
  17638. const u = (l) => {
  17639. r.delete(l.key), l.children && l.children.forEach((c) => u(c));
  17640. };
  17641. o.forEach(u);
  17642. }
  17643. n.map((u, l, c) => {
  17644. const s = [];
  17645. for (let v = 0; v <= l; v++)
  17646. s.push(c[v]);
  17647. return s;
  17648. }).reverse().some((u) => {
  17649. const l = mu(e, u), c = u[u.length - 1];
  17650. if (l.every((s) => !r.has(s.key)))
  17651. r.delete(c);
  17652. else
  17653. return !0;
  17654. return !1;
  17655. });
  17656. } else {
  17657. const i = (u) => {
  17658. r.add(u.key), u.children && u.children.forEach((l) => i(l));
  17659. };
  17660. n.forEach((u) => r.add(u)), o.length && o.forEach(i);
  17661. }
  17662. return [...r];
  17663. }, PP = (e, t) => {
  17664. const n = t.children || [], r = (a) => {
  17665. var o;
  17666. return (o = a.children) != null && o.length ? !!a.children.every(r) : e.has(a.key);
  17667. };
  17668. return n.length ? n.some((a) => !r(a)) : !1;
  17669. }, l_ = (e, t) => {
  17670. const n = [], r = Xf(e);
  17671. return t.forEach((a) => {
  17672. var u;
  17673. const o = r.findNodePathFromTreeWithCache(a), i = RP(e, o);
  17674. i && ((u = i.children) != null && u.length || n.push(i));
  17675. }), n;
  17676. };
  17677. var MP = /* @__PURE__ */ ((e) => (e[e.ONLY_LEAF_NODE = 0] = "ONLY_LEAF_NODE", e[e.ALL = 1] = "ALL", e))(MP || {});
  17678. function Zf(e, t, n = 1) {
  17679. const r = [];
  17680. return e.forEach((a) => {
  17681. r.push({ ...a, level: n }), a.children && t.has(a.key) && r.push(...Zf(a.children, t, n + 1));
  17682. }), r;
  17683. }
  17684. function s_(e) {
  17685. const { data: t = [], defaultCache: n, style: r, defaultExpandAll: a = !1, selectionMode: o = 1, valueGroup: i = [], onChange: u, onExpend: l, height: c = 200, itemHeight: s = 32, attachRender: v } = e, [C, p] = rt({}), m = Ht(() => /* @__PURE__ */ new Set(), []), b = Ht(() => Xf(t, n), [t, n]), f = Ht(() => {
  17686. const w = /* @__PURE__ */ new Set();
  17687. return i.forEach((E) => {
  17688. b.findNodePathFromTreeWithCache(E).forEach((x) => w.add(x));
  17689. }), w;
  17690. }, [i, b]);
  17691. lt(() => {
  17692. function w(E) {
  17693. var S;
  17694. m.add(E.key), (S = E.children) == null || S.forEach(w);
  17695. }
  17696. a && t.forEach(w), p({});
  17697. }, [a, t]);
  17698. const h = Ht(() => Zf(t, m), [t, C, m]);
  17699. function g(w) {
  17700. var E;
  17701. (E = w.children) != null && E.length && (m.has(w.key) ? m.delete(w.key) : m.add(w.key), p({})), !(o === 0 && w.children) && (l == null || l(w.key));
  17702. }
  17703. function y(w) {
  17704. const { title: E, key: S, level: x = 0 } = w, R = e.treeNodeClassName, k = m.has(S), L = f.has(S), O = PP(f, w);
  17705. return /* @__PURE__ */ q.jsx(
  17706. "div",
  17707. {
  17708. className: jt(Qn.treeListItem, R),
  17709. style: { paddingLeft: `${x * 20}px` },
  17710. children: /* @__PURE__ */ q.jsxs(
  17711. "div",
  17712. {
  17713. className: jt(Qn.treeListItemContent, {
  17714. [Qn.treeListItemContentSelected]: L
  17715. }),
  17716. children: [
  17717. w.children && w.children.length > 0 && /* @__PURE__ */ q.jsx(
  17718. "span",
  17719. {
  17720. className: jt(Qn.treeIcon, {
  17721. [Qn.treeIconExpand]: k
  17722. }),
  17723. onClick: (N) => {
  17724. N.stopPropagation(), g(w);
  17725. },
  17726. children: /* @__PURE__ */ q.jsx(Ec, {})
  17727. }
  17728. ),
  17729. /* @__PURE__ */ q.jsx(
  17730. um,
  17731. {
  17732. checked: L && !O,
  17733. indeterminate: L && O,
  17734. onChange: () => {
  17735. u == null || u(w);
  17736. }
  17737. }
  17738. ),
  17739. /* @__PURE__ */ q.jsx(Gf, { showIfEllipsis: !0, placement: "top", title: E, children: /* @__PURE__ */ q.jsx(
  17740. "span",
  17741. {
  17742. className: Qn.treeListItemTitle,
  17743. onClick: (N) => {
  17744. N.stopPropagation(), g(w);
  17745. },
  17746. children: E
  17747. }
  17748. ) }),
  17749. v && v(w)
  17750. ]
  17751. }
  17752. )
  17753. },
  17754. S
  17755. );
  17756. }
  17757. return /* @__PURE__ */ q.jsx("section", { className: Qn.tree, children: /* @__PURE__ */ q.jsx("div", { className: Qn.treeList, style: r, children: /* @__PURE__ */ q.jsx(
  17758. Zu,
  17759. {
  17760. data: h,
  17761. itemKey: (w) => w.key,
  17762. height: c,
  17763. itemHeight: s,
  17764. children: (w) => y(w)
  17765. }
  17766. ) }) });
  17767. }
  17768. const kP = "univer-switch-wrapper", DP = "univer-slider", Ri = {
  17769. switchWrapper: kP,
  17770. switch: "univer-switch",
  17771. slider: DP
  17772. }, c_ = (e) => {
  17773. const { defaultChecked: t = !1, onChange: n } = e, [r, a] = rt(t), o = () => {
  17774. a(!r), n == null || n(!r);
  17775. };
  17776. return lt(() => {
  17777. a(t);
  17778. }, [t]), /* @__PURE__ */ q.jsx("div", { className: Ri.switchWrapper, children: /* @__PURE__ */ q.jsxs("label", { className: Ri.switch, children: [
  17779. /* @__PURE__ */ q.jsx("input", { type: "checkbox", checked: r, onChange: o }),
  17780. /* @__PURE__ */ q.jsx("span", { className: Ri.slider })
  17781. ] }) });
  17782. }, NP = "#fee7e7", IP = "#fdcece", OP = "#fb9d9d", _P = "#fa7979", LP = "#fe4b4b", TP = "#f30b0b", $P = "#e30909", AP = "#cd0f0f", jP = "#b20000", FP = "#9d0000", zP = "#fef0e6", HP = "#fee1cd", VP = "#fdc49b", WP = "#fca669", BP = "#ff8c51", UP = "#fb8937", qP = "#f96800", KP = "#df5d00", YP = "#cc4f10", GP = "#b24000", XP = "#fef6e6", ZP = "#feeecd", QP = "#fddc9b", JP = "#fccb69", eM = "#ffbd37", tM = "#faad14", nM = "#e59b07", rM = "#c68400", aM = "#a97100", oM = "#8f5f00", iM = "#fefbe6", uM = "#fef7cd", lM = "#fdf09b", sM = "#fce869", cM = "#fbe137", dM = "#f9d700", fM = "#ebc301", vM = "#d8b300", mM = "#c5a300", pM = "#b19401", hM = "#f7fde8", gM = "#effbd0", yM = "#def6a2", bM = "#cef273", CM = "#beee44", SM = "#a4dc16", wM = "#8bbb11", xM = "#7aa017", EM = "#688c0d", RM = "#58770a", PM = "#effce8", MM = "#dff9d2", kM = "#bff3a5", DM = "#9fed78", NM = "#7fe74b", IM = "#59d01e", OM = "#49b811", _M = "#409f11", LM = "#398712", TM = "#317310", $M = "#e5fffb", AM = "#ccfff7", jM = "#a9fff2", FM = "#78fce8", zM = "#2afede", HM = "#10e8c7", VM = "#00d2b2", WM = "#00b298", BM = "#009e87", UM = "#008b76", qM = "#e4f4fe", KM = "#d0edff", YM = "#9fdaff", GM = "#62c2ff", XM = "#2daeff", ZM = "#0b9efb", QM = "#0493ee", JM = "#0080d2", e2 = "#006cae", t2 = "#005f9a", n2 = "#e8ecfd", r2 = "#d0d9fb", a2 = "#a2b3f6", o2 = "#738df2", i2 = "#3a60f7", u2 = "#274fee", l2 = "#143ee3", s2 = "#012bd2", c2 = "#0025b7", d2 = "#001f9c", f2 = "#f1eafa", v2 = "#e3d5f6", m2 = "#c7abed", p2 = "#aa82e3", h2 = "#9e6de3", g2 = "#894ede", y2 = "#7735d4", b2 = "#6721cb", C2 = "#510eb0", S2 = "#3f0198", w2 = "#fde8f3", x2 = "#fbd0e8", E2 = "#f6a2d0", R2 = "#f273b9", P2 = "#f248a6", M2 = "#e7258f", k2 = "#d4157e", D2 = "#c1026b", N2 = "#a1095c", I2 = "#8f0550", O2 = "#f5f5f5", _2 = "#ececec", L2 = "#e5e5e5", T2 = "#d8d8d8", $2 = "#bcbcbc", A2 = "#999999", j2 = "#7a7a7a", F2 = "#656565", z2 = "#565656", H2 = "#4b4b4b", V2 = "#1e222b", W2 = "#ffffff", B2 = "0 4px 12px rgba(30, 34, 43, 0.08)", U2 = "0 4px 24px 0 rgba(30, 34, 43, 0.08)", q2 = "#ececec", K2 = "#d8d8d8", Y2 = "#ffffff", G2 = "#ffffff", X2 = "#1e222b", Z2 = "#7a7a7a", Q2 = "#4b4b4b", J2 = "#bcbcbc", ek = "#e5e5e5", tk = "#bcbcbc", nk = "#999999", rk = "#7a7a7a", ak = "4px", ok = "8px", ik = "12px", uk = "24px", lk = "20px", sk = "16px", ck = "12px", dk = "8px", fk = "4px", vk = "20px", mk = "16px", pk = "12px", hk = "8px", gk = "4px", yk = "20px", bk = "18px", Ck = "16px", Sk = "15px", wk = "14px", xk = "13px", Ek = "12px", Rk = "768px", Pk = "1024px", Mk = "1280px", kk = "1536px", Dk = "#2daeff", Nk = "#59d01e", Ik = "#ffbd37", Ok = "#fe4b4b", _k = "#274fee", Lk = "#3a60f7", Tk = "#0b9efb", $k = "#9e6de3", Ak = "#49b811", jk = "#0b9efb", Fk = "#ffbd37", zk = "#f273b9", Hk = "#00d2b2", Vk = "#ff8c51", Wk = "#565656", Bk = "#274fee", Uk = "#fa7979", qk = "#8bbb11", Kk = "#d8b300", d_ = {
  17783. red50: NP,
  17784. red100: IP,
  17785. red200: OP,
  17786. red300: _P,
  17787. red400: LP,
  17788. red500: TP,
  17789. red600: $P,
  17790. red700: AP,
  17791. red800: jP,
  17792. red900: FP,
  17793. orange50: zP,
  17794. orange100: HP,
  17795. orange200: VP,
  17796. orange300: WP,
  17797. orange400: BP,
  17798. orange500: UP,
  17799. orange600: qP,
  17800. orange700: KP,
  17801. orange800: YP,
  17802. orange900: GP,
  17803. gold50: XP,
  17804. gold100: ZP,
  17805. gold200: QP,
  17806. gold300: JP,
  17807. gold400: eM,
  17808. gold500: tM,
  17809. gold600: nM,
  17810. gold700: rM,
  17811. gold800: aM,
  17812. gold900: oM,
  17813. yellow50: iM,
  17814. yellow100: uM,
  17815. yellow200: lM,
  17816. yellow300: sM,
  17817. yellow400: cM,
  17818. yellow500: dM,
  17819. yellow600: fM,
  17820. yellow700: vM,
  17821. yellow800: mM,
  17822. yellow900: pM,
  17823. verdancy50: hM,
  17824. verdancy100: gM,
  17825. verdancy200: yM,
  17826. verdancy300: bM,
  17827. verdancy400: CM,
  17828. verdancy500: SM,
  17829. verdancy600: wM,
  17830. verdancy700: xM,
  17831. verdancy800: EM,
  17832. verdancy900: RM,
  17833. green50: PM,
  17834. green100: MM,
  17835. green200: kM,
  17836. green300: DM,
  17837. green400: NM,
  17838. green500: IM,
  17839. green600: OM,
  17840. green700: _M,
  17841. green800: LM,
  17842. green900: TM,
  17843. jiqing50: $M,
  17844. jiqing100: AM,
  17845. jiqing200: jM,
  17846. jiqing300: FM,
  17847. jiqing400: zM,
  17848. jiqing500: HM,
  17849. jiqing600: VM,
  17850. jiqing700: WM,
  17851. jiqing800: BM,
  17852. jiqing900: UM,
  17853. blue50: qM,
  17854. blue100: KM,
  17855. blue200: YM,
  17856. blue300: GM,
  17857. blue400: XM,
  17858. blue500: ZM,
  17859. blue600: QM,
  17860. blue700: JM,
  17861. blue800: e2,
  17862. blue900: t2,
  17863. hyacinth50: n2,
  17864. hyacinth100: r2,
  17865. hyacinth200: a2,
  17866. hyacinth300: o2,
  17867. hyacinth400: i2,
  17868. hyacinth500: u2,
  17869. hyacinth600: l2,
  17870. hyacinth700: s2,
  17871. hyacinth800: c2,
  17872. hyacinth900: d2,
  17873. purple50: f2,
  17874. purple100: v2,
  17875. purple200: m2,
  17876. purple300: p2,
  17877. purple400: h2,
  17878. purple500: g2,
  17879. purple600: y2,
  17880. purple700: b2,
  17881. purple800: C2,
  17882. purple900: S2,
  17883. magenta50: w2,
  17884. magenta100: x2,
  17885. magenta200: E2,
  17886. magenta300: R2,
  17887. magenta400: P2,
  17888. magenta500: M2,
  17889. magenta600: k2,
  17890. magenta700: D2,
  17891. magenta800: N2,
  17892. magenta900: I2,
  17893. grey50: O2,
  17894. grey100: _2,
  17895. grey200: L2,
  17896. grey300: T2,
  17897. grey400: $2,
  17898. grey500: A2,
  17899. grey600: j2,
  17900. grey700: F2,
  17901. grey800: z2,
  17902. grey900: H2,
  17903. colorBlack: V2,
  17904. colorWhite: W2,
  17905. boxShadowBase: B2,
  17906. boxShadowLg: U2,
  17907. bgColor: q2,
  17908. bgColorHover: K2,
  17909. bgColorSecondary: Y2,
  17910. bgColorOverlay: G2,
  17911. textColor: X2,
  17912. textColorSecondary: Z2,
  17913. textColorSecondaryDarker: Q2,
  17914. textColorTertiary: J2,
  17915. borderColor: ek,
  17916. scrollbarColor: tk,
  17917. scrollbarColorHover: nk,
  17918. scrollbarColorActive: rk,
  17919. borderRadiusBase: ak,
  17920. borderRadiusLg: ok,
  17921. borderRadiusXl: ik,
  17922. marginXl: uk,
  17923. marginLg: lk,
  17924. marginBase: sk,
  17925. marginSm: ck,
  17926. marginXs: dk,
  17927. marginXxs: fk,
  17928. paddingXl: vk,
  17929. paddingLg: mk,
  17930. paddingBase: pk,
  17931. paddingSm: hk,
  17932. paddingXs: gk,
  17933. fontSizeXxl: yk,
  17934. fontSizeXl: bk,
  17935. fontSizeLg: Ck,
  17936. fontSizeBase: Sk,
  17937. fontSizeSm: wk,
  17938. fontSizeXs: xk,
  17939. fontSizeXxs: Ek,
  17940. breakpointXs: Rk,
  17941. breakpointSm: Pk,
  17942. breakpointBase: Mk,
  17943. breakpointLg: kk,
  17944. infoColor: Dk,
  17945. successColor: Nk,
  17946. warningColor: Ik,
  17947. errorColor: Ok,
  17948. primaryColor: _k,
  17949. primaryColorHover: Lk,
  17950. linkColor: Tk,
  17951. loopColor1: $k,
  17952. loopColor2: Ak,
  17953. loopColor3: jk,
  17954. loopColor4: Fk,
  17955. loopColor5: zk,
  17956. loopColor6: Hk,
  17957. loopColor7: Vk,
  17958. loopColor8: Wk,
  17959. loopColor9: Bk,
  17960. loopColor10: Uk,
  17961. loopColor11: qk,
  17962. loopColor12: Kk
  17963. }, Yk = "#fee7e7", Gk = "#fdcece", Xk = "#fb9d9d", Zk = "#fa7979", Qk = "#fe4b4b", Jk = "#f30b0b", eD = "#e30909", tD = "#cd0f0f", nD = "#b20000", rD = "#9d0000", aD = "#fef0e6", oD = "#fee1cd", iD = "#fdc49b", uD = "#fca669", lD = "#ff8c51", sD = "#fb8937", cD = "#f96800", dD = "#df5d00", fD = "#cc4f10", vD = "#b24000", mD = "#fef6e6", pD = "#feeecd", hD = "#fddc9b", gD = "#fccb69", yD = "#ffbd37", bD = "#faad14", CD = "#e59b07", SD = "#c68400", wD = "#a97100", xD = "#8f5f00", ED = "#fefbe6", RD = "#fef7cd", PD = "#fdf09b", MD = "#fce869", kD = "#fbe137", DD = "#f9d700", ND = "#ebc301", ID = "#d8b300", OD = "#c5a300", _D = "#b19401", LD = "#f7fde8", TD = "#effbd0", $D = "#def6a2", AD = "#cef273", jD = "#beee44", FD = "#a4dc16", zD = "#8bbb11", HD = "#7aa017", VD = "#688c0d", WD = "#58770a", BD = "#effce8", UD = "#dff9d2", qD = "#bff3a5", KD = "#9fed78", YD = "#7fe74b", GD = "#59d01e", XD = "#49b811", ZD = "#409f11", QD = "#398712", JD = "#317310", eN = "#e5fffb", tN = "#ccfff7", nN = "#a9fff2", rN = "#78fce8", aN = "#2afede", oN = "#10e8c7", iN = "#00d2b2", uN = "#00b298", lN = "#009e87", sN = "#008b76", cN = "#e4f4fe", dN = "#d0edff", fN = "#9fdaff", vN = "#62c2ff", mN = "#2daeff", pN = "#0b9efb", hN = "#0493ee", gN = "#0080d2", yN = "#006cae", bN = "#005f9a", CN = "#e8ecfd", SN = "#d0d9fb", wN = "#a2b3f6", xN = "#738df2", EN = "#3a60f7", RN = "#274fee", PN = "#143ee3", MN = "#012bd2", kN = "#0025b7", DN = "#001f9c", NN = "#f1eafa", IN = "#e3d5f6", ON = "#c7abed", _N = "#aa82e3", LN = "#9e6de3", TN = "#894ede", $N = "#7735d4", AN = "#6721cb", jN = "#510eb0", FN = "#3f0198", zN = "#fde8f3", HN = "#fbd0e8", VN = "#f6a2d0", WN = "#f273b9", BN = "#f248a6", UN = "#e7258f", qN = "#d4157e", KN = "#c1026b", YN = "#a1095c", GN = "#8f0550", XN = "#f5f5f5", ZN = "#ececec", QN = "#e5e5e5", JN = "#d8d8d8", eI = "#bcbcbc", tI = "#999999", nI = "#7a7a7a", rI = "#656565", aI = "#565656", oI = "#4b4b4b", iI = "#1e222b", uI = "#ffffff", lI = "0 4px 12px rgba(30, 34, 43, 0.08)", sI = "0 4px 24px 0 rgba(30, 34, 43, 0.08)", cI = "#ececec", dI = "#d8d8d8", fI = "#ffffff", vI = "#ffffff", mI = "#1e222b", pI = "#7a7a7a", hI = "#4b4b4b", gI = "#bcbcbc", yI = "#e5e5e5", bI = "#bcbcbc", CI = "#999999", SI = "#7a7a7a", wI = "4px", xI = "8px", EI = "12px", RI = "24px", PI = "20px", MI = "16px", kI = "12px", DI = "8px", NI = "4px", II = "20px", OI = "16px", _I = "12px", LI = "8px", TI = "4px", $I = "20px", AI = "18px", jI = "16px", FI = "15px", zI = "14px", HI = "13px", VI = "12px", WI = "768px", BI = "1024px", UI = "1280px", qI = "1536px", KI = "#2daeff", YI = "#59d01e", GI = "#ffbd37", XI = "#fe4b4b", ZI = "#409f11", QI = "#49b811", JI = "#0b9efb", eO = "#9e6de3", tO = "#49b811", nO = "#0b9efb", rO = "#ffbd37", aO = "#f273b9", oO = "#00d2b2", iO = "#ff8c51", uO = "#565656", lO = "#274fee", sO = "#fa7979", cO = "#8bbb11", dO = "#d8b300", f_ = {
  17964. red50: Yk,
  17965. red100: Gk,
  17966. red200: Xk,
  17967. red300: Zk,
  17968. red400: Qk,
  17969. red500: Jk,
  17970. red600: eD,
  17971. red700: tD,
  17972. red800: nD,
  17973. red900: rD,
  17974. orange50: aD,
  17975. orange100: oD,
  17976. orange200: iD,
  17977. orange300: uD,
  17978. orange400: lD,
  17979. orange500: sD,
  17980. orange600: cD,
  17981. orange700: dD,
  17982. orange800: fD,
  17983. orange900: vD,
  17984. gold50: mD,
  17985. gold100: pD,
  17986. gold200: hD,
  17987. gold300: gD,
  17988. gold400: yD,
  17989. gold500: bD,
  17990. gold600: CD,
  17991. gold700: SD,
  17992. gold800: wD,
  17993. gold900: xD,
  17994. yellow50: ED,
  17995. yellow100: RD,
  17996. yellow200: PD,
  17997. yellow300: MD,
  17998. yellow400: kD,
  17999. yellow500: DD,
  18000. yellow600: ND,
  18001. yellow700: ID,
  18002. yellow800: OD,
  18003. yellow900: _D,
  18004. verdancy50: LD,
  18005. verdancy100: TD,
  18006. verdancy200: $D,
  18007. verdancy300: AD,
  18008. verdancy400: jD,
  18009. verdancy500: FD,
  18010. verdancy600: zD,
  18011. verdancy700: HD,
  18012. verdancy800: VD,
  18013. verdancy900: WD,
  18014. green50: BD,
  18015. green100: UD,
  18016. green200: qD,
  18017. green300: KD,
  18018. green400: YD,
  18019. green500: GD,
  18020. green600: XD,
  18021. green700: ZD,
  18022. green800: QD,
  18023. green900: JD,
  18024. jiqing50: eN,
  18025. jiqing100: tN,
  18026. jiqing200: nN,
  18027. jiqing300: rN,
  18028. jiqing400: aN,
  18029. jiqing500: oN,
  18030. jiqing600: iN,
  18031. jiqing700: uN,
  18032. jiqing800: lN,
  18033. jiqing900: sN,
  18034. blue50: cN,
  18035. blue100: dN,
  18036. blue200: fN,
  18037. blue300: vN,
  18038. blue400: mN,
  18039. blue500: pN,
  18040. blue600: hN,
  18041. blue700: gN,
  18042. blue800: yN,
  18043. blue900: bN,
  18044. hyacinth50: CN,
  18045. hyacinth100: SN,
  18046. hyacinth200: wN,
  18047. hyacinth300: xN,
  18048. hyacinth400: EN,
  18049. hyacinth500: RN,
  18050. hyacinth600: PN,
  18051. hyacinth700: MN,
  18052. hyacinth800: kN,
  18053. hyacinth900: DN,
  18054. purple50: NN,
  18055. purple100: IN,
  18056. purple200: ON,
  18057. purple300: _N,
  18058. purple400: LN,
  18059. purple500: TN,
  18060. purple600: $N,
  18061. purple700: AN,
  18062. purple800: jN,
  18063. purple900: FN,
  18064. magenta50: zN,
  18065. magenta100: HN,
  18066. magenta200: VN,
  18067. magenta300: WN,
  18068. magenta400: BN,
  18069. magenta500: UN,
  18070. magenta600: qN,
  18071. magenta700: KN,
  18072. magenta800: YN,
  18073. magenta900: GN,
  18074. grey50: XN,
  18075. grey100: ZN,
  18076. grey200: QN,
  18077. grey300: JN,
  18078. grey400: eI,
  18079. grey500: tI,
  18080. grey600: nI,
  18081. grey700: rI,
  18082. grey800: aI,
  18083. grey900: oI,
  18084. colorBlack: iI,
  18085. colorWhite: uI,
  18086. boxShadowBase: lI,
  18087. boxShadowLg: sI,
  18088. bgColor: cI,
  18089. bgColorHover: dI,
  18090. bgColorSecondary: fI,
  18091. bgColorOverlay: vI,
  18092. textColor: mI,
  18093. textColorSecondary: pI,
  18094. textColorSecondaryDarker: hI,
  18095. textColorTertiary: gI,
  18096. borderColor: yI,
  18097. scrollbarColor: bI,
  18098. scrollbarColorHover: CI,
  18099. scrollbarColorActive: SI,
  18100. borderRadiusBase: wI,
  18101. borderRadiusLg: xI,
  18102. borderRadiusXl: EI,
  18103. marginXl: RI,
  18104. marginLg: PI,
  18105. marginBase: MI,
  18106. marginSm: kI,
  18107. marginXs: DI,
  18108. marginXxs: NI,
  18109. paddingXl: II,
  18110. paddingLg: OI,
  18111. paddingBase: _I,
  18112. paddingSm: LI,
  18113. paddingXs: TI,
  18114. fontSizeXxl: $I,
  18115. fontSizeXl: AI,
  18116. fontSizeLg: jI,
  18117. fontSizeBase: FI,
  18118. fontSizeSm: zI,
  18119. fontSizeXs: HI,
  18120. fontSizeXxs: VI,
  18121. breakpointXs: WI,
  18122. breakpointSm: BI,
  18123. breakpointBase: UI,
  18124. breakpointLg: qI,
  18125. infoColor: KI,
  18126. successColor: YI,
  18127. warningColor: GI,
  18128. errorColor: XI,
  18129. primaryColor: ZI,
  18130. primaryColorHover: QI,
  18131. linkColor: JI,
  18132. loopColor1: eO,
  18133. loopColor2: tO,
  18134. loopColor3: nO,
  18135. loopColor4: rO,
  18136. loopColor5: aO,
  18137. loopColor6: oO,
  18138. loopColor7: iO,
  18139. loopColor8: uO,
  18140. loopColor9: lO,
  18141. loopColor10: sO,
  18142. loopColor11: cO,
  18143. loopColor12: dO
  18144. }, fO = "univer-theme", vO = "univer-render-canvas", mO = {
  18145. theme: fO,
  18146. renderCanvas: vO
  18147. };
  18148. function pO(e) {
  18149. return `--${e.replace(/([A-Z])/g, (n) => `-${n.toLowerCase()}`).replace(/(\d+)/g, "-$1")}`;
  18150. }
  18151. function hO(e) {
  18152. if (e.startsWith("#")) {
  18153. const t = e.replace("#", ""), n = Number.parseInt(t.substring(0, 2), 16), r = Number.parseInt(t.substring(2, 4), 16), a = Number.parseInt(t.substring(4, 6), 16);
  18154. return `${n}, ${r}, ${a}`;
  18155. }
  18156. return e;
  18157. }
  18158. const gr = class gr {
  18159. constructor() {
  18160. qa(this, "_styleSheet", null);
  18161. qa(this, "_themeRootName", mO.theme);
  18162. if (!Kr()) return;
  18163. const t = document.createElement("style");
  18164. t.id = this._themeRootName;
  18165. let n = null;
  18166. const r = document.getRootNode();
  18167. r === document ? n = document.head : r instanceof ShadowRoot ? n = r : n = r.head, n && (n.appendChild(t), this._styleSheet = t);
  18168. }
  18169. static getInstance() {
  18170. return gr._instance || (gr._instance = new gr()), gr._instance;
  18171. }
  18172. setTheme(t, n) {
  18173. this._styleSheet && (t.classList.remove(this._themeRootName), t.classList.add(this._themeRootName), this._styleSheet.innerHTML = "", this._styleSheet.innerHTML = `.${this._themeRootName} {${Object.keys(n).map((r) => `${pO(r)}: ${hO(n[r])};`).join("")}}`);
  18174. }
  18175. };
  18176. qa(gr, "_instance", null);
  18177. let pu = gr;
  18178. const v_ = pu.getInstance();
  18179. var Pi = { exports: {} }, ha = {}, Pa = { exports: {} }, gO = Pa.exports, Qs;
  18180. function Ju() {
  18181. return Qs || (Qs = 1, function(e, t) {
  18182. (function(n, r) {
  18183. r(t);
  18184. })(gO, function(n) {
  18185. function r(V) {
  18186. return function(J, M, D, j, W, K, Y) {
  18187. return V(J, M, Y);
  18188. };
  18189. }
  18190. function a(V) {
  18191. return function(J, M, D, j) {
  18192. if (!J || !M || typeof J != "object" || typeof M != "object")
  18193. return V(J, M, D, j);
  18194. var W = j.get(J), K = j.get(M);
  18195. if (W && K)
  18196. return W === M && K === J;
  18197. j.set(J, M), j.set(M, J);
  18198. var Y = V(J, M, D, j);
  18199. return j.delete(J), j.delete(M), Y;
  18200. };
  18201. }
  18202. function o(V, X) {
  18203. var J = {};
  18204. for (var M in V)
  18205. J[M] = V[M];
  18206. for (var M in X)
  18207. J[M] = X[M];
  18208. return J;
  18209. }
  18210. function i(V) {
  18211. return V.constructor === Object || V.constructor == null;
  18212. }
  18213. function u(V) {
  18214. return typeof V.then == "function";
  18215. }
  18216. function l(V, X) {
  18217. return V === X || V !== V && X !== X;
  18218. }
  18219. var c = "[object Arguments]", s = "[object Boolean]", v = "[object Date]", C = "[object RegExp]", p = "[object Map]", m = "[object Number]", b = "[object Object]", f = "[object Set]", h = "[object String]", g = Object.prototype.toString;
  18220. function y(V) {
  18221. var X = V.areArraysEqual, J = V.areDatesEqual, M = V.areMapsEqual, D = V.areObjectsEqual, j = V.areRegExpsEqual, W = V.areSetsEqual, K = V.createIsNestedEqual, Y = K(te);
  18222. function te(Q, ae, ue) {
  18223. if (Q === ae)
  18224. return !0;
  18225. if (!Q || !ae || typeof Q != "object" || typeof ae != "object")
  18226. return Q !== Q && ae !== ae;
  18227. if (i(Q) && i(ae))
  18228. return D(Q, ae, Y, ue);
  18229. var se = Array.isArray(Q), pe = Array.isArray(ae);
  18230. if (se || pe)
  18231. return se === pe && X(Q, ae, Y, ue);
  18232. var oe = g.call(Q);
  18233. return oe !== g.call(ae) ? !1 : oe === v ? J(Q, ae, Y, ue) : oe === C ? j(Q, ae, Y, ue) : oe === p ? M(Q, ae, Y, ue) : oe === f ? W(Q, ae, Y, ue) : oe === b || oe === c ? u(Q) || u(ae) ? !1 : D(Q, ae, Y, ue) : oe === s || oe === m || oe === h ? l(Q.valueOf(), ae.valueOf()) : !1;
  18234. }
  18235. return te;
  18236. }
  18237. function w(V, X, J, M) {
  18238. var D = V.length;
  18239. if (X.length !== D)
  18240. return !1;
  18241. for (; D-- > 0; )
  18242. if (!J(V[D], X[D], D, D, V, X, M))
  18243. return !1;
  18244. return !0;
  18245. }
  18246. var E = a(w);
  18247. function S(V, X) {
  18248. return l(V.valueOf(), X.valueOf());
  18249. }
  18250. function x(V, X, J, M) {
  18251. var D = V.size === X.size;
  18252. if (!D)
  18253. return !1;
  18254. if (!V.size)
  18255. return !0;
  18256. var j = {}, W = 0;
  18257. return V.forEach(function(K, Y) {
  18258. if (D) {
  18259. var te = !1, Q = 0;
  18260. X.forEach(function(ae, ue) {
  18261. !te && !j[Q] && (te = J(Y, ue, W, Q, V, X, M) && J(K, ae, Y, ue, V, X, M)) && (j[Q] = !0), Q++;
  18262. }), W++, D = te;
  18263. }
  18264. }), D;
  18265. }
  18266. var R = a(x), k = "_owner", L = Object.prototype.hasOwnProperty;
  18267. function O(V, X, J, M) {
  18268. var D = Object.keys(V), j = D.length;
  18269. if (Object.keys(X).length !== j)
  18270. return !1;
  18271. for (var W; j-- > 0; ) {
  18272. if (W = D[j], W === k) {
  18273. var K = !!V.$$typeof, Y = !!X.$$typeof;
  18274. if ((K || Y) && K !== Y)
  18275. return !1;
  18276. }
  18277. if (!L.call(X, W) || !J(V[W], X[W], W, W, V, X, M))
  18278. return !1;
  18279. }
  18280. return !0;
  18281. }
  18282. var N = a(O);
  18283. function F(V, X) {
  18284. return V.source === X.source && V.flags === X.flags;
  18285. }
  18286. function I(V, X, J, M) {
  18287. var D = V.size === X.size;
  18288. if (!D)
  18289. return !1;
  18290. if (!V.size)
  18291. return !0;
  18292. var j = {};
  18293. return V.forEach(function(W, K) {
  18294. if (D) {
  18295. var Y = !1, te = 0;
  18296. X.forEach(function(Q, ae) {
  18297. !Y && !j[te] && (Y = J(W, Q, K, ae, V, X, M)) && (j[te] = !0), te++;
  18298. }), D = Y;
  18299. }
  18300. }), D;
  18301. }
  18302. var T = a(I), P = Object.freeze({
  18303. areArraysEqual: w,
  18304. areDatesEqual: S,
  18305. areMapsEqual: x,
  18306. areObjectsEqual: O,
  18307. areRegExpsEqual: F,
  18308. areSetsEqual: I,
  18309. createIsNestedEqual: r
  18310. }), z = Object.freeze({
  18311. areArraysEqual: E,
  18312. areDatesEqual: S,
  18313. areMapsEqual: R,
  18314. areObjectsEqual: N,
  18315. areRegExpsEqual: F,
  18316. areSetsEqual: T,
  18317. createIsNestedEqual: r
  18318. }), _ = y(P);
  18319. function A(V, X) {
  18320. return _(V, X, void 0);
  18321. }
  18322. var H = y(o(P, { createIsNestedEqual: function() {
  18323. return l;
  18324. } }));
  18325. function $(V, X) {
  18326. return H(V, X, void 0);
  18327. }
  18328. var U = y(z);
  18329. function G(V, X) {
  18330. return U(V, X, /* @__PURE__ */ new WeakMap());
  18331. }
  18332. var B = y(o(z, {
  18333. createIsNestedEqual: function() {
  18334. return l;
  18335. }
  18336. }));
  18337. function ne(V, X) {
  18338. return B(V, X, /* @__PURE__ */ new WeakMap());
  18339. }
  18340. function le(V) {
  18341. return y(o(P, V(P)));
  18342. }
  18343. function ee(V) {
  18344. var X = y(o(z, V(z)));
  18345. return function(J, M, D) {
  18346. return D === void 0 && (D = /* @__PURE__ */ new WeakMap()), X(J, M, D);
  18347. };
  18348. }
  18349. n.circularDeepEqual = G, n.circularShallowEqual = ne, n.createCustomCircularEqual = ee, n.createCustomEqual = le, n.deepEqual = A, n.sameValueZeroEqual = l, n.shallowEqual = $, Object.defineProperty(n, "__esModule", { value: !0 });
  18350. });
  18351. }(Pa, Pa.exports)), Pa.exports;
  18352. }
  18353. var co = { exports: {} }, Js;
  18354. function el() {
  18355. if (Js) return co.exports;
  18356. Js = 1;
  18357. function e(n) {
  18358. var r, a, o = "";
  18359. if (typeof n == "string" || typeof n == "number") o += n;
  18360. else if (typeof n == "object") if (Array.isArray(n)) {
  18361. var i = n.length;
  18362. for (r = 0; r < i; r++) n[r] && (a = e(n[r])) && (o && (o += " "), o += a);
  18363. } else for (a in n) n[a] && (o && (o += " "), o += a);
  18364. return o;
  18365. }
  18366. function t() {
  18367. for (var n, r, a = 0, o = "", i = arguments.length; a < i; a++) (n = arguments[a]) && (r = e(n)) && (o && (o += " "), o += r);
  18368. return o;
  18369. }
  18370. return co.exports = t, co.exports.clsx = t, co.exports;
  18371. }
  18372. var dt = {}, Mi, ec;
  18373. function yO() {
  18374. return ec || (ec = 1, Mi = function(t, n, r) {
  18375. return t === n ? !0 : t.className === n.className && r(t.style, n.style) && t.width === n.width && t.autoSize === n.autoSize && t.cols === n.cols && t.draggableCancel === n.draggableCancel && t.draggableHandle === n.draggableHandle && r(t.verticalCompact, n.verticalCompact) && r(t.compactType, n.compactType) && r(t.layout, n.layout) && r(t.margin, n.margin) && r(t.containerPadding, n.containerPadding) && t.rowHeight === n.rowHeight && t.maxRows === n.maxRows && t.isBounded === n.isBounded && t.isDraggable === n.isDraggable && t.isResizable === n.isResizable && t.allowOverlap === n.allowOverlap && t.preventCollision === n.preventCollision && t.useCSSTransforms === n.useCSSTransforms && t.transformScale === n.transformScale && t.isDroppable === n.isDroppable && r(t.resizeHandles, n.resizeHandles) && r(t.resizeHandle, n.resizeHandle) && t.onLayoutChange === n.onLayoutChange && t.onDragStart === n.onDragStart && t.onDrag === n.onDrag && t.onDragStop === n.onDragStop && t.onResizeStart === n.onResizeStart && t.onResize === n.onResize && t.onResizeStop === n.onResizeStop && t.onDrop === n.onDrop && r(t.droppingItem, n.droppingItem) && r(t.innerRef, n.innerRef);
  18376. }), Mi;
  18377. }
  18378. var tc;
  18379. function Jr() {
  18380. if (tc) return dt;
  18381. tc = 1, Object.defineProperty(dt, "__esModule", {
  18382. value: !0
  18383. }), dt.bottom = r, dt.childrenEqual = l, dt.cloneLayout = a, dt.cloneLayoutItem = u, dt.collides = s, dt.compact = v, dt.compactItem = m, dt.compactType = V, dt.correctBounds = b, dt.fastPositionEqual = c, dt.fastRGLPropsEqual = void 0, dt.getAllCollisions = g, dt.getFirstCollision = h, dt.getLayoutItem = f, dt.getStatics = y, dt.modifyLayout = o, dt.moveElement = w, dt.moveElementAwayFromCollision = E, dt.noop = void 0, dt.perc = S, dt.resizeItemInDirection = H, dt.setTopLeft = U, dt.setTransform = $, dt.sortLayoutItems = G, dt.sortLayoutItemsByColRow = ne, dt.sortLayoutItemsByRowCol = B, dt.synchronizeLayoutWithChildren = le, dt.validateLayout = ee, dt.withLayoutItem = i;
  18384. var e = /* @__PURE__ */ Ju(), t = n(me);
  18385. function n(M) {
  18386. return M && M.__esModule ? M : { default: M };
  18387. }
  18388. function r(M) {
  18389. let D = 0, j;
  18390. for (let W = 0, K = M.length; W < K; W++)
  18391. j = M[W].y + M[W].h, j > D && (D = j);
  18392. return D;
  18393. }
  18394. function a(M) {
  18395. const D = Array(M.length);
  18396. for (let j = 0, W = M.length; j < W; j++)
  18397. D[j] = u(M[j]);
  18398. return D;
  18399. }
  18400. function o(M, D) {
  18401. const j = Array(M.length);
  18402. for (let W = 0, K = M.length; W < K; W++)
  18403. D.i === M[W].i ? j[W] = D : j[W] = M[W];
  18404. return j;
  18405. }
  18406. function i(M, D, j) {
  18407. let W = f(M, D);
  18408. return W ? (W = j(u(W)), M = o(M, W), [M, W]) : [M, null];
  18409. }
  18410. function u(M) {
  18411. return {
  18412. w: M.w,
  18413. h: M.h,
  18414. x: M.x,
  18415. y: M.y,
  18416. i: M.i,
  18417. minW: M.minW,
  18418. maxW: M.maxW,
  18419. minH: M.minH,
  18420. maxH: M.maxH,
  18421. moved: !!M.moved,
  18422. static: !!M.static,
  18423. // These can be null/undefined
  18424. isDraggable: M.isDraggable,
  18425. isResizable: M.isResizable,
  18426. resizeHandles: M.resizeHandles,
  18427. isBounded: M.isBounded
  18428. };
  18429. }
  18430. function l(M, D) {
  18431. return (0, e.deepEqual)(t.default.Children.map(M, (j) => j == null ? void 0 : j.key), t.default.Children.map(D, (j) => j == null ? void 0 : j.key)) && (0, e.deepEqual)(t.default.Children.map(M, (j) => j == null ? void 0 : j.props["data-grid"]), t.default.Children.map(D, (j) => j == null ? void 0 : j.props["data-grid"]));
  18432. }
  18433. dt.fastRGLPropsEqual = yO();
  18434. function c(M, D) {
  18435. return M.left === D.left && M.top === D.top && M.width === D.width && M.height === D.height;
  18436. }
  18437. function s(M, D) {
  18438. return !(M.i === D.i || M.x + M.w <= D.x || M.x >= D.x + D.w || M.y + M.h <= D.y || M.y >= D.y + D.h);
  18439. }
  18440. function v(M, D, j, W) {
  18441. const K = y(M), Y = G(M, D), te = Array(M.length);
  18442. for (let Q = 0, ae = Y.length; Q < ae; Q++) {
  18443. let ue = u(Y[Q]);
  18444. ue.static || (ue = m(K, ue, D, j, Y, W), K.push(ue)), te[M.indexOf(Y[Q])] = ue, ue.moved = !1;
  18445. }
  18446. return te;
  18447. }
  18448. const C = {
  18449. x: "w",
  18450. y: "h"
  18451. };
  18452. function p(M, D, j, W) {
  18453. const K = C[W];
  18454. D[W] += 1;
  18455. const Y = M.map((te) => te.i).indexOf(D.i);
  18456. for (let te = Y + 1; te < M.length; te++) {
  18457. const Q = M[te];
  18458. if (!Q.static) {
  18459. if (Q.y > D.y + D.h) break;
  18460. s(D, Q) && p(M, Q, j + D[K], W);
  18461. }
  18462. }
  18463. D[W] = j;
  18464. }
  18465. function m(M, D, j, W, K, Y) {
  18466. const te = j === "vertical", Q = j === "horizontal";
  18467. if (te)
  18468. for (D.y = Math.min(r(M), D.y); D.y > 0 && !h(M, D); )
  18469. D.y--;
  18470. else if (Q)
  18471. for (; D.x > 0 && !h(M, D); )
  18472. D.x--;
  18473. let ae;
  18474. for (; (ae = h(M, D)) && !(j === null && Y); )
  18475. if (Q ? p(K, D, ae.x + ae.w, "x") : p(K, D, ae.y + ae.h, "y"), Q && D.x + D.w > W)
  18476. for (D.x = W - D.w, D.y++; D.x > 0 && !h(M, D); )
  18477. D.x--;
  18478. return D.y = Math.max(D.y, 0), D.x = Math.max(D.x, 0), D;
  18479. }
  18480. function b(M, D) {
  18481. const j = y(M);
  18482. for (let W = 0, K = M.length; W < K; W++) {
  18483. const Y = M[W];
  18484. if (Y.x + Y.w > D.cols && (Y.x = D.cols - Y.w), Y.x < 0 && (Y.x = 0, Y.w = D.cols), !Y.static) j.push(Y);
  18485. else
  18486. for (; h(j, Y); )
  18487. Y.y++;
  18488. }
  18489. return M;
  18490. }
  18491. function f(M, D) {
  18492. for (let j = 0, W = M.length; j < W; j++)
  18493. if (M[j].i === D) return M[j];
  18494. }
  18495. function h(M, D) {
  18496. for (let j = 0, W = M.length; j < W; j++)
  18497. if (s(M[j], D)) return M[j];
  18498. }
  18499. function g(M, D) {
  18500. return M.filter((j) => s(j, D));
  18501. }
  18502. function y(M) {
  18503. return M.filter((D) => D.static);
  18504. }
  18505. function w(M, D, j, W, K, Y, te, Q, ae) {
  18506. if (D.static && D.isDraggable !== !0 || D.y === W && D.x === j) return M;
  18507. `${D.i}${String(j)}${String(W)}${D.x}${D.y}`;
  18508. const ue = D.x, se = D.y;
  18509. typeof j == "number" && (D.x = j), typeof W == "number" && (D.y = W), D.moved = !0;
  18510. let pe = G(M, te);
  18511. (te === "vertical" && typeof W == "number" ? se >= W : te === "horizontal" && typeof j == "number" ? ue >= j : !1) && (pe = pe.reverse());
  18512. const ve = g(pe, D), ze = ve.length > 0;
  18513. if (ze && ae)
  18514. return a(M);
  18515. if (ze && Y)
  18516. return `${D.i}`, D.x = ue, D.y = se, D.moved = !1, M;
  18517. for (let Re = 0, Be = ve.length; Re < Be; Re++) {
  18518. const je = ve[Re];
  18519. `${D.i}${D.x}${D.y}${je.i}${je.x}${je.y}`, !je.moved && (je.static ? M = E(M, je, D, K, te) : M = E(M, D, je, K, te));
  18520. }
  18521. return M;
  18522. }
  18523. function E(M, D, j, W, K, Y) {
  18524. const te = K === "horizontal", Q = K === "vertical", ae = D.static;
  18525. if (W) {
  18526. W = !1;
  18527. const pe = {
  18528. x: te ? Math.max(D.x - j.w, 0) : j.x,
  18529. y: Q ? Math.max(D.y - j.h, 0) : j.y,
  18530. w: j.w,
  18531. h: j.h,
  18532. i: "-1"
  18533. }, oe = h(M, pe), ve = oe && oe.y + oe.h > D.y, ze = oe && D.x + D.w > oe.x;
  18534. if (oe) {
  18535. if (ve && Q)
  18536. return w(M, j, void 0, D.y + 1, W, ae, K);
  18537. if (ve && K == null)
  18538. return D.y = j.y, j.y = j.y + j.h, M;
  18539. if (ze && te)
  18540. return w(M, D, j.x, void 0, W, ae, K);
  18541. } else return `${j.i}${pe.x}${pe.y}`, w(M, j, te ? pe.x : void 0, Q ? pe.y : void 0, W, ae, K);
  18542. }
  18543. const ue = te ? j.x + 1 : void 0, se = Q ? j.y + 1 : void 0;
  18544. return ue == null && se == null ? M : w(M, j, te ? j.x + 1 : void 0, Q ? j.y + 1 : void 0, W, ae, K);
  18545. }
  18546. function S(M) {
  18547. return M * 100 + "%";
  18548. }
  18549. const x = (M, D, j, W) => M + j > W ? D : j, R = (M, D, j) => M < 0 ? D : j, k = (M) => Math.max(0, M), L = (M) => Math.max(0, M), O = (M, D, j) => {
  18550. let {
  18551. left: W,
  18552. height: K,
  18553. width: Y
  18554. } = D;
  18555. const te = M.top - (K - M.height);
  18556. return {
  18557. left: W,
  18558. width: Y,
  18559. height: R(te, M.height, K),
  18560. top: L(te)
  18561. };
  18562. }, N = (M, D, j) => {
  18563. let {
  18564. top: W,
  18565. left: K,
  18566. height: Y,
  18567. width: te
  18568. } = D;
  18569. return {
  18570. top: W,
  18571. height: Y,
  18572. width: x(M.left, M.width, te, j),
  18573. left: k(K)
  18574. };
  18575. }, F = (M, D, j) => {
  18576. let {
  18577. top: W,
  18578. height: K,
  18579. width: Y
  18580. } = D;
  18581. const te = M.left - (Y - M.width);
  18582. return {
  18583. height: K,
  18584. width: te < 0 ? M.width : x(M.left, M.width, Y, j),
  18585. top: L(W),
  18586. left: k(te)
  18587. };
  18588. }, I = (M, D, j) => {
  18589. let {
  18590. top: W,
  18591. left: K,
  18592. height: Y,
  18593. width: te
  18594. } = D;
  18595. return {
  18596. width: te,
  18597. left: K,
  18598. height: R(W, M.height, Y),
  18599. top: L(W)
  18600. };
  18601. }, A = {
  18602. n: O,
  18603. ne: function() {
  18604. return O(arguments.length <= 0 ? void 0 : arguments[0], N(...arguments));
  18605. },
  18606. e: N,
  18607. se: function() {
  18608. return I(arguments.length <= 0 ? void 0 : arguments[0], N(...arguments));
  18609. },
  18610. s: I,
  18611. sw: function() {
  18612. return I(arguments.length <= 0 ? void 0 : arguments[0], F(...arguments));
  18613. },
  18614. w: F,
  18615. nw: function() {
  18616. return O(arguments.length <= 0 ? void 0 : arguments[0], F(...arguments));
  18617. }
  18618. };
  18619. function H(M, D, j, W) {
  18620. const K = A[M];
  18621. return K ? K(D, {
  18622. ...D,
  18623. ...j
  18624. }, W) : j;
  18625. }
  18626. function $(M) {
  18627. let {
  18628. top: D,
  18629. left: j,
  18630. width: W,
  18631. height: K
  18632. } = M;
  18633. const Y = `translate(${j}px,${D}px)`;
  18634. return {
  18635. transform: Y,
  18636. WebkitTransform: Y,
  18637. MozTransform: Y,
  18638. msTransform: Y,
  18639. OTransform: Y,
  18640. width: `${W}px`,
  18641. height: `${K}px`,
  18642. position: "absolute"
  18643. };
  18644. }
  18645. function U(M) {
  18646. let {
  18647. top: D,
  18648. left: j,
  18649. width: W,
  18650. height: K
  18651. } = M;
  18652. return {
  18653. top: `${D}px`,
  18654. left: `${j}px`,
  18655. width: `${W}px`,
  18656. height: `${K}px`,
  18657. position: "absolute"
  18658. };
  18659. }
  18660. function G(M, D) {
  18661. return D === "horizontal" ? ne(M) : D === "vertical" ? B(M) : M;
  18662. }
  18663. function B(M) {
  18664. return M.slice(0).sort(function(D, j) {
  18665. return D.y > j.y || D.y === j.y && D.x > j.x ? 1 : D.y === j.y && D.x === j.x ? 0 : -1;
  18666. });
  18667. }
  18668. function ne(M) {
  18669. return M.slice(0).sort(function(D, j) {
  18670. return D.x > j.x || D.x === j.x && D.y > j.y ? 1 : -1;
  18671. });
  18672. }
  18673. function le(M, D, j, W, K) {
  18674. M = M || [];
  18675. const Y = [];
  18676. t.default.Children.forEach(D, (Q) => {
  18677. if ((Q == null ? void 0 : Q.key) == null) return;
  18678. const ae = f(M, String(Q.key)), ue = Q.props["data-grid"];
  18679. ae && ue == null ? Y.push(u(ae)) : ue ? Y.push(u({
  18680. ...ue,
  18681. i: Q.key
  18682. })) : Y.push(u({
  18683. w: 1,
  18684. h: 1,
  18685. x: 0,
  18686. y: r(Y),
  18687. i: String(Q.key)
  18688. }));
  18689. });
  18690. const te = b(Y, {
  18691. cols: j
  18692. });
  18693. return K ? te : v(te, W, j);
  18694. }
  18695. function ee(M) {
  18696. let D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Layout";
  18697. const j = ["x", "y", "w", "h"];
  18698. if (!Array.isArray(M)) throw new Error(D + " must be an array!");
  18699. for (let W = 0, K = M.length; W < K; W++) {
  18700. const Y = M[W];
  18701. for (let te = 0; te < j.length; te++) {
  18702. const Q = j[te], ae = Y[Q];
  18703. if (typeof ae != "number" || Number.isNaN(ae))
  18704. throw new Error(`ReactGridLayout: ${D}[${W}].${Q} must be a number! Received: ${ae} (${typeof ae})`);
  18705. }
  18706. if (typeof Y.i < "u" && typeof Y.i != "string")
  18707. throw new Error(`ReactGridLayout: ${D}[${W}].i must be a string! Received: ${Y.i} (${typeof Y.i})`);
  18708. }
  18709. }
  18710. function V(M) {
  18711. const {
  18712. verticalCompact: D,
  18713. compactType: j
  18714. } = M || {};
  18715. return D === !1 ? null : j;
  18716. }
  18717. function X() {
  18718. }
  18719. const J = () => {
  18720. };
  18721. return dt.noop = J, dt;
  18722. }
  18723. var Fn = {}, nc;
  18724. function tl() {
  18725. if (nc) return Fn;
  18726. nc = 1, Object.defineProperty(Fn, "__esModule", {
  18727. value: !0
  18728. }), Fn.calcGridColWidth = e, Fn.calcGridItemPosition = n, Fn.calcGridItemWHPx = t, Fn.calcWH = a, Fn.calcXY = r, Fn.clamp = o;
  18729. function e(i) {
  18730. const {
  18731. margin: u,
  18732. containerPadding: l,
  18733. containerWidth: c,
  18734. cols: s
  18735. } = i;
  18736. return (c - u[0] * (s - 1) - l[0] * 2) / s;
  18737. }
  18738. function t(i, u, l) {
  18739. return Number.isFinite(i) ? Math.round(u * i + Math.max(0, i - 1) * l) : i;
  18740. }
  18741. function n(i, u, l, c, s, v) {
  18742. const {
  18743. margin: C,
  18744. containerPadding: p,
  18745. rowHeight: m
  18746. } = i, b = e(i), f = {};
  18747. return v && v.resizing ? (f.width = Math.round(v.resizing.width), f.height = Math.round(v.resizing.height)) : (f.width = t(c, b, C[0]), f.height = t(s, m, C[1])), v && v.dragging ? (f.top = Math.round(v.dragging.top), f.left = Math.round(v.dragging.left)) : v && v.resizing && typeof v.resizing.top == "number" && typeof v.resizing.left == "number" ? (f.top = Math.round(v.resizing.top), f.left = Math.round(v.resizing.left)) : (f.top = Math.round((m + C[1]) * l + p[1]), f.left = Math.round((b + C[0]) * u + p[0])), f;
  18748. }
  18749. function r(i, u, l, c, s) {
  18750. const {
  18751. margin: v,
  18752. containerPadding: C,
  18753. cols: p,
  18754. rowHeight: m,
  18755. maxRows: b
  18756. } = i, f = e(i);
  18757. let h = Math.round((l - C[0]) / (f + v[0])), g = Math.round((u - C[1]) / (m + v[1]));
  18758. return h = o(h, 0, p - c), g = o(g, 0, b - s), {
  18759. x: h,
  18760. y: g
  18761. };
  18762. }
  18763. function a(i, u, l, c, s, v) {
  18764. const {
  18765. margin: C,
  18766. maxRows: p,
  18767. cols: m,
  18768. rowHeight: b
  18769. } = i, f = e(i);
  18770. let h = Math.round((u + C[0]) / (f + C[0])), g = Math.round((l + C[1]) / (b + C[1])), y = o(h, 0, m - c), w = o(g, 0, p - s);
  18771. return ["sw", "w", "nw"].indexOf(v) !== -1 && (y = o(h, 0, m)), ["nw", "n", "ne"].indexOf(v) !== -1 && (w = o(g, 0, p)), {
  18772. w: y,
  18773. h: w
  18774. };
  18775. }
  18776. function o(i, u, l) {
  18777. return Math.max(Math.min(i, l), u);
  18778. }
  18779. return Fn;
  18780. }
  18781. var ga = {}, ya = { exports: {} }, ba = {}, fo = {}, rc;
  18782. function bO() {
  18783. if (rc) return fo;
  18784. rc = 1, fo.__esModule = !0, fo.cloneElement = u;
  18785. var e = t(me);
  18786. function t(l) {
  18787. return l && l.__esModule ? l : { default: l };
  18788. }
  18789. function n(l, c) {
  18790. var s = Object.keys(l);
  18791. if (Object.getOwnPropertySymbols) {
  18792. var v = Object.getOwnPropertySymbols(l);
  18793. c && (v = v.filter(function(C) {
  18794. return Object.getOwnPropertyDescriptor(l, C).enumerable;
  18795. })), s.push.apply(s, v);
  18796. }
  18797. return s;
  18798. }
  18799. function r(l) {
  18800. for (var c = 1; c < arguments.length; c++) {
  18801. var s = arguments[c] != null ? arguments[c] : {};
  18802. c % 2 ? n(Object(s), !0).forEach(function(v) {
  18803. a(l, v, s[v]);
  18804. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(l, Object.getOwnPropertyDescriptors(s)) : n(Object(s)).forEach(function(v) {
  18805. Object.defineProperty(l, v, Object.getOwnPropertyDescriptor(s, v));
  18806. });
  18807. }
  18808. return l;
  18809. }
  18810. function a(l, c, s) {
  18811. return c = o(c), c in l ? Object.defineProperty(l, c, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : l[c] = s, l;
  18812. }
  18813. function o(l) {
  18814. var c = i(l, "string");
  18815. return typeof c == "symbol" ? c : String(c);
  18816. }
  18817. function i(l, c) {
  18818. if (typeof l != "object" || l === null) return l;
  18819. var s = l[Symbol.toPrimitive];
  18820. if (s !== void 0) {
  18821. var v = s.call(l, c || "default");
  18822. if (typeof v != "object") return v;
  18823. throw new TypeError("@@toPrimitive must return a primitive value.");
  18824. }
  18825. return (c === "string" ? String : Number)(l);
  18826. }
  18827. function u(l, c) {
  18828. return c.style && l.props.style && (c.style = r(r({}, l.props.style), c.style)), c.className && l.props.className && (c.className = l.props.className + " " + c.className), /* @__PURE__ */ e.default.cloneElement(l, c);
  18829. }
  18830. return fo;
  18831. }
  18832. var Ca = {}, ac;
  18833. function Qf() {
  18834. if (ac) return Ca;
  18835. ac = 1, Ca.__esModule = !0, Ca.resizableProps = void 0;
  18836. var e = t(/* @__PURE__ */ sr());
  18837. Vo();
  18838. function t(r) {
  18839. return r && r.__esModule ? r : { default: r };
  18840. }
  18841. var n = {
  18842. /*
  18843. * Restricts resizing to a particular axis (default: 'both')
  18844. * 'both' - allows resizing by width or height
  18845. * 'x' - only allows the width to be changed
  18846. * 'y' - only allows the height to be changed
  18847. * 'none' - disables resizing altogether
  18848. * */
  18849. axis: e.default.oneOf(["both", "x", "y", "none"]),
  18850. className: e.default.string,
  18851. /*
  18852. * Require that one and only one child be present.
  18853. * */
  18854. children: e.default.element.isRequired,
  18855. /*
  18856. * These will be passed wholesale to react-draggable's DraggableCore
  18857. * */
  18858. draggableOpts: e.default.shape({
  18859. allowAnyClick: e.default.bool,
  18860. cancel: e.default.string,
  18861. children: e.default.node,
  18862. disabled: e.default.bool,
  18863. enableUserSelectHack: e.default.bool,
  18864. offsetParent: e.default.node,
  18865. grid: e.default.arrayOf(e.default.number),
  18866. handle: e.default.string,
  18867. nodeRef: e.default.object,
  18868. onStart: e.default.func,
  18869. onDrag: e.default.func,
  18870. onStop: e.default.func,
  18871. onMouseDown: e.default.func,
  18872. scale: e.default.number
  18873. }),
  18874. /*
  18875. * Initial height
  18876. * */
  18877. height: function() {
  18878. for (var a = arguments.length, o = new Array(a), i = 0; i < a; i++)
  18879. o[i] = arguments[i];
  18880. var u = o[0];
  18881. if (u.axis === "both" || u.axis === "y") {
  18882. var l;
  18883. return (l = e.default.number).isRequired.apply(l, o);
  18884. }
  18885. return e.default.number.apply(e.default, o);
  18886. },
  18887. /*
  18888. * Customize cursor resize handle
  18889. * */
  18890. handle: e.default.oneOfType([e.default.node, e.default.func]),
  18891. /*
  18892. * If you change this, be sure to update your css
  18893. * */
  18894. handleSize: e.default.arrayOf(e.default.number),
  18895. lockAspectRatio: e.default.bool,
  18896. /*
  18897. * Max X & Y measure
  18898. * */
  18899. maxConstraints: e.default.arrayOf(e.default.number),
  18900. /*
  18901. * Min X & Y measure
  18902. * */
  18903. minConstraints: e.default.arrayOf(e.default.number),
  18904. /*
  18905. * Called on stop resize event
  18906. * */
  18907. onResizeStop: e.default.func,
  18908. /*
  18909. * Called on start resize event
  18910. * */
  18911. onResizeStart: e.default.func,
  18912. /*
  18913. * Called on resize event
  18914. * */
  18915. onResize: e.default.func,
  18916. /*
  18917. * Defines which resize handles should be rendered (default: 'se')
  18918. * 's' - South handle (bottom-center)
  18919. * 'w' - West handle (left-center)
  18920. * 'e' - East handle (right-center)
  18921. * 'n' - North handle (top-center)
  18922. * 'sw' - Southwest handle (bottom-left)
  18923. * 'nw' - Northwest handle (top-left)
  18924. * 'se' - Southeast handle (bottom-right)
  18925. * 'ne' - Northeast handle (top-center)
  18926. * */
  18927. resizeHandles: e.default.arrayOf(e.default.oneOf(["s", "w", "e", "n", "sw", "nw", "se", "ne"])),
  18928. /*
  18929. * If `transform: scale(n)` is set on the parent, this should be set to `n`.
  18930. * */
  18931. transformScale: e.default.number,
  18932. /*
  18933. * Initial width
  18934. */
  18935. width: function() {
  18936. for (var a = arguments.length, o = new Array(a), i = 0; i < a; i++)
  18937. o[i] = arguments[i];
  18938. var u = o[0];
  18939. if (u.axis === "both" || u.axis === "x") {
  18940. var l;
  18941. return (l = e.default.number).isRequired.apply(l, o);
  18942. }
  18943. return e.default.number.apply(e.default, o);
  18944. }
  18945. };
  18946. return Ca.resizableProps = n, Ca;
  18947. }
  18948. var oc;
  18949. function Jf() {
  18950. if (oc) return ba;
  18951. oc = 1, ba.__esModule = !0, ba.default = void 0;
  18952. var e = i(me), t = Vo(), n = bO(), r = Qf(), a = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
  18953. function o(h) {
  18954. if (typeof WeakMap != "function") return null;
  18955. var g = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
  18956. return (o = function(E) {
  18957. return E ? y : g;
  18958. })(h);
  18959. }
  18960. function i(h, g) {
  18961. if (h && h.__esModule)
  18962. return h;
  18963. if (h === null || typeof h != "object" && typeof h != "function")
  18964. return { default: h };
  18965. var y = o(g);
  18966. if (y && y.has(h))
  18967. return y.get(h);
  18968. var w = {}, E = Object.defineProperty && Object.getOwnPropertyDescriptor;
  18969. for (var S in h)
  18970. if (S !== "default" && Object.prototype.hasOwnProperty.call(h, S)) {
  18971. var x = E ? Object.getOwnPropertyDescriptor(h, S) : null;
  18972. x && (x.get || x.set) ? Object.defineProperty(w, S, x) : w[S] = h[S];
  18973. }
  18974. return w.default = h, y && y.set(h, w), w;
  18975. }
  18976. function u() {
  18977. return u = Object.assign ? Object.assign.bind() : function(h) {
  18978. for (var g = 1; g < arguments.length; g++) {
  18979. var y = arguments[g];
  18980. for (var w in y)
  18981. Object.prototype.hasOwnProperty.call(y, w) && (h[w] = y[w]);
  18982. }
  18983. return h;
  18984. }, u.apply(this, arguments);
  18985. }
  18986. function l(h, g) {
  18987. if (h == null) return {};
  18988. var y = {}, w = Object.keys(h), E, S;
  18989. for (S = 0; S < w.length; S++)
  18990. E = w[S], !(g.indexOf(E) >= 0) && (y[E] = h[E]);
  18991. return y;
  18992. }
  18993. function c(h, g) {
  18994. var y = Object.keys(h);
  18995. if (Object.getOwnPropertySymbols) {
  18996. var w = Object.getOwnPropertySymbols(h);
  18997. g && (w = w.filter(function(E) {
  18998. return Object.getOwnPropertyDescriptor(h, E).enumerable;
  18999. })), y.push.apply(y, w);
  19000. }
  19001. return y;
  19002. }
  19003. function s(h) {
  19004. for (var g = 1; g < arguments.length; g++) {
  19005. var y = arguments[g] != null ? arguments[g] : {};
  19006. g % 2 ? c(Object(y), !0).forEach(function(w) {
  19007. v(h, w, y[w]);
  19008. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(y)) : c(Object(y)).forEach(function(w) {
  19009. Object.defineProperty(h, w, Object.getOwnPropertyDescriptor(y, w));
  19010. });
  19011. }
  19012. return h;
  19013. }
  19014. function v(h, g, y) {
  19015. return g = C(g), g in h ? Object.defineProperty(h, g, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : h[g] = y, h;
  19016. }
  19017. function C(h) {
  19018. var g = p(h, "string");
  19019. return typeof g == "symbol" ? g : String(g);
  19020. }
  19021. function p(h, g) {
  19022. if (typeof h != "object" || h === null) return h;
  19023. var y = h[Symbol.toPrimitive];
  19024. if (y !== void 0) {
  19025. var w = y.call(h, g || "default");
  19026. if (typeof w != "object") return w;
  19027. throw new TypeError("@@toPrimitive must return a primitive value.");
  19028. }
  19029. return (g === "string" ? String : Number)(h);
  19030. }
  19031. function m(h, g) {
  19032. h.prototype = Object.create(g.prototype), h.prototype.constructor = h, b(h, g);
  19033. }
  19034. function b(h, g) {
  19035. return b = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(w, E) {
  19036. return w.__proto__ = E, w;
  19037. }, b(h, g);
  19038. }
  19039. var f = /* @__PURE__ */ function(h) {
  19040. m(g, h);
  19041. function g() {
  19042. for (var w, E = arguments.length, S = new Array(E), x = 0; x < E; x++)
  19043. S[x] = arguments[x];
  19044. return w = h.call.apply(h, [this].concat(S)) || this, w.handleRefs = {}, w.lastHandleRect = null, w.slack = null, w;
  19045. }
  19046. var y = g.prototype;
  19047. return y.componentWillUnmount = function() {
  19048. this.resetData();
  19049. }, y.resetData = function() {
  19050. this.lastHandleRect = this.slack = null;
  19051. }, y.runConstraints = function(E, S) {
  19052. var x = this.props, R = x.minConstraints, k = x.maxConstraints, L = x.lockAspectRatio;
  19053. if (!R && !k && !L) return [E, S];
  19054. if (L) {
  19055. var O = this.props.width / this.props.height, N = E - this.props.width, F = S - this.props.height;
  19056. Math.abs(N) > Math.abs(F * O) ? S = E / O : E = S * O;
  19057. }
  19058. var I = E, T = S, P = this.slack || [0, 0], z = P[0], _ = P[1];
  19059. return E += z, S += _, R && (E = Math.max(R[0], E), S = Math.max(R[1], S)), k && (E = Math.min(k[0], E), S = Math.min(k[1], S)), this.slack = [z + (I - E), _ + (T - S)], [E, S];
  19060. }, y.resizeHandler = function(E, S) {
  19061. var x = this;
  19062. return function(R, k) {
  19063. var L = k.node, O = k.deltaX, N = k.deltaY;
  19064. E === "onResizeStart" && x.resetData();
  19065. var F = (x.props.axis === "both" || x.props.axis === "x") && S !== "n" && S !== "s", I = (x.props.axis === "both" || x.props.axis === "y") && S !== "e" && S !== "w";
  19066. if (!(!F && !I)) {
  19067. var T = S[0], P = S[S.length - 1], z = L.getBoundingClientRect();
  19068. if (x.lastHandleRect != null) {
  19069. if (P === "w") {
  19070. var _ = z.left - x.lastHandleRect.left;
  19071. O += _;
  19072. }
  19073. if (T === "n") {
  19074. var A = z.top - x.lastHandleRect.top;
  19075. N += A;
  19076. }
  19077. }
  19078. x.lastHandleRect = z, P === "w" && (O = -O), T === "n" && (N = -N);
  19079. var H = x.props.width + (F ? O / x.props.transformScale : 0), $ = x.props.height + (I ? N / x.props.transformScale : 0), U = x.runConstraints(H, $);
  19080. H = U[0], $ = U[1];
  19081. var G = H !== x.props.width || $ !== x.props.height, B = typeof x.props[E] == "function" ? x.props[E] : null, ne = E === "onResize" && !G;
  19082. B && !ne && (R.persist == null || R.persist(), B(R, {
  19083. node: L,
  19084. size: {
  19085. width: H,
  19086. height: $
  19087. },
  19088. handle: S
  19089. })), E === "onResizeStop" && x.resetData();
  19090. }
  19091. };
  19092. }, y.renderResizeHandle = function(E, S) {
  19093. var x = this.props.handle;
  19094. if (!x)
  19095. return /* @__PURE__ */ e.createElement("span", {
  19096. className: "react-resizable-handle react-resizable-handle-" + E,
  19097. ref: S
  19098. });
  19099. if (typeof x == "function")
  19100. return x(E, S);
  19101. var R = typeof x.type == "string", k = s({
  19102. ref: S
  19103. }, R ? {} : {
  19104. handleAxis: E
  19105. });
  19106. return /* @__PURE__ */ e.cloneElement(x, k);
  19107. }, y.render = function() {
  19108. var E = this, S = this.props, x = S.children, R = S.className, k = S.draggableOpts;
  19109. S.width, S.height, S.handle, S.handleSize, S.lockAspectRatio, S.axis, S.minConstraints, S.maxConstraints, S.onResize, S.onResizeStop, S.onResizeStart;
  19110. var L = S.resizeHandles;
  19111. S.transformScale;
  19112. var O = l(S, a);
  19113. return (0, n.cloneElement)(x, s(s({}, O), {}, {
  19114. className: (R ? R + " " : "") + "react-resizable",
  19115. children: [].concat(x.props.children, L.map(function(N) {
  19116. var F, I = (F = E.handleRefs[N]) != null ? F : E.handleRefs[N] = /* @__PURE__ */ e.createRef();
  19117. return /* @__PURE__ */ e.createElement(t.DraggableCore, u({}, k, {
  19118. nodeRef: I,
  19119. key: "resizableHandle-" + N,
  19120. onStop: E.resizeHandler("onResizeStop", N),
  19121. onStart: E.resizeHandler("onResizeStart", N),
  19122. onDrag: E.resizeHandler("onResize", N)
  19123. }), E.renderResizeHandle(N, I));
  19124. }))
  19125. }));
  19126. }, g;
  19127. }(e.Component);
  19128. return ba.default = f, f.propTypes = r.resizableProps, f.defaultProps = {
  19129. axis: "both",
  19130. handleSize: [20, 20],
  19131. lockAspectRatio: !1,
  19132. minConstraints: [20, 20],
  19133. maxConstraints: [1 / 0, 1 / 0],
  19134. resizeHandles: ["se"],
  19135. transformScale: 1
  19136. }, ba;
  19137. }
  19138. var Sa = {}, ic;
  19139. function CO() {
  19140. if (ic) return Sa;
  19141. ic = 1, Sa.__esModule = !0, Sa.default = void 0;
  19142. var e = u(me), t = o(/* @__PURE__ */ sr()), n = o(Jf()), r = Qf(), a = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
  19143. function o(g) {
  19144. return g && g.__esModule ? g : { default: g };
  19145. }
  19146. function i(g) {
  19147. if (typeof WeakMap != "function") return null;
  19148. var y = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
  19149. return (i = function(S) {
  19150. return S ? w : y;
  19151. })(g);
  19152. }
  19153. function u(g, y) {
  19154. if (g && g.__esModule)
  19155. return g;
  19156. if (g === null || typeof g != "object" && typeof g != "function")
  19157. return { default: g };
  19158. var w = i(y);
  19159. if (w && w.has(g))
  19160. return w.get(g);
  19161. var E = {}, S = Object.defineProperty && Object.getOwnPropertyDescriptor;
  19162. for (var x in g)
  19163. if (x !== "default" && Object.prototype.hasOwnProperty.call(g, x)) {
  19164. var R = S ? Object.getOwnPropertyDescriptor(g, x) : null;
  19165. R && (R.get || R.set) ? Object.defineProperty(E, x, R) : E[x] = g[x];
  19166. }
  19167. return E.default = g, w && w.set(g, E), E;
  19168. }
  19169. function l() {
  19170. return l = Object.assign ? Object.assign.bind() : function(g) {
  19171. for (var y = 1; y < arguments.length; y++) {
  19172. var w = arguments[y];
  19173. for (var E in w)
  19174. Object.prototype.hasOwnProperty.call(w, E) && (g[E] = w[E]);
  19175. }
  19176. return g;
  19177. }, l.apply(this, arguments);
  19178. }
  19179. function c(g, y) {
  19180. var w = Object.keys(g);
  19181. if (Object.getOwnPropertySymbols) {
  19182. var E = Object.getOwnPropertySymbols(g);
  19183. y && (E = E.filter(function(S) {
  19184. return Object.getOwnPropertyDescriptor(g, S).enumerable;
  19185. })), w.push.apply(w, E);
  19186. }
  19187. return w;
  19188. }
  19189. function s(g) {
  19190. for (var y = 1; y < arguments.length; y++) {
  19191. var w = arguments[y] != null ? arguments[y] : {};
  19192. y % 2 ? c(Object(w), !0).forEach(function(E) {
  19193. v(g, E, w[E]);
  19194. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(w)) : c(Object(w)).forEach(function(E) {
  19195. Object.defineProperty(g, E, Object.getOwnPropertyDescriptor(w, E));
  19196. });
  19197. }
  19198. return g;
  19199. }
  19200. function v(g, y, w) {
  19201. return y = C(y), y in g ? Object.defineProperty(g, y, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[y] = w, g;
  19202. }
  19203. function C(g) {
  19204. var y = p(g, "string");
  19205. return typeof y == "symbol" ? y : String(y);
  19206. }
  19207. function p(g, y) {
  19208. if (typeof g != "object" || g === null) return g;
  19209. var w = g[Symbol.toPrimitive];
  19210. if (w !== void 0) {
  19211. var E = w.call(g, y || "default");
  19212. if (typeof E != "object") return E;
  19213. throw new TypeError("@@toPrimitive must return a primitive value.");
  19214. }
  19215. return (y === "string" ? String : Number)(g);
  19216. }
  19217. function m(g, y) {
  19218. if (g == null) return {};
  19219. var w = {}, E = Object.keys(g), S, x;
  19220. for (x = 0; x < E.length; x++)
  19221. S = E[x], !(y.indexOf(S) >= 0) && (w[S] = g[S]);
  19222. return w;
  19223. }
  19224. function b(g, y) {
  19225. g.prototype = Object.create(y.prototype), g.prototype.constructor = g, f(g, y);
  19226. }
  19227. function f(g, y) {
  19228. return f = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(E, S) {
  19229. return E.__proto__ = S, E;
  19230. }, f(g, y);
  19231. }
  19232. var h = /* @__PURE__ */ function(g) {
  19233. b(y, g);
  19234. function y() {
  19235. for (var E, S = arguments.length, x = new Array(S), R = 0; R < S; R++)
  19236. x[R] = arguments[R];
  19237. return E = g.call.apply(g, [this].concat(x)) || this, E.state = {
  19238. width: E.props.width,
  19239. height: E.props.height,
  19240. propsWidth: E.props.width,
  19241. propsHeight: E.props.height
  19242. }, E.onResize = function(k, L) {
  19243. var O = L.size;
  19244. E.props.onResize ? (k.persist == null || k.persist(), E.setState(O, function() {
  19245. return E.props.onResize && E.props.onResize(k, L);
  19246. })) : E.setState(O);
  19247. }, E;
  19248. }
  19249. y.getDerivedStateFromProps = function(S, x) {
  19250. return x.propsWidth !== S.width || x.propsHeight !== S.height ? {
  19251. width: S.width,
  19252. height: S.height,
  19253. propsWidth: S.width,
  19254. propsHeight: S.height
  19255. } : null;
  19256. };
  19257. var w = y.prototype;
  19258. return w.render = function() {
  19259. var S = this.props, x = S.handle, R = S.handleSize;
  19260. S.onResize;
  19261. var k = S.onResizeStart, L = S.onResizeStop, O = S.draggableOpts, N = S.minConstraints, F = S.maxConstraints, I = S.lockAspectRatio, T = S.axis;
  19262. S.width, S.height;
  19263. var P = S.resizeHandles, z = S.style, _ = S.transformScale, A = m(S, a);
  19264. return /* @__PURE__ */ e.createElement(n.default, {
  19265. axis: T,
  19266. draggableOpts: O,
  19267. handle: x,
  19268. handleSize: R,
  19269. height: this.state.height,
  19270. lockAspectRatio: I,
  19271. maxConstraints: F,
  19272. minConstraints: N,
  19273. onResizeStart: k,
  19274. onResize: this.onResize,
  19275. onResizeStop: L,
  19276. resizeHandles: P,
  19277. transformScale: _,
  19278. width: this.state.width
  19279. }, /* @__PURE__ */ e.createElement("div", l({}, A, {
  19280. style: s(s({}, z), {}, {
  19281. width: this.state.width + "px",
  19282. height: this.state.height + "px"
  19283. })
  19284. })));
  19285. }, y;
  19286. }(e.Component);
  19287. return Sa.default = h, h.propTypes = s(s({}, r.resizableProps), {}, {
  19288. children: t.default.element
  19289. }), Sa;
  19290. }
  19291. var uc;
  19292. function SO() {
  19293. return uc || (uc = 1, ya.exports = function() {
  19294. throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
  19295. }, ya.exports.Resizable = Jf().default, ya.exports.ResizableBox = CO().default), ya.exports;
  19296. }
  19297. var zn = {}, lc;
  19298. function ev() {
  19299. if (lc) return zn;
  19300. lc = 1, Object.defineProperty(zn, "__esModule", {
  19301. value: !0
  19302. }), zn.resizeHandleType = zn.resizeHandleAxesType = zn.default = void 0;
  19303. var e = n(/* @__PURE__ */ sr()), t = n(me);
  19304. function n(o) {
  19305. return o && o.__esModule ? o : { default: o };
  19306. }
  19307. const r = zn.resizeHandleAxesType = e.default.arrayOf(e.default.oneOf(["s", "w", "e", "n", "sw", "nw", "se", "ne"])), a = zn.resizeHandleType = e.default.oneOfType([e.default.node, e.default.func]);
  19308. return zn.default = {
  19309. //
  19310. // Basic props
  19311. //
  19312. className: e.default.string,
  19313. style: e.default.object,
  19314. // This can be set explicitly. If it is not set, it will automatically
  19315. // be set to the container width. Note that resizes will *not* cause this to adjust.
  19316. // If you need that behavior, use WidthProvider.
  19317. width: e.default.number,
  19318. // If true, the container height swells and contracts to fit contents
  19319. autoSize: e.default.bool,
  19320. // # of cols.
  19321. cols: e.default.number,
  19322. // A selector that will not be draggable.
  19323. draggableCancel: e.default.string,
  19324. // A selector for the draggable handler
  19325. draggableHandle: e.default.string,
  19326. // Deprecated
  19327. verticalCompact: function(o) {
  19328. o.verticalCompact;
  19329. },
  19330. // Choose vertical or hotizontal compaction
  19331. compactType: e.default.oneOf(["vertical", "horizontal"]),
  19332. // layout is an array of object with the format:
  19333. // {x: Number, y: Number, w: Number, h: Number, i: String}
  19334. layout: function(o) {
  19335. var i = o.layout;
  19336. i !== void 0 && Jr().validateLayout(i, "layout");
  19337. },
  19338. //
  19339. // Grid Dimensions
  19340. //
  19341. // Margin between items [x, y] in px
  19342. margin: e.default.arrayOf(e.default.number),
  19343. // Padding inside the container [x, y] in px
  19344. containerPadding: e.default.arrayOf(e.default.number),
  19345. // Rows have a static height, but you can change this based on breakpoints if you like
  19346. rowHeight: e.default.number,
  19347. // Default Infinity, but you can specify a max here if you like.
  19348. // Note that this isn't fully fleshed out and won't error if you specify a layout that
  19349. // extends beyond the row capacity. It will, however, not allow users to drag/resize
  19350. // an item past the barrier. They can push items beyond the barrier, though.
  19351. // Intentionally not documented for this reason.
  19352. maxRows: e.default.number,
  19353. //
  19354. // Flags
  19355. //
  19356. isBounded: e.default.bool,
  19357. isDraggable: e.default.bool,
  19358. isResizable: e.default.bool,
  19359. // If true, grid can be placed one over the other.
  19360. allowOverlap: e.default.bool,
  19361. // If true, grid items won't change position when being dragged over.
  19362. preventCollision: e.default.bool,
  19363. // Use CSS transforms instead of top/left
  19364. useCSSTransforms: e.default.bool,
  19365. // parent layout transform scale
  19366. transformScale: e.default.number,
  19367. // If true, an external element can trigger onDrop callback with a specific grid position as a parameter
  19368. isDroppable: e.default.bool,
  19369. // Resize handle options
  19370. resizeHandles: r,
  19371. resizeHandle: a,
  19372. //
  19373. // Callbacks
  19374. //
  19375. // Callback so you can save the layout. Calls after each drag & resize stops.
  19376. onLayoutChange: e.default.func,
  19377. // Calls when drag starts. Callback is of the signature (layout, oldItem, newItem, placeholder, e, ?node).
  19378. // All callbacks below have the same signature. 'start' and 'stop' callbacks omit the 'placeholder'.
  19379. onDragStart: e.default.func,
  19380. // Calls on each drag movement.
  19381. onDrag: e.default.func,
  19382. // Calls when drag is complete.
  19383. onDragStop: e.default.func,
  19384. //Calls when resize starts.
  19385. onResizeStart: e.default.func,
  19386. // Calls when resize movement happens.
  19387. onResize: e.default.func,
  19388. // Calls when resize is complete.
  19389. onResizeStop: e.default.func,
  19390. // Calls when some element is dropped.
  19391. onDrop: e.default.func,
  19392. //
  19393. // Other validations
  19394. //
  19395. droppingItem: e.default.shape({
  19396. i: e.default.string.isRequired,
  19397. w: e.default.number.isRequired,
  19398. h: e.default.number.isRequired
  19399. }),
  19400. // Children must not have duplicate keys.
  19401. children: function(o, i) {
  19402. const u = o[i], l = {};
  19403. t.default.Children.forEach(u, function(c) {
  19404. if ((c == null ? void 0 : c.key) != null) {
  19405. if (l[c.key])
  19406. throw new Error('Duplicate child key "' + c.key + '" found! This will cause problems in ReactGridLayout.');
  19407. l[c.key] = !0;
  19408. }
  19409. });
  19410. },
  19411. // Optional ref for getting a reference for the wrapping div.
  19412. innerRef: e.default.any
  19413. }, zn;
  19414. }
  19415. var sc;
  19416. function wO() {
  19417. if (sc) return ga;
  19418. sc = 1, Object.defineProperty(ga, "__esModule", {
  19419. value: !0
  19420. }), ga.default = void 0;
  19421. var e = l(me), t = l(/* @__PURE__ */ sr()), n = Vo(), r = SO(), a = Jr(), o = tl(), i = ev(), u = l(el());
  19422. function l(p) {
  19423. return p && p.__esModule ? p : { default: p };
  19424. }
  19425. function c(p, m, b) {
  19426. return m = s(m), m in p ? Object.defineProperty(p, m, { value: b, enumerable: !0, configurable: !0, writable: !0 }) : p[m] = b, p;
  19427. }
  19428. function s(p) {
  19429. var m = v(p, "string");
  19430. return typeof m == "symbol" ? m : String(m);
  19431. }
  19432. function v(p, m) {
  19433. if (typeof p != "object" || p === null) return p;
  19434. var b = p[Symbol.toPrimitive];
  19435. if (b !== void 0) {
  19436. var f = b.call(p, m || "default");
  19437. if (typeof f != "object") return f;
  19438. throw new TypeError("@@toPrimitive must return a primitive value.");
  19439. }
  19440. return (m === "string" ? String : Number)(p);
  19441. }
  19442. let C = class extends e.default.Component {
  19443. constructor() {
  19444. super(...arguments), c(this, "state", {
  19445. resizing: null,
  19446. dragging: null,
  19447. className: ""
  19448. }), c(this, "elementRef", /* @__PURE__ */ e.default.createRef()), c(this, "onDragStart", (m, b) => {
  19449. let {
  19450. node: f
  19451. } = b;
  19452. const {
  19453. onDragStart: h,
  19454. transformScale: g
  19455. } = this.props;
  19456. if (!h) return;
  19457. const y = {
  19458. top: 0,
  19459. left: 0
  19460. }, {
  19461. offsetParent: w
  19462. } = f;
  19463. if (!w) return;
  19464. const E = w.getBoundingClientRect(), S = f.getBoundingClientRect(), x = S.left / g, R = E.left / g, k = S.top / g, L = E.top / g;
  19465. y.left = x - R + w.scrollLeft, y.top = k - L + w.scrollTop, this.setState({
  19466. dragging: y
  19467. });
  19468. const {
  19469. x: O,
  19470. y: N
  19471. } = (0, o.calcXY)(this.getPositionParams(), y.top, y.left, this.props.w, this.props.h);
  19472. return h.call(this, this.props.i, O, N, {
  19473. e: m,
  19474. node: f,
  19475. newPosition: y
  19476. });
  19477. }), c(this, "onDrag", (m, b) => {
  19478. let {
  19479. node: f,
  19480. deltaX: h,
  19481. deltaY: g
  19482. } = b;
  19483. const {
  19484. onDrag: y
  19485. } = this.props;
  19486. if (!y) return;
  19487. if (!this.state.dragging)
  19488. throw new Error("onDrag called before onDragStart.");
  19489. let w = this.state.dragging.top + g, E = this.state.dragging.left + h;
  19490. const {
  19491. isBounded: S,
  19492. i: x,
  19493. w: R,
  19494. h: k,
  19495. containerWidth: L
  19496. } = this.props, O = this.getPositionParams();
  19497. if (S) {
  19498. const {
  19499. offsetParent: T
  19500. } = f;
  19501. if (T) {
  19502. const {
  19503. margin: P,
  19504. rowHeight: z,
  19505. containerPadding: _
  19506. } = this.props, A = T.clientHeight - (0, o.calcGridItemWHPx)(k, z, P[1]);
  19507. w = (0, o.clamp)(w - _[1], 0, A);
  19508. const H = (0, o.calcGridColWidth)(O), $ = L - (0, o.calcGridItemWHPx)(R, H, P[0]);
  19509. E = (0, o.clamp)(E - _[0], 0, $);
  19510. }
  19511. }
  19512. const N = {
  19513. top: w,
  19514. left: E
  19515. };
  19516. this.setState({
  19517. dragging: N
  19518. });
  19519. const {
  19520. x: F,
  19521. y: I
  19522. } = (0, o.calcXY)(O, w, E, R, k);
  19523. return y.call(this, x, F, I, {
  19524. e: m,
  19525. node: f,
  19526. newPosition: N
  19527. });
  19528. }), c(this, "onDragStop", (m, b) => {
  19529. let {
  19530. node: f
  19531. } = b;
  19532. const {
  19533. onDragStop: h
  19534. } = this.props;
  19535. if (!h) return;
  19536. if (!this.state.dragging)
  19537. throw new Error("onDragEnd called before onDragStart.");
  19538. const {
  19539. w: g,
  19540. h: y,
  19541. i: w
  19542. } = this.props, {
  19543. left: E,
  19544. top: S
  19545. } = this.state.dragging, x = {
  19546. top: S,
  19547. left: E
  19548. };
  19549. this.setState({
  19550. dragging: null
  19551. });
  19552. const {
  19553. x: R,
  19554. y: k
  19555. } = (0, o.calcXY)(this.getPositionParams(), S, E, g, y);
  19556. return h.call(this, w, R, k, {
  19557. e: m,
  19558. node: f,
  19559. newPosition: x
  19560. });
  19561. }), c(this, "onResizeStop", (m, b, f) => this.onResizeHandler(m, b, f, "onResizeStop")), c(this, "onResizeStart", (m, b, f) => this.onResizeHandler(m, b, f, "onResizeStart")), c(this, "onResize", (m, b, f) => this.onResizeHandler(m, b, f, "onResize"));
  19562. }
  19563. shouldComponentUpdate(m, b) {
  19564. if (this.props.children !== m.children || this.props.droppingPosition !== m.droppingPosition) return !0;
  19565. const f = (0, o.calcGridItemPosition)(this.getPositionParams(this.props), this.props.x, this.props.y, this.props.w, this.props.h, this.state), h = (0, o.calcGridItemPosition)(this.getPositionParams(m), m.x, m.y, m.w, m.h, b);
  19566. return !(0, a.fastPositionEqual)(f, h) || this.props.useCSSTransforms !== m.useCSSTransforms;
  19567. }
  19568. componentDidMount() {
  19569. this.moveDroppingItem({});
  19570. }
  19571. componentDidUpdate(m) {
  19572. this.moveDroppingItem(m);
  19573. }
  19574. // When a droppingPosition is present, this means we should fire a move event, as if we had moved
  19575. // this element by `x, y` pixels.
  19576. moveDroppingItem(m) {
  19577. const {
  19578. droppingPosition: b
  19579. } = this.props;
  19580. if (!b) return;
  19581. const f = this.elementRef.current;
  19582. if (!f) return;
  19583. const h = m.droppingPosition || {
  19584. left: 0,
  19585. top: 0
  19586. }, {
  19587. dragging: g
  19588. } = this.state, y = g && b.left !== h.left || b.top !== h.top;
  19589. if (!g)
  19590. this.onDragStart(b.e, {
  19591. node: f,
  19592. deltaX: b.left,
  19593. deltaY: b.top
  19594. });
  19595. else if (y) {
  19596. const w = b.left - g.left, E = b.top - g.top;
  19597. this.onDrag(b.e, {
  19598. node: f,
  19599. deltaX: w,
  19600. deltaY: E
  19601. });
  19602. }
  19603. }
  19604. getPositionParams() {
  19605. let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props;
  19606. return {
  19607. cols: m.cols,
  19608. containerPadding: m.containerPadding,
  19609. containerWidth: m.containerWidth,
  19610. margin: m.margin,
  19611. maxRows: m.maxRows,
  19612. rowHeight: m.rowHeight
  19613. };
  19614. }
  19615. /**
  19616. * This is where we set the grid item's absolute placement. It gets a little tricky because we want to do it
  19617. * well when server rendering, and the only way to do that properly is to use percentage width/left because
  19618. * we don't know exactly what the browser viewport is.
  19619. * Unfortunately, CSS Transforms, which are great for performance, break in this instance because a percentage
  19620. * left is relative to the item itself, not its container! So we cannot use them on the server rendering pass.
  19621. *
  19622. * @param {Object} pos Position object with width, height, left, top.
  19623. * @return {Object} Style object.
  19624. */
  19625. createStyle(m) {
  19626. const {
  19627. usePercentages: b,
  19628. containerWidth: f,
  19629. useCSSTransforms: h
  19630. } = this.props;
  19631. let g;
  19632. return h ? g = (0, a.setTransform)(m) : (g = (0, a.setTopLeft)(m), b && (g.left = (0, a.perc)(m.left / f), g.width = (0, a.perc)(m.width / f))), g;
  19633. }
  19634. /**
  19635. * Mix a Draggable instance into a child.
  19636. * @param {Element} child Child element.
  19637. * @return {Element} Child wrapped in Draggable.
  19638. */
  19639. mixinDraggable(m, b) {
  19640. return /* @__PURE__ */ e.default.createElement(n.DraggableCore, {
  19641. disabled: !b,
  19642. onStart: this.onDragStart,
  19643. onDrag: this.onDrag,
  19644. onStop: this.onDragStop,
  19645. handle: this.props.handle,
  19646. cancel: ".react-resizable-handle" + (this.props.cancel ? "," + this.props.cancel : ""),
  19647. scale: this.props.transformScale,
  19648. nodeRef: this.elementRef
  19649. }, m);
  19650. }
  19651. /**
  19652. * Utility function to setup callback handler definitions for
  19653. * similarily structured resize events.
  19654. */
  19655. curryResizeHandler(m, b) {
  19656. return (f, h) => (
  19657. /*: Function*/
  19658. b(f, h, m)
  19659. );
  19660. }
  19661. /**
  19662. * Mix a Resizable instance into a child.
  19663. * @param {Element} child Child element.
  19664. * @param {Object} position Position object (pixel values)
  19665. * @return {Element} Child wrapped in Resizable.
  19666. */
  19667. mixinResizable(m, b, f) {
  19668. const {
  19669. cols: h,
  19670. minW: g,
  19671. minH: y,
  19672. maxW: w,
  19673. maxH: E,
  19674. transformScale: S,
  19675. resizeHandles: x,
  19676. resizeHandle: R
  19677. } = this.props, k = this.getPositionParams(), L = (0, o.calcGridItemPosition)(k, 0, 0, h, 0).width, O = (0, o.calcGridItemPosition)(k, 0, 0, g, y), N = (0, o.calcGridItemPosition)(k, 0, 0, w, E), F = [O.width, O.height], I = [Math.min(N.width, L), Math.min(N.height, 1 / 0)];
  19678. return /* @__PURE__ */ e.default.createElement(
  19679. r.Resizable,
  19680. {
  19681. draggableOpts: {
  19682. disabled: !f
  19683. },
  19684. className: f ? void 0 : "react-resizable-hide",
  19685. width: b.width,
  19686. height: b.height,
  19687. minConstraints: F,
  19688. maxConstraints: I,
  19689. onResizeStop: this.curryResizeHandler(b, this.onResizeStop),
  19690. onResizeStart: this.curryResizeHandler(b, this.onResizeStart),
  19691. onResize: this.curryResizeHandler(b, this.onResize),
  19692. transformScale: S,
  19693. resizeHandles: x,
  19694. handle: R
  19695. },
  19696. m
  19697. );
  19698. }
  19699. /**
  19700. * Wrapper around resize events to provide more useful data.
  19701. */
  19702. onResizeHandler(m, b, f, h) {
  19703. let {
  19704. node: g,
  19705. size: y,
  19706. handle: w
  19707. } = b;
  19708. const E = this.props[h];
  19709. if (!E) return;
  19710. const {
  19711. x: S,
  19712. y: x,
  19713. i: R,
  19714. maxH: k,
  19715. minH: L,
  19716. containerWidth: O
  19717. } = this.props, {
  19718. minW: N,
  19719. maxW: F
  19720. } = this.props;
  19721. let I = y;
  19722. g && (I = (0, a.resizeItemInDirection)(w, f, y, O), this.setState({
  19723. resizing: h === "onResizeStop" ? null : I
  19724. }));
  19725. let {
  19726. w: T,
  19727. h: P
  19728. } = (0, o.calcWH)(this.getPositionParams(), I.width, I.height, S, x, w);
  19729. T = (0, o.clamp)(T, Math.max(N, 1), F), P = (0, o.clamp)(P, L, k), E.call(this, R, T, P, {
  19730. e: m,
  19731. node: g,
  19732. size: I,
  19733. handle: w
  19734. });
  19735. }
  19736. render() {
  19737. const {
  19738. x: m,
  19739. y: b,
  19740. w: f,
  19741. h,
  19742. isDraggable: g,
  19743. isResizable: y,
  19744. droppingPosition: w,
  19745. useCSSTransforms: E
  19746. } = this.props, S = (0, o.calcGridItemPosition)(this.getPositionParams(), m, b, f, h, this.state), x = e.default.Children.only(this.props.children);
  19747. let R = /* @__PURE__ */ e.default.cloneElement(x, {
  19748. ref: this.elementRef,
  19749. className: (0, u.default)("react-grid-item", x.props.className, this.props.className, {
  19750. static: this.props.static,
  19751. resizing: !!this.state.resizing,
  19752. "react-draggable": g,
  19753. "react-draggable-dragging": !!this.state.dragging,
  19754. dropping: !!w,
  19755. cssTransforms: E
  19756. }),
  19757. // We can set the width and height on the child, but unfortunately we can't set the position.
  19758. style: {
  19759. ...this.props.style,
  19760. ...x.props.style,
  19761. ...this.createStyle(S)
  19762. }
  19763. });
  19764. return R = this.mixinResizable(R, S, y), R = this.mixinDraggable(R, g), R;
  19765. }
  19766. };
  19767. return ga.default = C, c(C, "propTypes", {
  19768. // Children must be only a single element
  19769. children: t.default.element,
  19770. // General grid attributes
  19771. cols: t.default.number.isRequired,
  19772. containerWidth: t.default.number.isRequired,
  19773. rowHeight: t.default.number.isRequired,
  19774. margin: t.default.array.isRequired,
  19775. maxRows: t.default.number.isRequired,
  19776. containerPadding: t.default.array.isRequired,
  19777. // These are all in grid units
  19778. x: t.default.number.isRequired,
  19779. y: t.default.number.isRequired,
  19780. w: t.default.number.isRequired,
  19781. h: t.default.number.isRequired,
  19782. // All optional
  19783. minW: function(p, m) {
  19784. const b = p[m];
  19785. if (typeof b != "number") return new Error("minWidth not Number");
  19786. if (b > p.w || b > p.maxW) return new Error("minWidth larger than item width/maxWidth");
  19787. },
  19788. maxW: function(p, m) {
  19789. const b = p[m];
  19790. if (typeof b != "number") return new Error("maxWidth not Number");
  19791. if (b < p.w || b < p.minW) return new Error("maxWidth smaller than item width/minWidth");
  19792. },
  19793. minH: function(p, m) {
  19794. const b = p[m];
  19795. if (typeof b != "number") return new Error("minHeight not Number");
  19796. if (b > p.h || b > p.maxH) return new Error("minHeight larger than item height/maxHeight");
  19797. },
  19798. maxH: function(p, m) {
  19799. const b = p[m];
  19800. if (typeof b != "number") return new Error("maxHeight not Number");
  19801. if (b < p.h || b < p.minH) return new Error("maxHeight smaller than item height/minHeight");
  19802. },
  19803. // ID is nice to have for callbacks
  19804. i: t.default.string.isRequired,
  19805. // Resize handle options
  19806. resizeHandles: i.resizeHandleAxesType,
  19807. resizeHandle: i.resizeHandleType,
  19808. // Functions
  19809. onDragStop: t.default.func,
  19810. onDragStart: t.default.func,
  19811. onDrag: t.default.func,
  19812. onResizeStop: t.default.func,
  19813. onResizeStart: t.default.func,
  19814. onResize: t.default.func,
  19815. // Flags
  19816. isDraggable: t.default.bool.isRequired,
  19817. isResizable: t.default.bool.isRequired,
  19818. isBounded: t.default.bool.isRequired,
  19819. static: t.default.bool,
  19820. // Use CSS transforms instead of top/left
  19821. useCSSTransforms: t.default.bool.isRequired,
  19822. transformScale: t.default.number,
  19823. // Others
  19824. className: t.default.string,
  19825. // Selector for draggable handle
  19826. handle: t.default.string,
  19827. // Selector for draggable cancel (see react-draggable)
  19828. cancel: t.default.string,
  19829. // Current position of a dropping element
  19830. droppingPosition: t.default.shape({
  19831. e: t.default.object.isRequired,
  19832. left: t.default.number.isRequired,
  19833. top: t.default.number.isRequired
  19834. })
  19835. }), c(C, "defaultProps", {
  19836. className: "",
  19837. cancel: "",
  19838. handle: "",
  19839. minH: 1,
  19840. minW: 1,
  19841. maxH: 1 / 0,
  19842. maxW: 1 / 0,
  19843. transformScale: 1
  19844. }), ga;
  19845. }
  19846. var cc;
  19847. function tv() {
  19848. if (cc) return ha;
  19849. cc = 1, Object.defineProperty(ha, "__esModule", {
  19850. value: !0
  19851. }), ha.default = void 0;
  19852. var e = c(me), t = /* @__PURE__ */ Ju(), n = u(el()), r = Jr(), a = tl(), o = u(wO()), i = u(ev());
  19853. function u(f) {
  19854. return f && f.__esModule ? f : { default: f };
  19855. }
  19856. function l(f) {
  19857. if (typeof WeakMap != "function") return null;
  19858. var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
  19859. return (l = function(y) {
  19860. return y ? g : h;
  19861. })(f);
  19862. }
  19863. function c(f, h) {
  19864. if (f && f.__esModule) return f;
  19865. if (f === null || typeof f != "object" && typeof f != "function") return { default: f };
  19866. var g = l(h);
  19867. if (g && g.has(f)) return g.get(f);
  19868. var y = { __proto__: null }, w = Object.defineProperty && Object.getOwnPropertyDescriptor;
  19869. for (var E in f) if (E !== "default" && Object.prototype.hasOwnProperty.call(f, E)) {
  19870. var S = w ? Object.getOwnPropertyDescriptor(f, E) : null;
  19871. S && (S.get || S.set) ? Object.defineProperty(y, E, S) : y[E] = f[E];
  19872. }
  19873. return y.default = f, g && g.set(f, y), y;
  19874. }
  19875. function s(f, h, g) {
  19876. return h = v(h), h in f ? Object.defineProperty(f, h, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : f[h] = g, f;
  19877. }
  19878. function v(f) {
  19879. var h = C(f, "string");
  19880. return typeof h == "symbol" ? h : String(h);
  19881. }
  19882. function C(f, h) {
  19883. if (typeof f != "object" || f === null) return f;
  19884. var g = f[Symbol.toPrimitive];
  19885. if (g !== void 0) {
  19886. var y = g.call(f, h || "default");
  19887. if (typeof y != "object") return y;
  19888. throw new TypeError("@@toPrimitive must return a primitive value.");
  19889. }
  19890. return (h === "string" ? String : Number)(f);
  19891. }
  19892. const p = "react-grid-layout";
  19893. let m = !1;
  19894. try {
  19895. m = /firefox/i.test(navigator.userAgent);
  19896. } catch {
  19897. }
  19898. class b extends e.Component {
  19899. constructor() {
  19900. super(...arguments), s(this, "state", {
  19901. activeDrag: null,
  19902. layout: (0, r.synchronizeLayoutWithChildren)(
  19903. this.props.layout,
  19904. this.props.children,
  19905. this.props.cols,
  19906. // Legacy support for verticalCompact: false
  19907. (0, r.compactType)(this.props),
  19908. this.props.allowOverlap
  19909. ),
  19910. mounted: !1,
  19911. oldDragItem: null,
  19912. oldLayout: null,
  19913. oldResizeItem: null,
  19914. resizing: !1,
  19915. droppingDOMNode: null,
  19916. children: []
  19917. }), s(this, "dragEnterCounter", 0), s(this, "onDragStart", (h, g, y, w) => {
  19918. let {
  19919. e: E,
  19920. node: S
  19921. } = w;
  19922. const {
  19923. layout: x
  19924. } = this.state, R = (0, r.getLayoutItem)(x, h);
  19925. if (!R) return;
  19926. const k = {
  19927. w: R.w,
  19928. h: R.h,
  19929. x: R.x,
  19930. y: R.y,
  19931. placeholder: !0,
  19932. i: h
  19933. };
  19934. return this.setState({
  19935. oldDragItem: (0, r.cloneLayoutItem)(R),
  19936. oldLayout: x,
  19937. activeDrag: k
  19938. }), this.props.onDragStart(x, R, R, null, E, S);
  19939. }), s(this, "onDrag", (h, g, y, w) => {
  19940. let {
  19941. e: E,
  19942. node: S
  19943. } = w;
  19944. const {
  19945. oldDragItem: x
  19946. } = this.state;
  19947. let {
  19948. layout: R
  19949. } = this.state;
  19950. const {
  19951. cols: k,
  19952. allowOverlap: L,
  19953. preventCollision: O
  19954. } = this.props, N = (0, r.getLayoutItem)(R, h);
  19955. if (!N) return;
  19956. const F = {
  19957. w: N.w,
  19958. h: N.h,
  19959. x: N.x,
  19960. y: N.y,
  19961. placeholder: !0,
  19962. i: h
  19963. };
  19964. R = (0, r.moveElement)(R, N, g, y, !0, O, (0, r.compactType)(this.props), k, L), this.props.onDrag(R, x, N, F, E, S), this.setState({
  19965. layout: L ? R : (0, r.compact)(R, (0, r.compactType)(this.props), k),
  19966. activeDrag: F
  19967. });
  19968. }), s(this, "onDragStop", (h, g, y, w) => {
  19969. let {
  19970. e: E,
  19971. node: S
  19972. } = w;
  19973. if (!this.state.activeDrag) return;
  19974. const {
  19975. oldDragItem: x
  19976. } = this.state;
  19977. let {
  19978. layout: R
  19979. } = this.state;
  19980. const {
  19981. cols: k,
  19982. preventCollision: L,
  19983. allowOverlap: O
  19984. } = this.props, N = (0, r.getLayoutItem)(R, h);
  19985. if (!N) return;
  19986. R = (0, r.moveElement)(R, N, g, y, !0, L, (0, r.compactType)(this.props), k, O);
  19987. const I = O ? R : (0, r.compact)(R, (0, r.compactType)(this.props), k);
  19988. this.props.onDragStop(I, x, N, null, E, S);
  19989. const {
  19990. oldLayout: T
  19991. } = this.state;
  19992. this.setState({
  19993. activeDrag: null,
  19994. layout: I,
  19995. oldDragItem: null,
  19996. oldLayout: null
  19997. }), this.onLayoutMaybeChanged(I, T);
  19998. }), s(this, "onResizeStart", (h, g, y, w) => {
  19999. let {
  20000. e: E,
  20001. node: S
  20002. } = w;
  20003. const {
  20004. layout: x
  20005. } = this.state, R = (0, r.getLayoutItem)(x, h);
  20006. R && (this.setState({
  20007. oldResizeItem: (0, r.cloneLayoutItem)(R),
  20008. oldLayout: this.state.layout,
  20009. resizing: !0
  20010. }), this.props.onResizeStart(x, R, R, null, E, S));
  20011. }), s(this, "onResize", (h, g, y, w) => {
  20012. let {
  20013. e: E,
  20014. node: S,
  20015. size: x,
  20016. handle: R
  20017. } = w;
  20018. const {
  20019. oldResizeItem: k
  20020. } = this.state, {
  20021. layout: L
  20022. } = this.state, {
  20023. cols: O,
  20024. preventCollision: N,
  20025. allowOverlap: F
  20026. } = this.props;
  20027. let I = !1, T, P, z;
  20028. const [_, A] = (0, r.withLayoutItem)(L, h, ($) => {
  20029. let U;
  20030. return P = $.x, z = $.y, ["sw", "w", "nw", "n", "ne"].indexOf(R) !== -1 && (["sw", "nw", "w"].indexOf(R) !== -1 && (P = $.x + ($.w - g), g = $.x !== P && P < 0 ? $.w : g, P = P < 0 ? 0 : P), ["ne", "n", "nw"].indexOf(R) !== -1 && (z = $.y + ($.h - y), y = $.y !== z && z < 0 ? $.h : y, z = z < 0 ? 0 : z), I = !0), N && !F && (U = (0, r.getAllCollisions)(L, {
  20031. ...$,
  20032. w: g,
  20033. h: y,
  20034. x: P,
  20035. y: z
  20036. }).filter((B) => B.i !== $.i).length > 0, U && (z = $.y, y = $.h, P = $.x, g = $.w, I = !1)), $.w = g, $.h = y, $;
  20037. });
  20038. if (!A) return;
  20039. T = _, I && (T = (0, r.moveElement)(_, A, P, z, !0, this.props.preventCollision, (0, r.compactType)(this.props), O, F));
  20040. const H = {
  20041. w: A.w,
  20042. h: A.h,
  20043. x: A.x,
  20044. y: A.y,
  20045. static: !0,
  20046. i: h
  20047. };
  20048. this.props.onResize(T, k, A, H, E, S), this.setState({
  20049. layout: F ? T : (0, r.compact)(T, (0, r.compactType)(this.props), O),
  20050. activeDrag: H
  20051. });
  20052. }), s(this, "onResizeStop", (h, g, y, w) => {
  20053. let {
  20054. e: E,
  20055. node: S
  20056. } = w;
  20057. const {
  20058. layout: x,
  20059. oldResizeItem: R
  20060. } = this.state, {
  20061. cols: k,
  20062. allowOverlap: L
  20063. } = this.props, O = (0, r.getLayoutItem)(x, h), N = L ? x : (0, r.compact)(x, (0, r.compactType)(this.props), k);
  20064. this.props.onResizeStop(N, R, O, null, E, S);
  20065. const {
  20066. oldLayout: F
  20067. } = this.state;
  20068. this.setState({
  20069. activeDrag: null,
  20070. layout: N,
  20071. oldResizeItem: null,
  20072. oldLayout: null,
  20073. resizing: !1
  20074. }), this.onLayoutMaybeChanged(N, F);
  20075. }), s(this, "onDragOver", (h) => {
  20076. var _;
  20077. if (h.preventDefault(), h.stopPropagation(), m && // $FlowIgnore can't figure this out
  20078. !((_ = h.nativeEvent.target) != null && _.classList.contains(p)))
  20079. return !1;
  20080. const {
  20081. droppingItem: g,
  20082. onDropDragOver: y,
  20083. margin: w,
  20084. cols: E,
  20085. rowHeight: S,
  20086. maxRows: x,
  20087. width: R,
  20088. containerPadding: k,
  20089. transformScale: L
  20090. } = this.props, O = y == null ? void 0 : y(h);
  20091. if (O === !1)
  20092. return this.state.droppingDOMNode && this.removeDroppingPlaceholder(), !1;
  20093. const N = {
  20094. ...g,
  20095. ...O
  20096. }, {
  20097. layout: F
  20098. } = this.state, I = h.currentTarget.getBoundingClientRect(), T = h.clientX - I.left, P = h.clientY - I.top, z = {
  20099. left: T / L,
  20100. top: P / L,
  20101. e: h
  20102. };
  20103. if (this.state.droppingDOMNode) {
  20104. if (this.state.droppingPosition) {
  20105. const {
  20106. left: A,
  20107. top: H
  20108. } = this.state.droppingPosition;
  20109. (A != T || H != P) && this.setState({
  20110. droppingPosition: z
  20111. });
  20112. }
  20113. } else {
  20114. const A = {
  20115. cols: E,
  20116. margin: w,
  20117. maxRows: x,
  20118. rowHeight: S,
  20119. containerWidth: R,
  20120. containerPadding: k || w
  20121. }, H = (0, a.calcXY)(A, P, T, N.w, N.h);
  20122. this.setState({
  20123. droppingDOMNode: /* @__PURE__ */ e.createElement("div", {
  20124. key: N.i
  20125. }),
  20126. droppingPosition: z,
  20127. layout: [...F, {
  20128. ...N,
  20129. x: H.x,
  20130. y: H.y,
  20131. static: !1,
  20132. isDraggable: !0
  20133. }]
  20134. });
  20135. }
  20136. }), s(this, "removeDroppingPlaceholder", () => {
  20137. const {
  20138. droppingItem: h,
  20139. cols: g
  20140. } = this.props, {
  20141. layout: y
  20142. } = this.state, w = (0, r.compact)(y.filter((E) => E.i !== h.i), (0, r.compactType)(this.props), g, this.props.allowOverlap);
  20143. this.setState({
  20144. layout: w,
  20145. droppingDOMNode: null,
  20146. activeDrag: null,
  20147. droppingPosition: void 0
  20148. });
  20149. }), s(this, "onDragLeave", (h) => {
  20150. h.preventDefault(), h.stopPropagation(), this.dragEnterCounter--, this.dragEnterCounter === 0 && this.removeDroppingPlaceholder();
  20151. }), s(this, "onDragEnter", (h) => {
  20152. h.preventDefault(), h.stopPropagation(), this.dragEnterCounter++;
  20153. }), s(this, "onDrop", (h) => {
  20154. h.preventDefault(), h.stopPropagation();
  20155. const {
  20156. droppingItem: g
  20157. } = this.props, {
  20158. layout: y
  20159. } = this.state, w = y.find((E) => E.i === g.i);
  20160. this.dragEnterCounter = 0, this.removeDroppingPlaceholder(), this.props.onDrop(y, w, h);
  20161. });
  20162. }
  20163. componentDidMount() {
  20164. this.setState({
  20165. mounted: !0
  20166. }), this.onLayoutMaybeChanged(this.state.layout, this.props.layout);
  20167. }
  20168. static getDerivedStateFromProps(h, g) {
  20169. let y;
  20170. return g.activeDrag ? null : (!(0, t.deepEqual)(h.layout, g.propsLayout) || h.compactType !== g.compactType ? y = h.layout : (0, r.childrenEqual)(h.children, g.children) || (y = g.layout), y ? {
  20171. layout: (0, r.synchronizeLayoutWithChildren)(y, h.children, h.cols, (0, r.compactType)(h), h.allowOverlap),
  20172. // We need to save these props to state for using
  20173. // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)
  20174. compactType: h.compactType,
  20175. children: h.children,
  20176. propsLayout: h.layout
  20177. } : null);
  20178. }
  20179. shouldComponentUpdate(h, g) {
  20180. return (
  20181. // NOTE: this is almost always unequal. Therefore the only way to get better performance
  20182. // from SCU is if the user intentionally memoizes children. If they do, and they can
  20183. // handle changes properly, performance will increase.
  20184. this.props.children !== h.children || !(0, r.fastRGLPropsEqual)(this.props, h, t.deepEqual) || this.state.activeDrag !== g.activeDrag || this.state.mounted !== g.mounted || this.state.droppingPosition !== g.droppingPosition
  20185. );
  20186. }
  20187. componentDidUpdate(h, g) {
  20188. if (!this.state.activeDrag) {
  20189. const y = this.state.layout, w = g.layout;
  20190. this.onLayoutMaybeChanged(y, w);
  20191. }
  20192. }
  20193. /**
  20194. * Calculates a pixel value for the container.
  20195. * @return {String} Container height in pixels.
  20196. */
  20197. containerHeight() {
  20198. if (!this.props.autoSize) return;
  20199. const h = (0, r.bottom)(this.state.layout), g = this.props.containerPadding ? this.props.containerPadding[1] : this.props.margin[1];
  20200. return h * this.props.rowHeight + (h - 1) * this.props.margin[1] + g * 2 + "px";
  20201. }
  20202. onLayoutMaybeChanged(h, g) {
  20203. g || (g = this.state.layout), (0, t.deepEqual)(g, h) || this.props.onLayoutChange(h);
  20204. }
  20205. /**
  20206. * Create a placeholder object.
  20207. * @return {Element} Placeholder div.
  20208. */
  20209. placeholder() {
  20210. const {
  20211. activeDrag: h
  20212. } = this.state;
  20213. if (!h) return null;
  20214. const {
  20215. width: g,
  20216. cols: y,
  20217. margin: w,
  20218. containerPadding: E,
  20219. rowHeight: S,
  20220. maxRows: x,
  20221. useCSSTransforms: R,
  20222. transformScale: k
  20223. } = this.props;
  20224. return /* @__PURE__ */ e.createElement(o.default, {
  20225. w: h.w,
  20226. h: h.h,
  20227. x: h.x,
  20228. y: h.y,
  20229. i: h.i,
  20230. className: `react-grid-placeholder ${this.state.resizing ? "placeholder-resizing" : ""}`,
  20231. containerWidth: g,
  20232. cols: y,
  20233. margin: w,
  20234. containerPadding: E || w,
  20235. maxRows: x,
  20236. rowHeight: S,
  20237. isDraggable: !1,
  20238. isResizable: !1,
  20239. isBounded: !1,
  20240. useCSSTransforms: R,
  20241. transformScale: k
  20242. }, /* @__PURE__ */ e.createElement("div", null));
  20243. }
  20244. /**
  20245. * Given a grid item, set its style attributes & surround in a <Draggable>.
  20246. * @param {Element} child React element.
  20247. * @return {Element} Element wrapped in draggable and properly placed.
  20248. */
  20249. processGridItem(h, g) {
  20250. if (!h || !h.key) return;
  20251. const y = (0, r.getLayoutItem)(this.state.layout, String(h.key));
  20252. if (!y) return null;
  20253. const {
  20254. width: w,
  20255. cols: E,
  20256. margin: S,
  20257. containerPadding: x,
  20258. rowHeight: R,
  20259. maxRows: k,
  20260. isDraggable: L,
  20261. isResizable: O,
  20262. isBounded: N,
  20263. useCSSTransforms: F,
  20264. transformScale: I,
  20265. draggableCancel: T,
  20266. draggableHandle: P,
  20267. resizeHandles: z,
  20268. resizeHandle: _
  20269. } = this.props, {
  20270. mounted: A,
  20271. droppingPosition: H
  20272. } = this.state, $ = typeof y.isDraggable == "boolean" ? y.isDraggable : !y.static && L, U = typeof y.isResizable == "boolean" ? y.isResizable : !y.static && O, G = y.resizeHandles || z, B = $ && N && y.isBounded !== !1;
  20273. return /* @__PURE__ */ e.createElement(o.default, {
  20274. containerWidth: w,
  20275. cols: E,
  20276. margin: S,
  20277. containerPadding: x || S,
  20278. maxRows: k,
  20279. rowHeight: R,
  20280. cancel: T,
  20281. handle: P,
  20282. onDragStop: this.onDragStop,
  20283. onDragStart: this.onDragStart,
  20284. onDrag: this.onDrag,
  20285. onResizeStart: this.onResizeStart,
  20286. onResize: this.onResize,
  20287. onResizeStop: this.onResizeStop,
  20288. isDraggable: $,
  20289. isResizable: U,
  20290. isBounded: B,
  20291. useCSSTransforms: F && A,
  20292. usePercentages: !A,
  20293. transformScale: I,
  20294. w: y.w,
  20295. h: y.h,
  20296. x: y.x,
  20297. y: y.y,
  20298. i: y.i,
  20299. minH: y.minH,
  20300. minW: y.minW,
  20301. maxH: y.maxH,
  20302. maxW: y.maxW,
  20303. static: y.static,
  20304. droppingPosition: g ? H : void 0,
  20305. resizeHandles: G,
  20306. resizeHandle: _
  20307. }, h);
  20308. }
  20309. render() {
  20310. const {
  20311. className: h,
  20312. style: g,
  20313. isDroppable: y,
  20314. innerRef: w
  20315. } = this.props, E = (0, n.default)(p, h), S = {
  20316. height: this.containerHeight(),
  20317. ...g
  20318. };
  20319. return /* @__PURE__ */ e.createElement("div", {
  20320. ref: w,
  20321. className: E,
  20322. style: S,
  20323. onDrop: y ? this.onDrop : r.noop,
  20324. onDragLeave: y ? this.onDragLeave : r.noop,
  20325. onDragEnter: y ? this.onDragEnter : r.noop,
  20326. onDragOver: y ? this.onDragOver : r.noop
  20327. }, e.Children.map(this.props.children, (x) => this.processGridItem(x)), y && this.state.droppingDOMNode && this.processGridItem(this.state.droppingDOMNode, !0), this.placeholder());
  20328. }
  20329. }
  20330. return ha.default = b, s(b, "displayName", "ReactGridLayout"), s(b, "propTypes", i.default), s(b, "defaultProps", {
  20331. autoSize: !0,
  20332. cols: 12,
  20333. className: "",
  20334. style: {},
  20335. draggableHandle: "",
  20336. draggableCancel: "",
  20337. containerPadding: null,
  20338. rowHeight: 150,
  20339. maxRows: 1 / 0,
  20340. // infinite vertical growth
  20341. layout: [],
  20342. margin: [10, 10],
  20343. isBounded: !1,
  20344. isDraggable: !0,
  20345. isResizable: !0,
  20346. allowOverlap: !1,
  20347. isDroppable: !1,
  20348. useCSSTransforms: !0,
  20349. transformScale: 1,
  20350. verticalCompact: !0,
  20351. compactType: "vertical",
  20352. preventCollision: !1,
  20353. droppingItem: {
  20354. i: "__dropping-elem__",
  20355. h: 1,
  20356. w: 1
  20357. },
  20358. resizeHandles: ["se"],
  20359. onLayoutChange: r.noop,
  20360. onDragStart: r.noop,
  20361. onDrag: r.noop,
  20362. onDragStop: r.noop,
  20363. onResizeStart: r.noop,
  20364. onResize: r.noop,
  20365. onResizeStop: r.noop,
  20366. onDrop: r.noop,
  20367. onDropDragOver: r.noop
  20368. }), ha;
  20369. }
  20370. var wa = {}, vr = {}, dc;
  20371. function nv() {
  20372. if (dc) return vr;
  20373. dc = 1, Object.defineProperty(vr, "__esModule", {
  20374. value: !0
  20375. }), vr.findOrGenerateResponsiveLayout = r, vr.getBreakpointFromWidth = t, vr.getColsFromBreakpoint = n, vr.sortBreakpoints = a;
  20376. var e = Jr();
  20377. function t(o, i) {
  20378. const u = a(o);
  20379. let l = u[0];
  20380. for (let c = 1, s = u.length; c < s; c++) {
  20381. const v = u[c];
  20382. i > o[v] && (l = v);
  20383. }
  20384. return l;
  20385. }
  20386. function n(o, i) {
  20387. if (!i[o])
  20388. throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint " + o + " is missing!");
  20389. return i[o];
  20390. }
  20391. function r(o, i, u, l, c, s) {
  20392. if (o[u]) return (0, e.cloneLayout)(o[u]);
  20393. let v = o[l];
  20394. const C = a(i), p = C.slice(C.indexOf(u));
  20395. for (let m = 0, b = p.length; m < b; m++) {
  20396. const f = p[m];
  20397. if (o[f]) {
  20398. v = o[f];
  20399. break;
  20400. }
  20401. }
  20402. return v = (0, e.cloneLayout)(v || []), (0, e.compact)((0, e.correctBounds)(v, {
  20403. cols: c
  20404. }), s, c);
  20405. }
  20406. function a(o) {
  20407. return Object.keys(o).sort(function(u, l) {
  20408. return o[u] - o[l];
  20409. });
  20410. }
  20411. return vr;
  20412. }
  20413. var fc;
  20414. function xO() {
  20415. if (fc) return wa;
  20416. fc = 1, Object.defineProperty(wa, "__esModule", {
  20417. value: !0
  20418. }), wa.default = void 0;
  20419. var e = l(me), t = i(/* @__PURE__ */ sr()), n = /* @__PURE__ */ Ju(), r = Jr(), a = nv(), o = i(tv());
  20420. function i(f) {
  20421. return f && f.__esModule ? f : { default: f };
  20422. }
  20423. function u(f) {
  20424. if (typeof WeakMap != "function") return null;
  20425. var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
  20426. return (u = function(y) {
  20427. return y ? g : h;
  20428. })(f);
  20429. }
  20430. function l(f, h) {
  20431. if (f && f.__esModule) return f;
  20432. if (f === null || typeof f != "object" && typeof f != "function") return { default: f };
  20433. var g = u(h);
  20434. if (g && g.has(f)) return g.get(f);
  20435. var y = { __proto__: null }, w = Object.defineProperty && Object.getOwnPropertyDescriptor;
  20436. for (var E in f) if (E !== "default" && Object.prototype.hasOwnProperty.call(f, E)) {
  20437. var S = w ? Object.getOwnPropertyDescriptor(f, E) : null;
  20438. S && (S.get || S.set) ? Object.defineProperty(y, E, S) : y[E] = f[E];
  20439. }
  20440. return y.default = f, g && g.set(f, y), y;
  20441. }
  20442. function c() {
  20443. return c = Object.assign ? Object.assign.bind() : function(f) {
  20444. for (var h = 1; h < arguments.length; h++) {
  20445. var g = arguments[h];
  20446. for (var y in g)
  20447. Object.prototype.hasOwnProperty.call(g, y) && (f[y] = g[y]);
  20448. }
  20449. return f;
  20450. }, c.apply(this, arguments);
  20451. }
  20452. function s(f, h, g) {
  20453. return h = v(h), h in f ? Object.defineProperty(f, h, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : f[h] = g, f;
  20454. }
  20455. function v(f) {
  20456. var h = C(f, "string");
  20457. return typeof h == "symbol" ? h : String(h);
  20458. }
  20459. function C(f, h) {
  20460. if (typeof f != "object" || f === null) return f;
  20461. var g = f[Symbol.toPrimitive];
  20462. if (g !== void 0) {
  20463. var y = g.call(f, h || "default");
  20464. if (typeof y != "object") return y;
  20465. throw new TypeError("@@toPrimitive must return a primitive value.");
  20466. }
  20467. return (h === "string" ? String : Number)(f);
  20468. }
  20469. const p = (f) => Object.prototype.toString.call(f);
  20470. function m(f, h) {
  20471. return f == null ? null : Array.isArray(f) ? f : f[h];
  20472. }
  20473. let b = class extends e.Component {
  20474. constructor() {
  20475. super(...arguments), s(this, "state", this.generateInitialState()), s(this, "onLayoutChange", (h) => {
  20476. this.props.onLayoutChange(h, {
  20477. ...this.props.layouts,
  20478. [this.state.breakpoint]: h
  20479. });
  20480. });
  20481. }
  20482. generateInitialState() {
  20483. const {
  20484. width: h,
  20485. breakpoints: g,
  20486. layouts: y,
  20487. cols: w
  20488. } = this.props, E = (0, a.getBreakpointFromWidth)(g, h), S = (0, a.getColsFromBreakpoint)(E, w), x = this.props.verticalCompact === !1 ? null : this.props.compactType;
  20489. return {
  20490. layout: (0, a.findOrGenerateResponsiveLayout)(y, g, E, E, S, x),
  20491. breakpoint: E,
  20492. cols: S
  20493. };
  20494. }
  20495. static getDerivedStateFromProps(h, g) {
  20496. if (!(0, n.deepEqual)(h.layouts, g.layouts)) {
  20497. const {
  20498. breakpoint: y,
  20499. cols: w
  20500. } = g;
  20501. return {
  20502. layout: (0, a.findOrGenerateResponsiveLayout)(h.layouts, h.breakpoints, y, y, w, h.compactType),
  20503. layouts: h.layouts
  20504. };
  20505. }
  20506. return null;
  20507. }
  20508. componentDidUpdate(h) {
  20509. (this.props.width != h.width || this.props.breakpoint !== h.breakpoint || !(0, n.deepEqual)(this.props.breakpoints, h.breakpoints) || !(0, n.deepEqual)(this.props.cols, h.cols)) && this.onWidthChange(h);
  20510. }
  20511. /**
  20512. * When the width changes work through breakpoints and reset state with the new width & breakpoint.
  20513. * Width changes are necessary to figure out the widget widths.
  20514. */
  20515. onWidthChange(h) {
  20516. const {
  20517. breakpoints: g,
  20518. cols: y,
  20519. layouts: w,
  20520. compactType: E
  20521. } = this.props, S = this.props.breakpoint || (0, a.getBreakpointFromWidth)(this.props.breakpoints, this.props.width), x = this.state.breakpoint, R = (0, a.getColsFromBreakpoint)(S, y), k = {
  20522. ...w
  20523. };
  20524. if (x !== S || h.breakpoints !== g || h.cols !== y) {
  20525. x in k || (k[x] = (0, r.cloneLayout)(this.state.layout));
  20526. let N = (0, a.findOrGenerateResponsiveLayout)(k, g, S, x, R, E);
  20527. N = (0, r.synchronizeLayoutWithChildren)(N, this.props.children, R, E, this.props.allowOverlap), k[S] = N, this.props.onBreakpointChange(S, R), this.props.onLayoutChange(N, k), this.setState({
  20528. breakpoint: S,
  20529. layout: N,
  20530. cols: R
  20531. });
  20532. }
  20533. const L = m(this.props.margin, S), O = m(this.props.containerPadding, S);
  20534. this.props.onWidthChange(this.props.width, L, R, O);
  20535. }
  20536. render() {
  20537. const {
  20538. breakpoint: h,
  20539. breakpoints: g,
  20540. cols: y,
  20541. layouts: w,
  20542. margin: E,
  20543. containerPadding: S,
  20544. onBreakpointChange: x,
  20545. onLayoutChange: R,
  20546. onWidthChange: k,
  20547. ...L
  20548. } = this.props;
  20549. return /* @__PURE__ */ e.createElement(o.default, c({}, L, {
  20550. // $FlowIgnore should allow nullable here due to DefaultProps
  20551. margin: m(E, this.state.breakpoint),
  20552. containerPadding: m(S, this.state.breakpoint),
  20553. onLayoutChange: this.onLayoutChange,
  20554. layout: this.state.layout,
  20555. cols: this.state.cols
  20556. }));
  20557. }
  20558. };
  20559. return wa.default = b, s(b, "propTypes", {
  20560. //
  20561. // Basic props
  20562. //
  20563. // Optional, but if you are managing width yourself you may want to set the breakpoint
  20564. // yourself as well.
  20565. breakpoint: t.default.string,
  20566. // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}
  20567. breakpoints: t.default.object,
  20568. allowOverlap: t.default.bool,
  20569. // # of cols. This is a breakpoint -> cols map
  20570. cols: t.default.object,
  20571. // # of margin. This is a breakpoint -> margin map
  20572. // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }
  20573. // Margin between items [x, y] in px
  20574. // e.g. [10, 10]
  20575. margin: t.default.oneOfType([t.default.array, t.default.object]),
  20576. // # of containerPadding. This is a breakpoint -> containerPadding map
  20577. // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }
  20578. // Padding inside the container [x, y] in px
  20579. // e.g. [10, 10]
  20580. containerPadding: t.default.oneOfType([t.default.array, t.default.object]),
  20581. // layouts is an object mapping breakpoints to layouts.
  20582. // e.g. {lg: Layout, md: Layout, ...}
  20583. layouts(f, h) {
  20584. if (p(f[h]) !== "[object Object]")
  20585. throw new Error("Layout property must be an object. Received: " + p(f[h]));
  20586. Object.keys(f[h]).forEach((g) => {
  20587. if (!(g in f.breakpoints))
  20588. throw new Error("Each key in layouts must align with a key in breakpoints.");
  20589. (0, r.validateLayout)(f.layouts[g], "layouts." + g);
  20590. });
  20591. },
  20592. // The width of this component.
  20593. // Required in this propTypes stanza because generateInitialState() will fail without it.
  20594. width: t.default.number.isRequired,
  20595. //
  20596. // Callbacks
  20597. //
  20598. // Calls back with breakpoint and new # cols
  20599. onBreakpointChange: t.default.func,
  20600. // Callback so you can save the layout.
  20601. // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.
  20602. onLayoutChange: t.default.func,
  20603. // Calls back with (containerWidth, margin, cols, containerPadding)
  20604. onWidthChange: t.default.func
  20605. }), s(b, "defaultProps", {
  20606. breakpoints: {
  20607. lg: 1200,
  20608. md: 996,
  20609. sm: 768,
  20610. xs: 480,
  20611. xxs: 0
  20612. },
  20613. cols: {
  20614. lg: 12,
  20615. md: 10,
  20616. sm: 6,
  20617. xs: 4,
  20618. xxs: 2
  20619. },
  20620. containerPadding: {
  20621. lg: null,
  20622. md: null,
  20623. sm: null,
  20624. xs: null,
  20625. xxs: null
  20626. },
  20627. layouts: {},
  20628. margin: [10, 10],
  20629. allowOverlap: !1,
  20630. onBreakpointChange: r.noop,
  20631. onLayoutChange: r.noop,
  20632. onWidthChange: r.noop
  20633. }), wa;
  20634. }
  20635. var vo = {};
  20636. const EO = /* @__PURE__ */ bc(Dg);
  20637. var vc;
  20638. function RO() {
  20639. if (vc) return vo;
  20640. vc = 1, Object.defineProperty(vo, "__esModule", {
  20641. value: !0
  20642. }), vo.default = C;
  20643. var e = i(me), t = a(/* @__PURE__ */ sr()), n = a(EO), r = a(el());
  20644. function a(p) {
  20645. return p && p.__esModule ? p : { default: p };
  20646. }
  20647. function o(p) {
  20648. if (typeof WeakMap != "function") return null;
  20649. var m = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap();
  20650. return (o = function(f) {
  20651. return f ? b : m;
  20652. })(p);
  20653. }
  20654. function i(p, m) {
  20655. if (p && p.__esModule) return p;
  20656. if (p === null || typeof p != "object" && typeof p != "function") return { default: p };
  20657. var b = o(m);
  20658. if (b && b.has(p)) return b.get(p);
  20659. var f = { __proto__: null }, h = Object.defineProperty && Object.getOwnPropertyDescriptor;
  20660. for (var g in p) if (g !== "default" && Object.prototype.hasOwnProperty.call(p, g)) {
  20661. var y = h ? Object.getOwnPropertyDescriptor(p, g) : null;
  20662. y && (y.get || y.set) ? Object.defineProperty(f, g, y) : f[g] = p[g];
  20663. }
  20664. return f.default = p, b && b.set(p, f), f;
  20665. }
  20666. function u() {
  20667. return u = Object.assign ? Object.assign.bind() : function(p) {
  20668. for (var m = 1; m < arguments.length; m++) {
  20669. var b = arguments[m];
  20670. for (var f in b)
  20671. Object.prototype.hasOwnProperty.call(b, f) && (p[f] = b[f]);
  20672. }
  20673. return p;
  20674. }, u.apply(this, arguments);
  20675. }
  20676. function l(p, m, b) {
  20677. return m = c(m), m in p ? Object.defineProperty(p, m, { value: b, enumerable: !0, configurable: !0, writable: !0 }) : p[m] = b, p;
  20678. }
  20679. function c(p) {
  20680. var m = s(p, "string");
  20681. return typeof m == "symbol" ? m : String(m);
  20682. }
  20683. function s(p, m) {
  20684. if (typeof p != "object" || p === null) return p;
  20685. var b = p[Symbol.toPrimitive];
  20686. if (b !== void 0) {
  20687. var f = b.call(p, m || "default");
  20688. if (typeof f != "object") return f;
  20689. throw new TypeError("@@toPrimitive must return a primitive value.");
  20690. }
  20691. return (m === "string" ? String : Number)(p);
  20692. }
  20693. const v = "react-grid-layout";
  20694. function C(p) {
  20695. var m;
  20696. return m = class extends e.Component {
  20697. constructor() {
  20698. super(...arguments), l(this, "state", {
  20699. width: 1280
  20700. }), l(this, "elementRef", /* @__PURE__ */ e.createRef()), l(this, "mounted", !1), l(this, "resizeObserver", void 0);
  20701. }
  20702. componentDidMount() {
  20703. this.mounted = !0, this.resizeObserver = new n.default((h) => {
  20704. if (this.elementRef.current instanceof HTMLElement) {
  20705. const y = h[0].contentRect.width;
  20706. this.setState({
  20707. width: y
  20708. });
  20709. }
  20710. });
  20711. const f = this.elementRef.current;
  20712. f instanceof HTMLElement && this.resizeObserver.observe(f);
  20713. }
  20714. componentWillUnmount() {
  20715. this.mounted = !1;
  20716. const f = this.elementRef.current;
  20717. f instanceof HTMLElement && this.resizeObserver.unobserve(f), this.resizeObserver.disconnect();
  20718. }
  20719. render() {
  20720. const {
  20721. measureBeforeMount: f,
  20722. ...h
  20723. } = this.props;
  20724. return f && !this.mounted ? /* @__PURE__ */ e.createElement("div", {
  20725. className: (0, r.default)(this.props.className, v),
  20726. style: this.props.style,
  20727. ref: this.elementRef
  20728. }) : /* @__PURE__ */ e.createElement(p, u({
  20729. innerRef: this.elementRef
  20730. }, h, this.state));
  20731. }
  20732. }, l(m, "defaultProps", {
  20733. measureBeforeMount: !1
  20734. }), l(m, "propTypes", {
  20735. // If true, will not render children until mounted. Useful for getting the exact width before
  20736. // rendering, to prevent any unsightly resizing.
  20737. measureBeforeMount: t.default.bool
  20738. }), m;
  20739. }
  20740. return vo;
  20741. }
  20742. var mc;
  20743. function PO() {
  20744. return mc || (mc = 1, function(e) {
  20745. e.exports = tv().default, e.exports.utils = Jr(), e.exports.calculateUtils = tl(), e.exports.Responsive = xO().default, e.exports.Responsive.utils = nv(), e.exports.WidthProvider = RO().default;
  20746. }(Pi)), Pi.exports;
  20747. }
  20748. var rv = PO();
  20749. const MO = /* @__PURE__ */ Aa(rv), kO = rv.WidthProvider(MO);
  20750. function g_(e) {
  20751. const { list: t, onListChange: n, idKey: r, itemRender: a, ...o } = e, i = Ht(() => {
  20752. const l = /* @__PURE__ */ new Map();
  20753. return t.forEach((c) => {
  20754. const s = c[r];
  20755. l.set(s, c);
  20756. }), l;
  20757. }, [r, t]), u = Ht(() => t.map((l, c) => ({
  20758. i: l[r],
  20759. w: 12,
  20760. h: 1,
  20761. x: 0,
  20762. y: c,
  20763. col: 12
  20764. })), [r, t]);
  20765. return /* @__PURE__ */ q.jsx(
  20766. kO,
  20767. {
  20768. ...o,
  20769. cols: 12,
  20770. preventCollision: !1,
  20771. isResizable: !1,
  20772. isDraggable: !0,
  20773. onLayoutChange: (l) => {
  20774. const c = l.sort((s, v) => s.y - v.y).map((s) => i.get(s.i));
  20775. n(c);
  20776. },
  20777. children: u.map((l, c) => /* @__PURE__ */ q.jsx("div", { "data-grid": l, children: a(i.get(l.i), c) }, l.i))
  20778. }
  20779. );
  20780. }
  20781. const ki = /* @__PURE__ */ new Set();
  20782. let mo;
  20783. function y_(e) {
  20784. return mo || (mo = new ResizeObserver((...t) => {
  20785. ki.forEach((n) => n(...t));
  20786. })), {
  20787. observe(t, n) {
  20788. ki.add(e), mo.observe(t, n);
  20789. },
  20790. unobserve(t) {
  20791. ki.delete(e), mo.unobserve(t);
  20792. }
  20793. };
  20794. }
  20795. export {
  20796. OO as Avatar,
  20797. Po as Button,
  20798. LO as CascaderList,
  20799. um as Checkbox,
  20800. TO as CheckboxGroup,
  20801. $O as ColorPicker,
  20802. In as ConfigContext,
  20803. _O as ConfigProvider,
  20804. jO as Confirm,
  20805. FO as DatePanel,
  20806. zO as DatePicker,
  20807. rg as Dialog,
  20808. g_ as DraggableList,
  20809. sC as DropdownLegacy,
  20810. Bm as DropdownOverlay,
  20811. Um as DropdownProvider,
  20812. qm as DropdownTrigger,
  20813. VO as FormDualColumnLayout,
  20814. HO as FormLayout,
  20815. QC as Input,
  20816. BO as InputNumber,
  20817. WO as InputWithSlot,
  20818. UO as Menu,
  20819. qO as MenuItem,
  20820. YO as MenuItemGroup,
  20821. Xw as MessageType,
  20822. GO as Messager,
  20823. QO as Pager,
  20824. JO as Popup,
  20825. e_ as Radio,
  20826. t_ as RadioGroup,
  20827. n_ as Scrollbar,
  20828. o_ as Segmented,
  20829. r_ as Select,
  20830. a_ as SelectList,
  20831. i_ as Slider,
  20832. KO as SubMenu,
  20833. c_ as Switch,
  20834. Gf as Tooltip,
  20835. s_ as Tree,
  20836. MP as TreeSelectionMode,
  20837. Na as clsx,
  20838. d_ as defaultTheme,
  20839. l_ as filterLeafNode,
  20840. EP as findNodePathFromTree,
  20841. mu as findSubTreeFromPath,
  20842. f_ as greenTheme,
  20843. u_ as mergeTreeSelected,
  20844. XO as message,
  20845. ZO as removeMessage,
  20846. y_ as resizeObserverCtor,
  20847. v_ as themeInstance
  20848. };